capacitor-plugin-camera-forked 3.1.120 → 3.1.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorPluginCameraForked.podspec +2 -0
- package/README.md +4 -4
- package/android/build.gradle +2 -1
- package/android/src/main/java/com/tonyxlh/capacitor/camera/BlurDetectionHelper.java +558 -129
- package/android/src/main/java/com/tonyxlh/capacitor/camera/CameraPreviewPlugin.java +255 -105
- package/dist/docs.json +4 -4
- package/dist/esm/definitions.d.ts +7 -0
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Plugin/BlurDetectionHelper.swift +643 -115
- package/ios/Plugin/CameraPreviewPlugin.swift +154 -15
- package/package.json +1 -1
- package/android/src/main/java/com/tonyxlh/capacitor/camera/TextRecognitionBlurHelper.java +0 -367
- package/ios/Plugin/TextRecognitionBlurHelper.swift +0 -336
|
@@ -16,6 +16,8 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.dependency 'Capacitor'
|
|
17
17
|
s.dependency 'TensorFlowLiteSwift', '~> 2.17.0'
|
|
18
18
|
s.dependency 'TensorFlowLiteC', '~> 2.17.0'
|
|
19
|
+
s.dependency 'MLKitObjectDetection'
|
|
20
|
+
s.dependency 'MLKitTextRecognition', '~> 7.0.0'
|
|
19
21
|
s.static_framework = true
|
|
20
22
|
s.swift_version = '5.1'
|
|
21
23
|
end
|
package/README.md
CHANGED
|
@@ -290,7 +290,7 @@ stopCamera() => Promise<void>
|
|
|
290
290
|
### takeSnapshot(...)
|
|
291
291
|
|
|
292
292
|
```typescript
|
|
293
|
-
takeSnapshot(options: { quality?: number; checkBlur?: boolean; }) => Promise<{ base64: string; confidence?: number; boundingBoxes?: number[][]; }>
|
|
293
|
+
takeSnapshot(options: { quality?: number; checkBlur?: boolean; }) => Promise<{ base64: string; confidence?: number; boundingBoxes?: number[][]; isBlur?: boolean; detectionMethod?: string; }>
|
|
294
294
|
```
|
|
295
295
|
|
|
296
296
|
take a snapshot as base64.
|
|
@@ -299,7 +299,7 @@ take a snapshot as base64.
|
|
|
299
299
|
| ------------- | ------------------------------------------------------- |
|
|
300
300
|
| **`options`** | <code>{ quality?: number; checkBlur?: boolean; }</code> |
|
|
301
301
|
|
|
302
|
-
**Returns:** <code>Promise<{ base64: string; confidence?: number; boundingBoxes?: number[][]; }></code>
|
|
302
|
+
**Returns:** <code>Promise<{ base64: string; confidence?: number; boundingBoxes?: number[][]; isBlur?: boolean; detectionMethod?: string; }></code>
|
|
303
303
|
|
|
304
304
|
--------------------
|
|
305
305
|
|
|
@@ -307,7 +307,7 @@ take a snapshot as base64.
|
|
|
307
307
|
### detectBlur(...)
|
|
308
308
|
|
|
309
309
|
```typescript
|
|
310
|
-
detectBlur(options: { image: string; }) => Promise<{ isBlur: boolean; blurConfidence: number; sharpConfidence: number; }>
|
|
310
|
+
detectBlur(options: { image: string; }) => Promise<{ isBlur: boolean; blurConfidence: number; sharpConfidence: number; method?: string; boundingBoxes?: number[][]; objectCount?: number; wordCount?: number; readableWords?: number; }>
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
analyze an image for blur detection with detailed confidence scores.
|
|
@@ -316,7 +316,7 @@ analyze an image for blur detection with detailed confidence scores.
|
|
|
316
316
|
| ------------- | ------------------------------- |
|
|
317
317
|
| **`options`** | <code>{ image: string; }</code> |
|
|
318
318
|
|
|
319
|
-
**Returns:** <code>Promise<{ isBlur: boolean; blurConfidence: number; sharpConfidence: number; }></code>
|
|
319
|
+
**Returns:** <code>Promise<{ isBlur: boolean; blurConfidence: number; sharpConfidence: number; method?: string; boundingBoxes?: number[][]; objectCount?: number; wordCount?: number; readableWords?: number; }></code>
|
|
320
320
|
|
|
321
321
|
--------------------
|
|
322
322
|
|
package/android/build.gradle
CHANGED
|
@@ -76,6 +76,7 @@ dependencies {
|
|
|
76
76
|
implementation 'org.tensorflow:tensorflow-lite-support:0.4.4'
|
|
77
77
|
implementation 'org.tensorflow:tensorflow-lite-gpu:2.14.0'
|
|
78
78
|
|
|
79
|
-
// Google ML Kit dependencies for text recognition
|
|
79
|
+
// Google ML Kit dependencies for text recognition and object detection
|
|
80
80
|
implementation 'com.google.mlkit:text-recognition:16.0.1'
|
|
81
|
+
implementation 'com.google.mlkit:object-detection:17.0.1'
|
|
81
82
|
}
|