dynamsoft-capture-vision-react-native 2.6.1016 → 3.0.5100
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/LICENSE +2 -2
- package/README.md +7 -9
- package/android/build.gradle +73 -42
- package/android/src/main/cpp/CMakeLists.txt +22 -0
- package/android/src/main/cpp/ImgHO.cpp +95 -0
- package/android/src/main/cpp/ImgHO.h +34 -0
- package/android/src/main/cpp/JsiCore.cpp +284 -0
- package/android/src/main/cpp/JsiCore.h +51 -0
- package/android/src/main/cpp/JsiCvr.cpp +327 -0
- package/android/src/main/cpp/JsiCvr.h +54 -0
- package/android/src/main/cpp/JsiDbr.cpp +38 -0
- package/android/src/main/cpp/JsiDbr.h +26 -0
- package/android/src/main/cpp/JsiDce.cpp +59 -0
- package/android/src/main/cpp/JsiDce.h +17 -0
- package/android/src/main/cpp/JsiDcp.cpp +51 -0
- package/android/src/main/cpp/JsiDcp.h +31 -0
- package/android/src/main/cpp/JsiDdn.cpp +50 -0
- package/android/src/main/cpp/JsiDdn.h +28 -0
- package/android/src/main/cpp/JsiDlr.cpp +51 -0
- package/android/src/main/cpp/JsiDlr.h +26 -0
- package/android/src/main/cpp/JsiUtility.cpp +196 -0
- package/android/src/main/cpp/JsiUtility.h +16 -0
- package/android/src/main/cpp/RawBuffer.cpp +24 -0
- package/android/src/main/cpp/RawBuffer.h +24 -0
- package/android/src/main/cpp/android_log.h +14 -0
- package/android/src/main/dysJniLibs/debug/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/debug/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/debug/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/debug/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/x86_64/librn_dys.so +0 -0
- package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/CVRModule.kt +4 -4
- package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/DCEModule.kt +10 -0
- package/android/src/main/java/com/dynamsoft/reactnativelib/ReactNativeDcvPackage.kt +13 -85
- package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/VersionsModule.kt +2 -2
- package/android/src/main/java/com/dynamsoft/reactnativelib/cvr/CaptureVisionRouterModuleImpl.kt +25 -25
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/CameraEnhancerModuleImpl.kt +23 -2
- package/android/src/main/java/com/dynamsoft/reactnativelib/license/LicenseModuleImpl.kt +1 -1
- package/android/src/main/java/com/dynamsoft/reactnativelib/utility/ImageManagerModuleImpl.kt +19 -4
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForCore.kt +14 -0
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForCvr.kt +12 -7
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDBR.kt +1 -7
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDCE.kt +2 -2
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDDN.kt +27 -19
- package/dynamsoft-capture-vision-react-native.podspec +9 -7
- package/ios/CPP/DSImageData+HostObject.h +1 -1
- package/ios/CPP/RNDynamsoft+JSI.h +2 -2
- package/ios/CPP/RNDynamsoft+JSI.mm +18 -10
- package/ios/CPP/RNDynamsoft+Json.h +2 -13
- package/ios/CPP/RNDynamsoft+Json.m +48 -39
- package/ios/CPP/YeetJSIUtils.h +3 -1
- package/ios/CPP/YeetJSIUtils.mm +5 -0
- package/ios/RNDynamsoftCameraView.m +1 -1
- package/ios/RNDynamsoftCameraViewManager.m +23 -8
- package/ios/RNDynamsoftCaptureVisionRouter.mm +76 -45
- package/ios/RNDynamsoftImageEditorView.m +1 -1
- package/ios/RNDynamsoftImageEditorViewManager.mm +36 -13
- package/ios/RNDynamsoftImageManager.mm +33 -4
- package/ios/RNDynamsoftImageSourceAdapter.mm +1 -1
- package/ios/RNDynamsoftLicense.m +1 -1
- package/ios/RNDynamsoftMultiCrossFilter.m +9 -9
- package/ios/RNDynamsoftVersions.m +1 -13
- package/package.json +3 -11
- package/src/core/CapturedResultBase.tsx +18 -0
- package/src/core/EnumCaptureResultItemType.tsx +12 -6
- package/src/core/EnumCrossVerificationStatus.tsx +6 -6
- package/src/core/ImageData.tsx +1 -1
- package/src/core/index.tsx +1 -0
- package/src/cvr/CaptureVisionRouter.tsx +47 -51
- package/src/cvr/CapturedResult.tsx +24 -46
- package/src/cvr/CapturedResultReceiver.tsx +12 -19
- package/src/cvr/NativeDynamsoftCaptureVisionRouterModule.tsx +2 -2
- package/src/cvr/SimplifiedCaptureVisionSettings.tsx +4 -4
- package/src/dbr/DecodedBarcodesResult.tsx +3 -17
- package/src/dce/CameraEnhancer.tsx +9 -0
- package/src/dce/DynamsoftCameraViewNativeComponent.ts +2 -2
- package/src/dce/EnumResolution.tsx +7 -0
- package/src/dce/NativeDynamsoftCameraViewModule.tsx +4 -0
- package/src/dce/index.tsx +1 -0
- package/src/dcp/ParsedResult.tsx +3 -14
- package/src/ddn/DeskewedImageResultItem.tsx +40 -0
- package/src/ddn/DetectedQuadResultItem.tsx +3 -1
- package/src/ddn/EnhancedImageResultItem.tsx +20 -0
- package/src/ddn/ProcessedDocumentResult.tsx +27 -0
- package/src/ddn/SimplifiedDocumentNormalizerSettings.tsx +18 -3
- package/src/ddn/index.tsx +3 -3
- package/src/dlr/RecognizedTextLinesResult.tsx +2 -16
- package/src/index.tsx +0 -1
- package/src/utility/ImageManager.tsx +66 -45
- package/android/src/main/java/com/dynamsoft/reactnativelib/rtu/BarcodeScannerModuleImpl.kt +0 -80
- package/android/src/main/java/com/dynamsoft/reactnativelib/rtu/MRZScannerModuleImpl.kt +0 -77
- package/android/src/main/java/com/dynamsoft/reactnativelib/rtu/ScannerInterface.kt +0 -47
- package/android/src/main/jniLibs/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/jniLibs/x86/librn_dys.so +0 -0
- package/android/src/main/jniLibs/x86_64/librn_dys.so +0 -0
- package/android/src/newarch/com/dynamsoft/reactnativelib/BarcodeScannerModule.kt +0 -22
- package/android/src/newarch/com/dynamsoft/reactnativelib/CVRModule.kt +0 -91
- package/android/src/newarch/com/dynamsoft/reactnativelib/CameraViewManager.kt +0 -52
- package/android/src/newarch/com/dynamsoft/reactnativelib/DCEModule.kt +0 -91
- package/android/src/newarch/com/dynamsoft/reactnativelib/ISAModule.kt +0 -60
- package/android/src/newarch/com/dynamsoft/reactnativelib/ImageEditorViewManager.kt +0 -16
- package/android/src/newarch/com/dynamsoft/reactnativelib/ImageEditorViewModule.kt +0 -24
- package/android/src/newarch/com/dynamsoft/reactnativelib/ImageManagerModule.kt +0 -12
- package/android/src/newarch/com/dynamsoft/reactnativelib/LicenseModule.kt +0 -14
- package/android/src/newarch/com/dynamsoft/reactnativelib/MRZScannerModule.kt +0 -22
- package/android/src/newarch/com/dynamsoft/reactnativelib/MultiCrossFilterModule.kt +0 -58
- package/android/src/newarch/com/dynamsoft/reactnativelib/VersionsModule.kt +0 -41
- package/android/src/oldarch/com/dynamsoft/reactnativelib/BarcodeScannerModule.kt +0 -24
- package/android/src/oldarch/com/dynamsoft/reactnativelib/MRZScannerModule.kt +0 -24
- package/ios/RNDynamsoftBarcodeScanner.h +0 -14
- package/ios/RNDynamsoftBarcodeScanner.m +0 -169
- package/ios/RNDynamsoftMRZScanner.h +0 -14
- package/ios/RNDynamsoftMRZScanner.m +0 -140
- package/src/ddn/DetectedQuadsResult.tsx +0 -31
- package/src/ddn/NormalizedImageResultItem.tsx +0 -32
- package/src/ddn/NormalizedImagesResult.tsx +0 -27
- package/src/rtu/BarcodeScanConfig.tsx +0 -104
- package/src/rtu/BarcodeScanResult.tsx +0 -31
- package/src/rtu/BarcodeScanner.tsx +0 -112
- package/src/rtu/EnumResultState.tsx +0 -21
- package/src/rtu/MRZScanConfig.tsx +0 -67
- package/src/rtu/MRZScanResult.tsx +0 -84
- package/src/rtu/MRZScanner.tsx +0 -90
- package/src/rtu/NativeDynamsoftBarcodeScannerModule.tsx +0 -6
- package/src/rtu/NativeDynamsoftMRZScannerModule.tsx +0 -6
- package/src/rtu/index.tsx +0 -7
- /package/android/src/main/{withNamespace/AndroidManifest.xml → AndroidManifest.xml} +0 -0
- /package/android/src/main/{withoutNamespace/AndroidManifest.xml → AndroidManifest_noPackage.xml} +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/CameraViewManager.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ISAModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ImageEditorViewManager.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ImageEditorViewModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ImageManagerModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/LicenseModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/MultiCrossFilterModule.kt +0 -0
package/android/src/main/java/com/dynamsoft/reactnativelib/cvr/CaptureVisionRouterModuleImpl.kt
CHANGED
|
@@ -7,9 +7,9 @@ import com.dynamsoft.core.basic_structures.ImageData
|
|
|
7
7
|
import com.dynamsoft.cvr.*
|
|
8
8
|
import com.dynamsoft.dbr.DecodedBarcodesResult
|
|
9
9
|
import com.dynamsoft.dcp.ParsedResult
|
|
10
|
-
import com.dynamsoft.ddn.
|
|
11
|
-
import com.dynamsoft.ddn.
|
|
12
|
-
import com.dynamsoft.ddn.
|
|
10
|
+
import com.dynamsoft.ddn.DeskewedImageResultItem
|
|
11
|
+
import com.dynamsoft.ddn.EnhancedImageResultItem
|
|
12
|
+
import com.dynamsoft.ddn.ProcessedDocumentResult
|
|
13
13
|
import com.dynamsoft.dlr.RecognizedTextLinesResult
|
|
14
14
|
import com.dynamsoft.reactnative.basicutils.toWritableMap
|
|
15
15
|
import com.dynamsoft.reactnativelib.core.ImageSourceAdapterModuleImpl
|
|
@@ -21,23 +21,24 @@ import kotlinx.coroutines.delay
|
|
|
21
21
|
import kotlinx.coroutines.runBlocking
|
|
22
22
|
|
|
23
23
|
private const val onCapturedResultReceived_Event = "onCapturedResultReceived"
|
|
24
|
-
private const val onDetectedQuadsReceived_Event = "onDetectedQuadsReceived"
|
|
25
24
|
private const val onDecodedBarcodesReceived_Event = "onDecodedBarcodesReceived"
|
|
26
|
-
private const val
|
|
25
|
+
private const val onProcessedDocumentResultReceived_Event = "onProcessedDocumentResultReceived"
|
|
27
26
|
private const val onRecognizedTextLinesReceived_Event = "onRecognizedTextLinesReceived"
|
|
28
27
|
private const val onParsedResultsReceived_Event = "onParsedResultsReceived"
|
|
29
28
|
private const val TAG = "CvrModule"
|
|
30
29
|
|
|
31
30
|
|
|
32
31
|
val filterMap = hashMapOf<String, CapturedResultFilter>()
|
|
32
|
+
|
|
33
33
|
class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationContext) {
|
|
34
34
|
companion object {
|
|
35
35
|
const val NAME = "DynamsoftCaptureVisionRouterModule"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
private var ifStopCapturing = false
|
|
39
|
-
private var
|
|
40
|
-
private
|
|
39
|
+
private var currentDeskewedImages: Array<ImageData>? = null
|
|
40
|
+
private var currentEnhancedImages: Array<ImageData>? = null
|
|
41
|
+
private val cvr = CaptureVisionRouter()
|
|
41
42
|
private val emitter by lazy { reactContext.getJSModule(RCTDeviceEventEmitter::class.java) }
|
|
42
43
|
|
|
43
44
|
private var continueCRR = false
|
|
@@ -46,9 +47,12 @@ class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationCo
|
|
|
46
47
|
mapOf(
|
|
47
48
|
onCapturedResultReceived_Event to object : CapturedResultReceiver {
|
|
48
49
|
override fun onCapturedResultReceived(result: CapturedResult) {
|
|
49
|
-
|
|
50
|
-
result.items.filter { it.type == EnumCapturedResultItemType.
|
|
51
|
-
.map { (it as
|
|
50
|
+
currentDeskewedImages =
|
|
51
|
+
result.items.filter { it.type == EnumCapturedResultItemType.CRIT_DESKEWED_IMAGE }
|
|
52
|
+
.map { (it as DeskewedImageResultItem).imageData }.toTypedArray()
|
|
53
|
+
currentEnhancedImages =
|
|
54
|
+
result.items.filter { it.type == EnumCapturedResultItemType.CRIT_ENHANCED_IMAGE }
|
|
55
|
+
.map { (it as EnhancedImageResultItem).imageData }.toTypedArray()
|
|
52
56
|
emitResultAndWaitForResponse(onCapturedResultReceived_Event, result.toWritableMap())
|
|
53
57
|
}
|
|
54
58
|
},
|
|
@@ -57,15 +61,11 @@ class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationCo
|
|
|
57
61
|
emitResultAndWaitForResponse(onDecodedBarcodesReceived_Event, result.toWritableMap())
|
|
58
62
|
}
|
|
59
63
|
},
|
|
60
|
-
|
|
61
|
-
override fun
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
onNormalizedImagesReceived_Event to object : CapturedResultReceiver {
|
|
66
|
-
override fun onNormalizedImagesReceived(result: NormalizedImagesResult) {
|
|
67
|
-
currentNormalizedImages = result.items.map { it.imageData }.toTypedArray()
|
|
68
|
-
emitResultAndWaitForResponse(onNormalizedImagesReceived_Event, result.toWritableMap())
|
|
64
|
+
onProcessedDocumentResultReceived_Event to object : CapturedResultReceiver {
|
|
65
|
+
override fun onProcessedDocumentResultReceived(result: ProcessedDocumentResult) {
|
|
66
|
+
currentDeskewedImages = result.deskewedImageResultItems.map { (it as DeskewedImageResultItem).imageData }.toTypedArray()
|
|
67
|
+
currentEnhancedImages = result.enhancedImageResultItems.map { (it as EnhancedImageResultItem).imageData }.toTypedArray()
|
|
68
|
+
emitResultAndWaitForResponse(onProcessedDocumentResultReceived_Event, result.toWritableMap())
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
onRecognizedTextLinesReceived_Event to object : CapturedResultReceiver {
|
|
@@ -136,7 +136,7 @@ class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationCo
|
|
|
136
136
|
@ReactMethod
|
|
137
137
|
fun startCapturing(template: String, promise: Promise) {
|
|
138
138
|
ifStopCapturing = false
|
|
139
|
-
cvr.startCapturing(template, object : CompletionListener{
|
|
139
|
+
cvr.startCapturing(template, object : CompletionListener {
|
|
140
140
|
override fun onSuccess() {
|
|
141
141
|
Log.i(TAG, "onSuccess: startCapturing($template)")
|
|
142
142
|
promise.resolve(null)
|
|
@@ -214,9 +214,9 @@ class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationCo
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
@ReactMethod
|
|
217
|
-
fun outputSettingsToFile(template: String, path: String, promise: Promise) {
|
|
217
|
+
fun outputSettingsToFile(template: String, path: String, includeDefaultValues: Boolean, promise: Promise) {
|
|
218
218
|
try {
|
|
219
|
-
cvr.outputSettingsToFile(template, path)
|
|
219
|
+
cvr.outputSettingsToFile(template, path, includeDefaultValues)
|
|
220
220
|
promise.resolve(null)
|
|
221
221
|
} catch (e: CaptureVisionRouterException) {
|
|
222
222
|
promise.reject(e.errorCode.toString(), e.message)
|
|
@@ -224,9 +224,9 @@ class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationCo
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
@ReactMethod
|
|
227
|
-
fun outputSettings(template: String, promise: Promise) {
|
|
227
|
+
fun outputSettings(template: String, includeDefaultValues: Boolean, promise: Promise) {
|
|
228
228
|
try {
|
|
229
|
-
promise.resolve(cvr.outputSettings(template))
|
|
229
|
+
promise.resolve(cvr.outputSettings(template, includeDefaultValues))
|
|
230
230
|
} catch (e: CaptureVisionRouterException) {
|
|
231
231
|
promise.reject(e.errorCode.toString(), e.message)
|
|
232
232
|
}
|
|
@@ -258,7 +258,7 @@ class CaptureVisionRouterModuleImpl(private val reactContext: ReactApplicationCo
|
|
|
258
258
|
//@Native
|
|
259
259
|
private fun getOriginalImageCalledInJSI(imageHashId: String): ImageData {
|
|
260
260
|
var originalImage = cvr.intermediateResultManager.getOriginalImage(imageHashId)
|
|
261
|
-
if(originalImage == null) {
|
|
261
|
+
if (originalImage == null) {
|
|
262
262
|
originalImage = ImageData()
|
|
263
263
|
originalImage.bytes = ByteArray(0)
|
|
264
264
|
}
|
|
@@ -2,16 +2,19 @@ package com.dynamsoft.reactnativelib.dce
|
|
|
2
2
|
|
|
3
3
|
import android.graphics.PointF
|
|
4
4
|
import android.util.Log
|
|
5
|
+
import android.util.Size
|
|
5
6
|
import androidx.lifecycle.Lifecycle
|
|
6
7
|
import com.dynamsoft.dce.CameraEnhancer
|
|
7
8
|
import com.dynamsoft.dce.CameraView
|
|
8
9
|
import com.dynamsoft.dce.EnumCameraPosition
|
|
9
10
|
import com.dynamsoft.dce.EnumFocusMode
|
|
11
|
+
import com.dynamsoft.dce.EnumResolution
|
|
10
12
|
import com.dynamsoft.dce.Feedback
|
|
11
13
|
import com.dynamsoft.dce.utils.PermissionUtil
|
|
12
14
|
import com.dynamsoft.reactnativelib.core.ImageSourceAdapterModuleImpl.Companion.mapISA
|
|
13
15
|
import com.dynamsoft.reactnativelib.utils.toScanRegion
|
|
14
16
|
import com.dynamsoft.reactnativelib.utils.toWritableMap
|
|
17
|
+
import com.facebook.react.bridge.Arguments
|
|
15
18
|
import com.facebook.react.bridge.LifecycleEventListener
|
|
16
19
|
import com.facebook.react.bridge.Promise
|
|
17
20
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
@@ -158,14 +161,32 @@ class CameraEnhancerModuleImpl(private val reactContext: ReactApplicationContext
|
|
|
158
161
|
camera.turnOffTorch()
|
|
159
162
|
}
|
|
160
163
|
|
|
164
|
+
|
|
165
|
+
@ReactMethod
|
|
166
|
+
fun setResolution(resolution: Int) {
|
|
167
|
+
if(resolution == 4) {
|
|
168
|
+
camera.setResolution(EnumResolution.RESOLUTION_4K)
|
|
169
|
+
} else {
|
|
170
|
+
camera.setResolution(resolution)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
@ReactMethod
|
|
174
|
+
fun getResolution(promise: Promise) {
|
|
175
|
+
val resolution = camera.getResolution() ?: Size(0,0)
|
|
176
|
+
promise.resolve(Arguments.createMap().apply {
|
|
177
|
+
putInt("width", resolution.width)
|
|
178
|
+
putInt("height", resolution.height)
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
|
|
161
182
|
@ReactMethod
|
|
162
183
|
fun beep() {
|
|
163
|
-
Feedback.beep(
|
|
184
|
+
Feedback.beep()
|
|
164
185
|
}
|
|
165
186
|
|
|
166
187
|
@ReactMethod
|
|
167
188
|
fun vibrate() {
|
|
168
|
-
Feedback.vibrate(
|
|
189
|
+
Feedback.vibrate()
|
|
169
190
|
}
|
|
170
191
|
|
|
171
192
|
private fun findAndSetCameraView(viewTag: Int, afterSetCameraView: () -> Unit = {}) {
|
|
@@ -18,7 +18,7 @@ class LicenseModuleImpl(private val reactContext: ReactApplicationContext) {
|
|
|
18
18
|
fun initLicense(license: String?, promise: Promise) {
|
|
19
19
|
@SuppressLint("RestrictedApi")
|
|
20
20
|
InnerData.remark.edition = "android-react-native"
|
|
21
|
-
LicenseManager.initLicense(license
|
|
21
|
+
LicenseManager.initLicense(license) { isSuccessful, error ->
|
|
22
22
|
if (isSuccessful) {
|
|
23
23
|
promise.resolve(true)
|
|
24
24
|
} else {
|
package/android/src/main/java/com/dynamsoft/reactnativelib/utility/ImageManagerModuleImpl.kt
CHANGED
|
@@ -2,7 +2,10 @@ package com.dynamsoft.reactnativelib.utility
|
|
|
2
2
|
|
|
3
3
|
import com.dynamsoft.core.basic_structures.ImageData
|
|
4
4
|
import com.dynamsoft.core.basic_structures.Quadrilateral
|
|
5
|
-
import com.dynamsoft.utility.
|
|
5
|
+
import com.dynamsoft.utility.ImageDrawer
|
|
6
|
+
import com.dynamsoft.utility.ImageIO
|
|
7
|
+
import com.dynamsoft.utility.ImageProcessor
|
|
8
|
+
import com.dynamsoft.utility.UtilityException
|
|
6
9
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
7
10
|
|
|
8
11
|
class ImageManagerModuleImpl(private val reactContext: ReactApplicationContext) {
|
|
@@ -10,6 +13,10 @@ class ImageManagerModuleImpl(private val reactContext: ReactApplicationContext)
|
|
|
10
13
|
const val NAME = "DynamsoftImageManagerModule"
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
private val imageIo by lazy { ImageIO() }
|
|
17
|
+
private val imageProcessor by lazy { ImageProcessor() }
|
|
18
|
+
private val imageDrawer by lazy { ImageDrawer() }
|
|
19
|
+
|
|
13
20
|
fun getName() = NAME
|
|
14
21
|
|
|
15
22
|
fun install(): Boolean {
|
|
@@ -20,14 +27,22 @@ class ImageManagerModuleImpl(private val reactContext: ReactApplicationContext)
|
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
fun saveToFileCalledInJsi(imageData: ImageData, filePath: String, overWrite: Boolean) {
|
|
23
|
-
|
|
30
|
+
imageIo.saveToFile(imageData, filePath, overWrite)
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
fun drawOnImageCalledInJsi(imageData: ImageData, quads: Array<Quadrilateral>, color: Int, thickness: Int): ImageData {
|
|
27
|
-
return
|
|
34
|
+
return imageDrawer.drawOnImage(imageData, quads, color, thickness)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
fun cropImageCalledInJsi(imageData: ImageData, quad: Quadrilateral): ImageData? {
|
|
38
|
+
return try {
|
|
39
|
+
imageProcessor.cropAndDeskewImage(imageData, quad)
|
|
40
|
+
} catch (e: UtilityException) {
|
|
41
|
+
null;
|
|
42
|
+
}
|
|
28
43
|
}
|
|
29
44
|
|
|
30
45
|
|
|
31
46
|
private external fun nativeInstall(jsiPtr: Long)
|
|
32
47
|
|
|
33
|
-
}
|
|
48
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
package com.dynamsoft.reactnative.basicutils
|
|
2
2
|
|
|
3
3
|
import android.graphics.Point
|
|
4
|
+
import com.dynamsoft.core.basic_structures.CapturedResultBase
|
|
4
5
|
import com.dynamsoft.core.basic_structures.CapturedResultItem
|
|
5
6
|
import com.dynamsoft.core.basic_structures.Quadrilateral
|
|
7
|
+
import com.dynamsoft.reactnativelib.utils.toWritableArray
|
|
6
8
|
import com.facebook.react.bridge.Arguments
|
|
7
9
|
import com.facebook.react.bridge.ReadableMap
|
|
8
10
|
import com.facebook.react.bridge.WritableArray
|
|
@@ -35,4 +37,16 @@ fun ReadableMap.toQuad(): Quadrilateral {
|
|
|
35
37
|
|
|
36
38
|
fun CapturedResultItem.toSharedWritableMap() : WritableMap = Arguments.createMap().apply {
|
|
37
39
|
putInt("type",type)
|
|
40
|
+
putString("taskName", taskName)
|
|
41
|
+
putString("targetROIDefName", targetROIDefName)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
fun CapturedResultBase.toSharedWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
45
|
+
putString("originalImageHashId", originalImageHashId)
|
|
46
|
+
putInt("errorCode", errorCode)
|
|
47
|
+
putString("errorMessage", errorMessage)
|
|
48
|
+
putArray(
|
|
49
|
+
"rotationTransformMatrix",
|
|
50
|
+
FloatArray(9).apply { rotationTransformMatrix.getValues(this) }.toWritableArray()
|
|
51
|
+
)
|
|
38
52
|
}
|
|
@@ -8,8 +8,10 @@ import com.dynamsoft.cvr.CaptureVisionRouter
|
|
|
8
8
|
import com.dynamsoft.cvr.CapturedResult
|
|
9
9
|
import com.dynamsoft.cvr.SimplifiedCaptureVisionSettings
|
|
10
10
|
import com.dynamsoft.dbr.BarcodeResultItem
|
|
11
|
+
import com.dynamsoft.dcp.ParsedResultItem
|
|
12
|
+
import com.dynamsoft.ddn.DeskewedImageResultItem
|
|
11
13
|
import com.dynamsoft.ddn.DetectedQuadResultItem
|
|
12
|
-
import com.dynamsoft.ddn.
|
|
14
|
+
import com.dynamsoft.ddn.EnhancedImageResultItem
|
|
13
15
|
import com.dynamsoft.dlr.TextLineResultItem
|
|
14
16
|
import com.dynamsoft.reactnative.basicutils.toQuad
|
|
15
17
|
import com.dynamsoft.reactnative.basicutils.toWritableArray
|
|
@@ -32,7 +34,7 @@ fun CaptureVisionRouter.startCapturingWithCallback(template: String, logTag: Str
|
|
|
32
34
|
})
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
fun Array<out CapturedResultItem>.toWritableArray(): WritableArray = Arguments.createArray().apply {
|
|
37
|
+
private fun Array<out CapturedResultItem>.toWritableArray(): WritableArray = Arguments.createArray().apply {
|
|
36
38
|
forEach {
|
|
37
39
|
when (it.type) {
|
|
38
40
|
EnumCapturedResultItemType.CRIT_BARCODE -> {
|
|
@@ -44,8 +46,14 @@ fun Array<out CapturedResultItem>.toWritableArray(): WritableArray = Arguments.c
|
|
|
44
46
|
EnumCapturedResultItemType.CRIT_DETECTED_QUAD -> {
|
|
45
47
|
pushMap((it as DetectedQuadResultItem).toWritableMap())
|
|
46
48
|
}
|
|
47
|
-
EnumCapturedResultItemType.
|
|
48
|
-
pushMap((it as
|
|
49
|
+
EnumCapturedResultItemType.CRIT_DESKEWED_IMAGE -> {
|
|
50
|
+
pushMap((it as DeskewedImageResultItem).toWritableMap())
|
|
51
|
+
}
|
|
52
|
+
EnumCapturedResultItemType.CRIT_ENHANCED_IMAGE -> {
|
|
53
|
+
pushMap((it as EnhancedImageResultItem).toWritableMap())
|
|
54
|
+
}
|
|
55
|
+
EnumCapturedResultItemType.CRIT_PARSED_RESULT -> {
|
|
56
|
+
pushMap((it as ParsedResultItem).toWritableMap())
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
}
|
|
@@ -60,7 +68,6 @@ fun CapturedResult.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
fun SimplifiedCaptureVisionSettings.toWritableMap() = Arguments.createMap().apply {
|
|
63
|
-
putInt("capturedResultItemTypes", capturedResultItemTypes)
|
|
64
71
|
putMap("roi", roi.toWritableMap())
|
|
65
72
|
putBoolean("roiMeasuredInPercentage", roiMeasuredInPercentage)
|
|
66
73
|
putInt("maxParallelTasks", maxParallelTasks)
|
|
@@ -89,8 +96,6 @@ fun SimplifiedCaptureVisionSettings.toWritableMap() = Arguments.createMap().appl
|
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
fun SimplifiedCaptureVisionSettings.updateFromReadableMap(newSettings: ReadableMap) {
|
|
92
|
-
capturedResultItemTypes =
|
|
93
|
-
if (newSettings.hasKey("capturedResultItemTypes")) newSettings.getInt("capturedResultItemTypes") else capturedResultItemTypes
|
|
94
99
|
roi = if (newSettings.hasKey("roi")) newSettings.getMap("roi")!!.toQuad() else roi
|
|
95
100
|
roiMeasuredInPercentage =
|
|
96
101
|
if (newSettings.hasKey("roiMeasuredInPercentage")) newSettings.getBoolean("roiMeasuredInPercentage") else roiMeasuredInPercentage
|
|
@@ -32,14 +32,8 @@ fun Array<out BarcodeResultItem>.toWritableArray(): WritableArray = Arguments.cr
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
fun DecodedBarcodesResult.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
35
|
-
|
|
36
|
-
putString("originalImageHashId", originalImageHashId)
|
|
37
|
-
putString("errorMessage", errorMessage)
|
|
35
|
+
merge(this@toWritableMap.toSharedWritableMap())
|
|
38
36
|
putArray("items", items.toWritableArray())
|
|
39
|
-
putArray(
|
|
40
|
-
"rotationTransformMatrix",
|
|
41
|
-
FloatArray(9).apply { rotationTransformMatrix.getValues(this) }.toWritableArray()
|
|
42
|
-
)
|
|
43
37
|
}
|
|
44
38
|
|
|
45
39
|
fun SimplifiedBarcodeReaderSettings.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
@@ -73,14 +73,14 @@ class TorchButtonState(
|
|
|
73
73
|
fun getTouchOnDrawable(context: Context): Drawable {
|
|
74
74
|
return base64ToDrawable(touchOnBase64, context.resources!!) ?: AppCompatResources.getDrawable(
|
|
75
75
|
context,
|
|
76
|
-
com.dynamsoft.
|
|
76
|
+
com.dynamsoft.R.drawable.flash_on
|
|
77
77
|
)!!
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
fun getTouchOffDrawable(context: Context): Drawable {
|
|
81
81
|
return base64ToDrawable(touchOffBase64, context.resources!!) ?: AppCompatResources.getDrawable(
|
|
82
82
|
context,
|
|
83
|
-
com.dynamsoft.
|
|
83
|
+
com.dynamsoft.R.drawable.flash_off
|
|
84
84
|
)!!
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
package com.dynamsoft.reactnative.basicutils
|
|
2
2
|
|
|
3
3
|
import com.dynamsoft.core.basic_structures.CapturedResultItem
|
|
4
|
+
import com.dynamsoft.ddn.DeskewedImageResultItem
|
|
4
5
|
import com.dynamsoft.ddn.DetectedQuadResultItem
|
|
5
|
-
import com.dynamsoft.ddn.
|
|
6
|
-
import com.dynamsoft.ddn.
|
|
7
|
-
import com.dynamsoft.ddn.NormalizedImagesResult
|
|
6
|
+
import com.dynamsoft.ddn.EnhancedImageResultItem
|
|
7
|
+
import com.dynamsoft.ddn.ProcessedDocumentResult
|
|
8
8
|
import com.dynamsoft.ddn.SimplifiedDocumentNormalizerSettings
|
|
9
9
|
import com.dynamsoft.reactnativelib.utils.toIntArray
|
|
10
10
|
import com.dynamsoft.reactnativelib.utils.toWritableArray
|
|
@@ -14,6 +14,13 @@ import com.facebook.react.bridge.WritableArray
|
|
|
14
14
|
import com.facebook.react.bridge.WritableMap
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
fun ProcessedDocumentResult.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
18
|
+
merge(this@toWritableMap.toSharedWritableMap())
|
|
19
|
+
putArray("deskewedImageResultItems", deskewedImageResultItems.toWritableArray())
|
|
20
|
+
putArray("detectedQuadResultItems", detectedQuadResultItems.toWritableArray())
|
|
21
|
+
putArray("enhancedImageResultItems", enhancedImageResultItems.toWritableArray())
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
fun DetectedQuadResultItem.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
18
25
|
merge((this@toWritableMap as CapturedResultItem).toSharedWritableMap())
|
|
19
26
|
putMap("location", location.toWritableMap())
|
|
@@ -26,33 +33,29 @@ fun Array<out DetectedQuadResultItem>.toWritableArray(): WritableArray = Argumen
|
|
|
26
33
|
forEach { pushMap(it.toWritableMap()) }
|
|
27
34
|
}
|
|
28
35
|
|
|
29
|
-
fun DetectedQuadsResult.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
30
|
-
putInt("errorCode", errorCode)
|
|
31
|
-
putString("originalImageHashId", originalImageHashId)
|
|
32
|
-
putString("errorMessage", errorMessage)
|
|
33
|
-
putArray("items", items.toWritableArray())
|
|
34
|
-
putArray("rotationTransformMatrix",FloatArray(9).apply { rotationTransformMatrix.getValues(this) }.toWritableArray())
|
|
35
|
-
}
|
|
36
36
|
|
|
37
|
-
fun
|
|
37
|
+
fun DeskewedImageResultItem.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
38
38
|
merge((this@toWritableMap as CapturedResultItem).toSharedWritableMap())
|
|
39
|
-
putMap("
|
|
39
|
+
putMap("sourceDeskewQuad", sourceDeskewQuad.toWritableMap())
|
|
40
40
|
putInt("crossVerificationStatus", crossVerificationStatus)
|
|
41
|
+
putArray("originalToLocalMatrix", FloatArray(9).apply { originalToLocalMatrix.getValues(this) }.toWritableArray())
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
fun Array<out
|
|
44
|
+
fun Array<out DeskewedImageResultItem>.toWritableArray(): WritableArray = Arguments.createArray().apply {
|
|
44
45
|
forEach { pushMap(it.toWritableMap()) }
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
fun
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
fun EnhancedImageResultItem.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
49
|
+
merge((this@toWritableMap as CapturedResultItem).toSharedWritableMap())
|
|
50
|
+
putArray("originalToLocalMatrix", FloatArray(9).apply { originalToLocalMatrix.getValues(this) }.toWritableArray())
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
fun Array<out EnhancedImageResultItem>.toWritableArray(): WritableArray = Arguments.createArray().apply {
|
|
54
|
+
forEach { pushMap(it.toWritableMap()) }
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
|
|
58
|
+
|
|
56
59
|
fun SimplifiedDocumentNormalizerSettings.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
57
60
|
putArray("grayscaleTransformationModes", grayscaleTransformationModes.toWritableArray())
|
|
58
61
|
putArray("grayscaleEnhancementModes", grayscaleEnhancementModes.toWritableArray())
|
|
@@ -62,6 +65,8 @@ fun SimplifiedDocumentNormalizerSettings.toWritableMap(): WritableMap = Argument
|
|
|
62
65
|
putInt("contrast", contrast)
|
|
63
66
|
putInt("maxThreadsInOneTask", maxThreadsInOneTask)
|
|
64
67
|
putInt("scaleDownThreshold", scaleDownThreshold)
|
|
68
|
+
putInt("minQuadrilateralAreaRatio", minQuadrilateralAreaRatio)
|
|
69
|
+
putInt("expectedDocumentsCount", expectedDocumentsCount)
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
fun SimplifiedDocumentNormalizerSettings.updateFromReadableMap(newSettings: ReadableMap) {
|
|
@@ -77,4 +82,7 @@ fun SimplifiedDocumentNormalizerSettings.updateFromReadableMap(newSettings: Read
|
|
|
77
82
|
|
|
78
83
|
grayscaleEnhancementModes = if (newSettings.hasKey("grayscaleEnhancementModes"))
|
|
79
84
|
newSettings.getArray("grayscaleEnhancementModes")?.toIntArray() else grayscaleEnhancementModes
|
|
85
|
+
|
|
86
|
+
minQuadrilateralAreaRatio = if (newSettings.hasKey("minQuadrilateralAreaRatio")) newSettings.getInt("minQuadrilateralAreaRatio") else minQuadrilateralAreaRatio
|
|
87
|
+
expectedDocumentsCount = if (newSettings.hasKey("expectedDocumentsCount")) newSettings.getInt("expectedDocumentsCount") else expectedDocumentsCount
|
|
80
88
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
require "json"
|
|
3
2
|
|
|
4
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
@@ -10,13 +9,16 @@ Pod::Spec.new do |s|
|
|
|
10
9
|
s.homepage = package["homepage"]
|
|
11
10
|
s.license = package["license"]
|
|
12
11
|
s.authors = { package["author"]["name"] => package["author"]["email"] }
|
|
13
|
-
|
|
14
|
-
s.
|
|
12
|
+
|
|
13
|
+
s.platforms = { :ios => "13.0" }
|
|
14
|
+
s.source = { :http => "https://registry.npmjs.org/#{s.name}/-/#{s.name}-#{s.version}.tgz" }
|
|
15
|
+
|
|
15
16
|
s.source_files = "ios/**/*.{h,hpp,c,cc,cpp,m,mm,swift}"
|
|
17
|
+
s.private_header_files = "ios/**/*.h"
|
|
16
18
|
s.requires_arc = true
|
|
17
|
-
|
|
18
|
-
s.dependency "DynamsoftCaptureVisionBundle", "
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
|
|
20
|
+
s.dependency "DynamsoftCaptureVisionBundle", ">= 3.0.5100", "< 4.0"
|
|
21
|
+
|
|
22
|
+
install_modules_dependencies(s)
|
|
21
23
|
end
|
|
22
24
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright © Dynamsoft Corporation. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
#import <
|
|
6
|
-
#import <
|
|
5
|
+
#import <DynamsoftCaptureVisionBundle/DSCapturedResult.h>
|
|
6
|
+
#import <DynamsoftCaptureVisionBundle/DSQuadrilateral.h>
|
|
7
7
|
#import <jsi/jsi.h>
|
|
8
8
|
|
|
9
9
|
NS_ASSUME_NONNULL_BEGIN
|
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
#import "RNDynamsoft+Json.h"
|
|
7
7
|
#import "DSImageData+HostObject.h"
|
|
8
8
|
#import "YeetJSIUtils.h"
|
|
9
|
-
#import <
|
|
10
|
-
#import <DynamsoftCaptureVisionRouter/DynamsoftCaptureVisionRouter.h>
|
|
11
|
-
#import <DynamsoftBarcodeReader/DynamsoftBarcodeReader.h>
|
|
12
|
-
#import <DynamsoftLabelRecognizer/DynamsoftLabelRecognizer.h>
|
|
13
|
-
#import <DynamsoftDocumentNormalizer/DynamsoftDocumentNormalizer.h>
|
|
14
|
-
#import <DynamsoftCodeParser/DynamsoftCodeParser.h>
|
|
9
|
+
#import <DynamsoftCaptureVisionBundle/DynamsoftCaptureVisionBundle.h>
|
|
15
10
|
|
|
16
11
|
NSArray<NSNumber *> *CGAffineTransformToArray(CGAffineTransform transform) {
|
|
17
12
|
return @[@(transform.a), @(transform.b), @(transform.c), @(transform.d), @(transform.tx), @(transform.ty)];
|
|
@@ -67,17 +62,30 @@ NSArray<NSNumber *> *CGAffineTransformToArray(CGAffineTransform transform) {
|
|
|
67
62
|
obj.setProperty(runtime, "confidenceAsDocumentBoundary",convertNSNumberToJSINumber(runtime, @(item.confidenceAsDocumentBoundary)));
|
|
68
63
|
}
|
|
69
64
|
break;
|
|
70
|
-
case
|
|
65
|
+
case DSCapturedResultItemTypeDeskewedImage:
|
|
71
66
|
{
|
|
72
|
-
|
|
67
|
+
DSDeskewedImageResultItem *item = (DSDeskewedImageResultItem *)self;
|
|
73
68
|
if (item.imageData) {
|
|
74
69
|
ImageDataHostObject hostObject = [item.imageData hostObject];
|
|
75
70
|
Object object = Object::createFromHostObject(runtime, std::make_shared<ImageDataHostObject>(hostObject));
|
|
76
71
|
obj.setProperty(runtime, "imageData", object);
|
|
77
72
|
}
|
|
78
|
-
obj.setProperty(runtime, "
|
|
73
|
+
obj.setProperty(runtime, "sourceDeskewQuad", convertNSDictionaryToJSIObject(runtime, [item.sourceDeskewQuad toJson]));
|
|
74
|
+
obj.setProperty(runtime, "crossVerificationStatus", convertNSNumberToJSINumber(runtime, @(item.crossVerificationStatus)));
|
|
75
|
+
obj.setProperty(runtime, "originalToLocalMatrix", convertNSArrayToJSIArray(runtime, CGAffineTransformToArray(item.originalToLocalMatrix)));
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
case DSCapturedResultItemTypeEnhancedImage:
|
|
79
|
+
{
|
|
80
|
+
DSEnhancedImageResultItem *item = (DSEnhancedImageResultItem *)self;
|
|
81
|
+
if (item.imageData) {
|
|
82
|
+
ImageDataHostObject hostObject = [item.imageData hostObject];
|
|
83
|
+
Object object = Object::createFromHostObject(runtime, std::make_shared<ImageDataHostObject>(hostObject));
|
|
84
|
+
obj.setProperty(runtime, "imageData", object);
|
|
79
85
|
}
|
|
86
|
+
obj.setProperty(runtime, "originalToLocalMatrix", convertNSArrayToJSIArray(runtime, CGAffineTransformToArray(item.originalToLocalMatrix)));
|
|
80
87
|
break;
|
|
88
|
+
}
|
|
81
89
|
case DSCapturedResultItemTypeParsedResult:
|
|
82
90
|
{
|
|
83
91
|
DSParsedResultItem *item = (DSParsedResultItem *)self;
|
|
@@ -88,7 +96,7 @@ NSArray<NSNumber *> *CGAffineTransformToArray(CGAffineTransform transform) {
|
|
|
88
96
|
@"mappingStatus":@([item getFieldMappingStatus:key]),
|
|
89
97
|
@"validationStatus":@([item getFieldValidationStatus:key]) } forKey:key];
|
|
90
98
|
}
|
|
91
|
-
obj.setProperty(runtime, "", convertNSDictionaryToJSIObject(runtime, [mutableDictionary copy]));
|
|
99
|
+
obj.setProperty(runtime, "parsedFields", convertNSDictionaryToJSIObject(runtime, [mutableDictionary copy]));
|
|
92
100
|
obj.setProperty(runtime, "jsonString", convertNSStringToJSIString(runtime, item.jsonString));
|
|
93
101
|
obj.setProperty(runtime, "codeType", convertNSStringToJSIString(runtime, item.codeType));
|
|
94
102
|
}
|
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
* Copyright © Dynamsoft Corporation. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
#import <
|
|
6
|
-
#import <DynamsoftCaptureVisionRouter/DynamsoftCaptureVisionRouter.h>
|
|
7
|
-
#import <DynamsoftBarcodeReader/DynamsoftBarcodeReader.h>
|
|
8
|
-
#import <DynamsoftLabelRecognizer/DynamsoftLabelRecognizer.h>
|
|
9
|
-
#import <DynamsoftDocumentNormalizer/DynamsoftDocumentNormalizer.h>
|
|
10
|
-
#import <DynamsoftCodeParser/DynamsoftCodeParser.h>
|
|
5
|
+
#import <DynamsoftCaptureVisionBundle/DynamsoftCaptureVisionBundle.h>
|
|
11
6
|
|
|
12
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
13
8
|
|
|
@@ -75,13 +70,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
75
70
|
|
|
76
71
|
@end
|
|
77
72
|
|
|
78
|
-
@interface
|
|
79
|
-
|
|
80
|
-
- (NSObject *)toJson;
|
|
81
|
-
|
|
82
|
-
@end
|
|
83
|
-
|
|
84
|
-
@interface DSNormalizedImagesResult (Json)
|
|
73
|
+
@interface DSProcessedDocumentResult (Json)
|
|
85
74
|
|
|
86
75
|
- (NSObject *)toJson;
|
|
87
76
|
|