dynamsoft-capture-vision-react-native 3.4.1300 → 3.4.3010
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 +4 -4
- package/README.md +62 -62
- package/android/README.md +14 -14
- package/android/build.gradle +167 -163
- package/android/gradle.properties +20 -20
- package/android/settings.gradle +5 -5
- package/android/src/main/AndroidManifest.xml +6 -6
- package/android/src/main/AndroidManifest_noPackage.xml +5 -5
- package/android/src/main/cpp/CMakeLists.txt +21 -21
- package/android/src/main/cpp/ImgHO.cpp +94 -94
- package/android/src/main/cpp/ImgHO.h +34 -34
- package/android/src/main/cpp/JsiCore.cpp +296 -296
- package/android/src/main/cpp/JsiCore.h +51 -51
- package/android/src/main/cpp/JsiCvr.cpp +332 -332
- package/android/src/main/cpp/JsiCvr.h +54 -54
- package/android/src/main/cpp/JsiDbr.cpp +283 -283
- package/android/src/main/cpp/JsiDbr.h +26 -26
- package/android/src/main/cpp/JsiDce.cpp +59 -59
- package/android/src/main/cpp/JsiDce.h +17 -17
- package/android/src/main/cpp/JsiDcp.cpp +51 -51
- package/android/src/main/cpp/JsiDcp.h +31 -31
- package/android/src/main/cpp/JsiDdn.cpp +50 -50
- package/android/src/main/cpp/JsiDdn.h +28 -28
- package/android/src/main/cpp/JsiDlr.cpp +60 -60
- package/android/src/main/cpp/JsiDlr.h +26 -26
- package/android/src/main/cpp/JsiUtility.cpp +604 -604
- package/android/src/main/cpp/JsiUtility.h +26 -26
- package/android/src/main/cpp/RawBuffer.cpp +23 -23
- package/android/src/main/cpp/RawBuffer.h +24 -24
- package/android/src/main/cpp/android_log.h +14 -14
- package/android/src/main/dysJniLibsFor86/debug/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/debug/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/debug/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/debug/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/release/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/release/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/release/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/release/x86_64/librn_dys.so +0 -0
- package/android/src/main/java/com/dynamsoft/reactnativelib/CVRModule.kt +137 -137
- package/android/src/main/java/com/dynamsoft/reactnativelib/CameraViewManager.kt +62 -62
- package/android/src/main/java/com/dynamsoft/reactnativelib/DCEModule.kt +125 -125
- package/android/src/main/java/com/dynamsoft/reactnativelib/DynamsoftBaseModule.kt +8 -8
- package/android/src/main/java/com/dynamsoft/reactnativelib/ISAModule.kt +73 -73
- package/android/src/main/java/com/dynamsoft/reactnativelib/ImageEditorViewManager.kt +14 -14
- package/android/src/main/java/com/dynamsoft/reactnativelib/ImageEditorViewModule.kt +35 -35
- package/android/src/main/java/com/dynamsoft/reactnativelib/ImageManagerModule.kt +15 -15
- package/android/src/main/java/com/dynamsoft/reactnativelib/LicenseModule.kt +29 -29
- package/android/src/main/java/com/dynamsoft/reactnativelib/MultiCrossFilterModule.kt +83 -83
- package/android/src/main/java/com/dynamsoft/reactnativelib/ReactNativeDcvPackage.kt +32 -32
- package/android/src/main/java/com/dynamsoft/reactnativelib/VersionsModule.kt +41 -41
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/Basic.kt +44 -44
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForCore.kt +50 -50
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForCvr.kt +129 -129
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForDBR.kt +157 -157
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForDCE.kt +110 -110
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForDCP.kt +49 -49
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForDDN.kt +85 -85
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ForDLR.kt +72 -72
- package/android/src/main/java/com/dynamsoft/reactnativelib/basicutils/ImageUtil.kt +58 -58
- package/android/src/main/java/com/dynamsoft/reactnativelib/core/ImageSourceAdapterModuleImpl.kt +120 -120
- package/android/src/main/java/com/dynamsoft/reactnativelib/cvr/CaptureVisionRouterModuleImpl.kt +306 -306
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/CameraEnhancerModuleImpl.kt +247 -247
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/CameraLifeCycleOwner.java +14 -14
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/CameraViewManagerImpl.kt +77 -77
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/ImageEditorViewManagerImpl.kt +15 -15
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/ImageEditorViewModuleImpl.kt +110 -110
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/RNCameraView.kt +20 -20
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/RNImageEditorView.kt +19 -19
- package/android/src/main/java/com/dynamsoft/reactnativelib/license/LicenseModuleImpl.kt +39 -39
- package/android/src/main/java/com/dynamsoft/reactnativelib/utility/ImageManagerModuleImpl.kt +120 -120
- package/android/src/main/java/com/dynamsoft/reactnativelib/utility/MultiCrossFilterModuleImpl.kt +111 -111
- package/app.plugin.js +21 -21
- package/dynamsoft-capture-vision-react-native.podspec +24 -24
- package/ios/CPP/DSImageData+HostObject.h +18 -18
- package/ios/CPP/DSImageData+HostObject.mm +38 -38
- package/ios/CPP/ImageDataHostObject.cpp +87 -87
- package/ios/CPP/ImageDataHostObject.hpp +35 -35
- package/ios/CPP/MutableRawBuffer.cpp +23 -23
- package/ios/CPP/MutableRawBuffer.hpp +23 -23
- package/ios/CPP/RNDynamsoft+JSI.h +22 -22
- package/ios/CPP/RNDynamsoft+JSI.mm +303 -303
- package/ios/CPP/RNDynamsoft+Json.h +93 -93
- package/ios/CPP/RNDynamsoft+Json.m +733 -733
- package/ios/CPP/YeetJSIUtils.h +56 -56
- package/ios/CPP/YeetJSIUtils.mm +208 -208
- package/ios/RNDynamsoftCameraView.h +31 -31
- package/ios/RNDynamsoftCameraView.m +108 -108
- package/ios/RNDynamsoftCameraViewManager.h +14 -14
- package/ios/RNDynamsoftCameraViewManager.m +195 -195
- package/ios/RNDynamsoftCaptureVisionRouter.h +18 -18
- package/ios/RNDynamsoftCaptureVisionRouter.mm +532 -532
- package/ios/RNDynamsoftImageEditorView.h +17 -17
- package/ios/RNDynamsoftImageEditorView.m +25 -25
- package/ios/RNDynamsoftImageEditorViewManager.h +14 -14
- package/ios/RNDynamsoftImageEditorViewManager.mm +183 -183
- package/ios/RNDynamsoftImageManager.h +14 -14
- package/ios/RNDynamsoftImageManager.mm +369 -369
- package/ios/RNDynamsoftImageSourceAdapter.h +19 -19
- package/ios/RNDynamsoftImageSourceAdapter.mm +255 -255
- package/ios/RNDynamsoftLicense.h +14 -14
- package/ios/RNDynamsoftLicense.m +62 -62
- package/ios/RNDynamsoftMultiCrossFilter.h +14 -14
- package/ios/RNDynamsoftMultiCrossFilter.m +145 -145
- package/ios/RNDynamsoftVersions.h +13 -13
- package/ios/RNDynamsoftVersions.m +27 -27
- package/package.json +48 -48
- package/src/NativeDynamsoftVersionsModule.tsx +20 -20
- package/src/VersionsModule.tsx +7 -7
- package/src/core/CapturedResultBase.tsx +18 -18
- package/src/core/CapturedResultItem.tsx +23 -23
- package/src/core/CoreModule.tsx +9 -9
- package/src/core/DSRect.tsx +29 -29
- package/src/core/EnumCaptureResultItemType.tsx +52 -52
- package/src/core/EnumColourChannelUsageType.tsx +26 -26
- package/src/core/EnumCrossVerificationStatus.tsx +46 -46
- package/src/core/EnumGrayscaleEnhancementMode.tsx +46 -46
- package/src/core/EnumGrayscaleTransformationMode.tsx +35 -35
- package/src/core/EnumImageFileFormat.tsx +6 -6
- package/src/core/EnumPixelFormat.tsx +53 -53
- package/src/core/ImageData.tsx +87 -87
- package/src/core/ImageSourceAdapter.tsx +160 -160
- package/src/core/NativeDynamsoftImageSourceAdapterModule.tsx +29 -29
- package/src/core/Point.tsx +13 -13
- package/src/core/Quadrilateral.tsx +12 -12
- package/src/core/index.tsx +18 -18
- package/src/cvr/CaptureVisionRouter.tsx +683 -683
- package/src/cvr/CaptureVisionRouterModule.tsx +9 -9
- package/src/cvr/CapturedResult.tsx +123 -123
- package/src/cvr/CapturedResultFilter.tsx +13 -13
- package/src/cvr/CapturedResultReceiver.tsx +71 -71
- package/src/cvr/EnumPresetTemplate.tsx +81 -81
- package/src/cvr/NativeDynamsoftCaptureVisionRouterModule.tsx +25 -25
- package/src/cvr/SimplifiedCaptureVisionSettings.tsx +61 -61
- package/src/cvr/index.tsx +11 -11
- package/src/dbr/BarcodeDetails.tsx +51 -51
- package/src/dbr/BarcodeReaderModule.tsx +9 -9
- package/src/dbr/BarcodeResultItem.tsx +65 -65
- package/src/dbr/DecodedBarcodesResult.tsx +14 -14
- package/src/dbr/ECISegment.tsx +23 -23
- package/src/dbr/EnumBarcodeFormat.tsx +112 -112
- package/src/dbr/EnumDeblurMode.tsx +29 -29
- package/src/dbr/EnumLocalizationMode.tsx +27 -27
- package/src/dbr/EnumQRCodeErrorCorrectionLevel.tsx +6 -6
- package/src/dbr/SimplifiedBarcodeReaderSettings.tsx +80 -80
- package/src/dbr/index.tsx +9 -9
- package/src/dce/CameraEnhancer.tsx +254 -254
- package/src/dce/CameraEnhancerModule.tsx +9 -9
- package/src/dce/CameraView.tsx +100 -100
- package/src/dce/DynamsoftCameraViewNativeComponent.ts +96 -96
- package/src/dce/DynamsoftImageEditorViewNativeComponent.ts +9 -9
- package/src/dce/EnumCameraPosition.tsx +25 -25
- package/src/dce/EnumDrawingLayerId.tsx +17 -17
- package/src/dce/EnumEnhancedFeatures.tsx +24 -24
- package/src/dce/EnumFocusMode.tsx +6 -6
- package/src/dce/EnumResolution.tsx +8 -8
- package/src/dce/EnumTorchState.tsx +10 -10
- package/src/dce/FeedBack.tsx +28 -28
- package/src/dce/ImageEditorView.tsx +131 -131
- package/src/dce/NativeDynamsoftCameraViewModule.tsx +47 -47
- package/src/dce/NativeDynamsoftImageEditorViewModule.ts +9 -9
- package/src/dce/index.tsx +13 -13
- package/src/dcp/CodeParserDedicatorModule.tsx +9 -9
- package/src/dcp/CodeParserModule.tsx +9 -9
- package/src/dcp/EnumMappingStatus.tsx +14 -14
- package/src/dcp/EnumValidationStatus.tsx +14 -14
- package/src/dcp/ParsedResult.tsx +14 -14
- package/src/dcp/ParsedResultItem.tsx +50 -50
- package/src/dcp/index.tsx +8 -8
- package/src/ddn/DeskewedImageResultItem.tsx +40 -40
- package/src/ddn/DetectedQuadResultItem.tsx +31 -31
- package/src/ddn/DocumentNormalizerModule.tsx +9 -9
- package/src/ddn/EnhancedImageResultItem.tsx +20 -20
- package/src/ddn/EnumImageColourMode.tsx +14 -14
- package/src/ddn/ProcessedDocumentResult.tsx +27 -27
- package/src/ddn/SimplifiedDocumentNormalizerSettings.tsx +65 -65
- package/src/ddn/index.tsx +11 -11
- package/src/dip/ImageProcessingModule.tsx +9 -9
- package/src/dip/index.tsx +1 -1
- package/src/dlr/CharacterResult.tsx +28 -28
- package/src/dlr/LabelRecognizerModule.tsx +9 -9
- package/src/dlr/RecognizedTextLinesResult.tsx +19 -19
- package/src/dlr/SimplifiedLabelRecognizerSettings.tsx +33 -33
- package/src/dlr/TextLineResultItem.tsx +41 -41
- package/src/dlr/index.tsx +8 -8
- package/src/index.tsx +13 -13
- package/src/license/LicenseManager.tsx +49 -49
- package/src/license/LicenseModule.tsx +9 -9
- package/src/license/NativeDynamsoftLicenseModule.tsx +7 -7
- package/src/license/index.tsx +7 -7
- package/src/utility/CrossVerificationCriteria.tsx +11 -11
- package/src/utility/EnumFilterType.tsx +5 -5
- package/src/utility/ImageManager.tsx +348 -348
- package/src/utility/MultiFrameResultCrossFilter.tsx +183 -183
- package/src/utility/NativeDynamsoftImageManagerModule.tsx +7 -7
- package/src/utility/NativeDynamsoftMultiCrossFilterModule.tsx +18 -18
- package/src/utility/UtilityModule.tsx +9 -9
- package/src/utility/index.tsx +4 -4
- package/android/.gitignore +0 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {DynamsoftVersions} from '../VersionsModule'
|
|
2
|
-
import {Platform} from "react-native";
|
|
3
|
-
|
|
4
|
-
/** @hideconstructor */
|
|
5
|
-
export class CaptureVisionRouterModule {
|
|
6
|
-
static getVersion(): string {
|
|
7
|
-
return '['+Platform.OS+']: ' + DynamsoftVersions.cvr
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
import {DynamsoftVersions} from '../VersionsModule'
|
|
2
|
+
import {Platform} from "react-native";
|
|
3
|
+
|
|
4
|
+
/** @hideconstructor */
|
|
5
|
+
export class CaptureVisionRouterModule {
|
|
6
|
+
static getVersion(): string {
|
|
7
|
+
return '['+Platform.OS+']: ' + DynamsoftVersions.cvr
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
import {type CapturedResultItem, EnumCapturedResultItemType} from "../core";
|
|
2
|
-
import type {BarcodeResultItem, DecodedBarcodesResult} from "../dbr";
|
|
3
|
-
import type {ParsedResult, ParsedResultItem} from "../dcp";
|
|
4
|
-
import type {RecognizedTextLinesResult, TextLineResultItem} from "../dlr";
|
|
5
|
-
import type {
|
|
6
|
-
DetectedQuadResultItem,
|
|
7
|
-
DeskewedImageResultItem,
|
|
8
|
-
EnhancedImageResultItem,
|
|
9
|
-
ProcessedDocumentResult
|
|
10
|
-
} from "../ddn";
|
|
11
|
-
import type {CapturedResultBase} from "../core/CapturedResultBase";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The CapturedResult interface describes the basic structure of a result object returned by Dynamsoft Capture Vision Router({@link CaptureVisionRouter}).
|
|
15
|
-
*
|
|
16
|
-
* @remarks Depending on the functional module that generated the result item, the interface may vary:
|
|
17
|
-
* - dynamsoft-barcode-reader: {@link DecodedBarcodesResult}
|
|
18
|
-
* - dynamsoft-label-recognizer: {@link RecognizedTextLinesResult}
|
|
19
|
-
* - dynamsoft-document-normalizer: {@link ProcessedDocumentResult}
|
|
20
|
-
* - dynamsoft-code-parser: {@link ParsedResult}
|
|
21
|
-
*
|
|
22
|
-
* @see {@link CapturedResultReceiver.onCapturedResultReceived}
|
|
23
|
-
* @see {@link CapturedResultBase}
|
|
24
|
-
* */
|
|
25
|
-
export interface CapturedResult extends CapturedResultBase{
|
|
26
|
-
/**
|
|
27
|
-
* An array of CapturedResultItem objects representing the captured result items.
|
|
28
|
-
* */
|
|
29
|
-
items?: Array<CapturedResultItem>;
|
|
30
|
-
|
|
31
|
-
/**Get a {@link DecodedBarcodesResult} object that contains all the {@link BarcodeResultItem} in this CapturedResult.*/
|
|
32
|
-
decodedBarcodesResult?: DecodedBarcodesResult;
|
|
33
|
-
|
|
34
|
-
/**Get a {@link RecognizedTextLinesResult} object that contains all the {@link TextLineResultItem} in this CapturedResult.*/
|
|
35
|
-
recognizedTextLinesResult?: RecognizedTextLinesResult;
|
|
36
|
-
|
|
37
|
-
/**Get a {@link ProcessedDocumentResult} object that contains all the {@link EnhancedImageResultItem} ,{@link DeskewedImageResultItem} and {@link DetectedQuadResultItem} in this CapturedResult.*/
|
|
38
|
-
processingDocumentResult?: ProcessedDocumentResult;
|
|
39
|
-
|
|
40
|
-
/**Get a {@link ParsedResult} object that contains all the {@link ParsedResultItem} in this CapturedResult.*/
|
|
41
|
-
parsedResult?: ParsedResult;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**@internal*/
|
|
45
|
-
export function _populateResults(result: CapturedResult | null | undefined) {
|
|
46
|
-
if (result) {
|
|
47
|
-
result.decodedBarcodesResult = getDecodedBarcodesResult(result)
|
|
48
|
-
result.recognizedTextLinesResult = getRecognizedTextLinesResult(result)
|
|
49
|
-
result.processingDocumentResult = getProcessingDocumentResult(result)
|
|
50
|
-
result.parsedResult = getParsedResult(result)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**@internal*/
|
|
56
|
-
function getDecodedBarcodesResult(result: CapturedResult): DecodedBarcodesResult {
|
|
57
|
-
return {
|
|
58
|
-
originalImageHashId: result.originalImageHashId,
|
|
59
|
-
errorCode: result.errorCode,
|
|
60
|
-
errorMessage: result.errorMessage,
|
|
61
|
-
rotationTransformMatrix: result.rotationTransformMatrix,
|
|
62
|
-
items: result.items?.filter(item => {
|
|
63
|
-
return item.type == EnumCapturedResultItemType.CRIT_BARCODE
|
|
64
|
-
}).map(item => {
|
|
65
|
-
return item as BarcodeResultItem
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
} as DecodedBarcodesResult;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**@internal*/
|
|
72
|
-
function getRecognizedTextLinesResult(result: CapturedResult): RecognizedTextLinesResult {
|
|
73
|
-
return {
|
|
74
|
-
originalImageHashId: result.originalImageHashId,
|
|
75
|
-
errorCode: result.errorCode,
|
|
76
|
-
errorMessage: result.errorMessage,
|
|
77
|
-
rotationTransformMatrix: result.rotationTransformMatrix,
|
|
78
|
-
items: result.items?.filter(item => {
|
|
79
|
-
return item.type == EnumCapturedResultItemType.CRIT_TEXT_LINE
|
|
80
|
-
}).map(item => {
|
|
81
|
-
return item as TextLineResultItem
|
|
82
|
-
})
|
|
83
|
-
} as RecognizedTextLinesResult;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**@internal*/
|
|
87
|
-
function getProcessingDocumentResult(result: CapturedResult): ProcessedDocumentResult {
|
|
88
|
-
return {
|
|
89
|
-
originalImageHashId: result.originalImageHashId,
|
|
90
|
-
errorCode: result.errorCode,
|
|
91
|
-
errorMessage: result.errorMessage,
|
|
92
|
-
rotationTransformMatrix: result.rotationTransformMatrix,
|
|
93
|
-
deskewedImageResultItems: result.items?.filter(item => {
|
|
94
|
-
return item.type == EnumCapturedResultItemType.CRIT_DESKEWED_IMAGE
|
|
95
|
-
}).map(item => {
|
|
96
|
-
return item as DeskewedImageResultItem
|
|
97
|
-
}),
|
|
98
|
-
detectedQuadResultItems: result.items?.filter(item => {
|
|
99
|
-
return item.type == EnumCapturedResultItemType.CRIT_DETECTED_QUAD
|
|
100
|
-
}).map(item => {
|
|
101
|
-
return item as DetectedQuadResultItem
|
|
102
|
-
}),
|
|
103
|
-
enhancedImageResultItems: result.items?.filter(item => {
|
|
104
|
-
return item.type == EnumCapturedResultItemType.CRIT_ENHANCED_IMAGE
|
|
105
|
-
}).map(item => {
|
|
106
|
-
return item as EnhancedImageResultItem
|
|
107
|
-
})
|
|
108
|
-
} as ProcessedDocumentResult;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**@internal*/
|
|
112
|
-
function getParsedResult(result: CapturedResult): ParsedResult {
|
|
113
|
-
return {
|
|
114
|
-
originalImageHashId: result.originalImageHashId,
|
|
115
|
-
errorCode: result.errorCode,
|
|
116
|
-
errorMessage: result.errorMessage,
|
|
117
|
-
items: result.items?.filter(item => {
|
|
118
|
-
return item.type == EnumCapturedResultItemType.CRIT_PARSED_RESULT
|
|
119
|
-
}).map(item => {
|
|
120
|
-
return item as ParsedResultItem
|
|
121
|
-
})
|
|
122
|
-
} as ParsedResult;
|
|
123
|
-
}
|
|
1
|
+
import {type CapturedResultItem, EnumCapturedResultItemType} from "../core";
|
|
2
|
+
import type {BarcodeResultItem, DecodedBarcodesResult} from "../dbr";
|
|
3
|
+
import type {ParsedResult, ParsedResultItem} from "../dcp";
|
|
4
|
+
import type {RecognizedTextLinesResult, TextLineResultItem} from "../dlr";
|
|
5
|
+
import type {
|
|
6
|
+
DetectedQuadResultItem,
|
|
7
|
+
DeskewedImageResultItem,
|
|
8
|
+
EnhancedImageResultItem,
|
|
9
|
+
ProcessedDocumentResult
|
|
10
|
+
} from "../ddn";
|
|
11
|
+
import type {CapturedResultBase} from "../core/CapturedResultBase";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The CapturedResult interface describes the basic structure of a result object returned by Dynamsoft Capture Vision Router({@link CaptureVisionRouter}).
|
|
15
|
+
*
|
|
16
|
+
* @remarks Depending on the functional module that generated the result item, the interface may vary:
|
|
17
|
+
* - dynamsoft-barcode-reader: {@link DecodedBarcodesResult}
|
|
18
|
+
* - dynamsoft-label-recognizer: {@link RecognizedTextLinesResult}
|
|
19
|
+
* - dynamsoft-document-normalizer: {@link ProcessedDocumentResult}
|
|
20
|
+
* - dynamsoft-code-parser: {@link ParsedResult}
|
|
21
|
+
*
|
|
22
|
+
* @see {@link CapturedResultReceiver.onCapturedResultReceived}
|
|
23
|
+
* @see {@link CapturedResultBase}
|
|
24
|
+
* */
|
|
25
|
+
export interface CapturedResult extends CapturedResultBase{
|
|
26
|
+
/**
|
|
27
|
+
* An array of CapturedResultItem objects representing the captured result items.
|
|
28
|
+
* */
|
|
29
|
+
items?: Array<CapturedResultItem>;
|
|
30
|
+
|
|
31
|
+
/**Get a {@link DecodedBarcodesResult} object that contains all the {@link BarcodeResultItem} in this CapturedResult.*/
|
|
32
|
+
decodedBarcodesResult?: DecodedBarcodesResult;
|
|
33
|
+
|
|
34
|
+
/**Get a {@link RecognizedTextLinesResult} object that contains all the {@link TextLineResultItem} in this CapturedResult.*/
|
|
35
|
+
recognizedTextLinesResult?: RecognizedTextLinesResult;
|
|
36
|
+
|
|
37
|
+
/**Get a {@link ProcessedDocumentResult} object that contains all the {@link EnhancedImageResultItem} ,{@link DeskewedImageResultItem} and {@link DetectedQuadResultItem} in this CapturedResult.*/
|
|
38
|
+
processingDocumentResult?: ProcessedDocumentResult;
|
|
39
|
+
|
|
40
|
+
/**Get a {@link ParsedResult} object that contains all the {@link ParsedResultItem} in this CapturedResult.*/
|
|
41
|
+
parsedResult?: ParsedResult;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**@internal*/
|
|
45
|
+
export function _populateResults(result: CapturedResult | null | undefined) {
|
|
46
|
+
if (result) {
|
|
47
|
+
result.decodedBarcodesResult = getDecodedBarcodesResult(result)
|
|
48
|
+
result.recognizedTextLinesResult = getRecognizedTextLinesResult(result)
|
|
49
|
+
result.processingDocumentResult = getProcessingDocumentResult(result)
|
|
50
|
+
result.parsedResult = getParsedResult(result)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**@internal*/
|
|
56
|
+
function getDecodedBarcodesResult(result: CapturedResult): DecodedBarcodesResult {
|
|
57
|
+
return {
|
|
58
|
+
originalImageHashId: result.originalImageHashId,
|
|
59
|
+
errorCode: result.errorCode,
|
|
60
|
+
errorMessage: result.errorMessage,
|
|
61
|
+
rotationTransformMatrix: result.rotationTransformMatrix,
|
|
62
|
+
items: result.items?.filter(item => {
|
|
63
|
+
return item.type == EnumCapturedResultItemType.CRIT_BARCODE
|
|
64
|
+
}).map(item => {
|
|
65
|
+
return item as BarcodeResultItem
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
} as DecodedBarcodesResult;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**@internal*/
|
|
72
|
+
function getRecognizedTextLinesResult(result: CapturedResult): RecognizedTextLinesResult {
|
|
73
|
+
return {
|
|
74
|
+
originalImageHashId: result.originalImageHashId,
|
|
75
|
+
errorCode: result.errorCode,
|
|
76
|
+
errorMessage: result.errorMessage,
|
|
77
|
+
rotationTransformMatrix: result.rotationTransformMatrix,
|
|
78
|
+
items: result.items?.filter(item => {
|
|
79
|
+
return item.type == EnumCapturedResultItemType.CRIT_TEXT_LINE
|
|
80
|
+
}).map(item => {
|
|
81
|
+
return item as TextLineResultItem
|
|
82
|
+
})
|
|
83
|
+
} as RecognizedTextLinesResult;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**@internal*/
|
|
87
|
+
function getProcessingDocumentResult(result: CapturedResult): ProcessedDocumentResult {
|
|
88
|
+
return {
|
|
89
|
+
originalImageHashId: result.originalImageHashId,
|
|
90
|
+
errorCode: result.errorCode,
|
|
91
|
+
errorMessage: result.errorMessage,
|
|
92
|
+
rotationTransformMatrix: result.rotationTransformMatrix,
|
|
93
|
+
deskewedImageResultItems: result.items?.filter(item => {
|
|
94
|
+
return item.type == EnumCapturedResultItemType.CRIT_DESKEWED_IMAGE
|
|
95
|
+
}).map(item => {
|
|
96
|
+
return item as DeskewedImageResultItem
|
|
97
|
+
}),
|
|
98
|
+
detectedQuadResultItems: result.items?.filter(item => {
|
|
99
|
+
return item.type == EnumCapturedResultItemType.CRIT_DETECTED_QUAD
|
|
100
|
+
}).map(item => {
|
|
101
|
+
return item as DetectedQuadResultItem
|
|
102
|
+
}),
|
|
103
|
+
enhancedImageResultItems: result.items?.filter(item => {
|
|
104
|
+
return item.type == EnumCapturedResultItemType.CRIT_ENHANCED_IMAGE
|
|
105
|
+
}).map(item => {
|
|
106
|
+
return item as EnhancedImageResultItem
|
|
107
|
+
})
|
|
108
|
+
} as ProcessedDocumentResult;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**@internal*/
|
|
112
|
+
function getParsedResult(result: CapturedResult): ParsedResult {
|
|
113
|
+
return {
|
|
114
|
+
originalImageHashId: result.originalImageHashId,
|
|
115
|
+
errorCode: result.errorCode,
|
|
116
|
+
errorMessage: result.errorMessage,
|
|
117
|
+
items: result.items?.filter(item => {
|
|
118
|
+
return item.type == EnumCapturedResultItemType.CRIT_PARSED_RESULT
|
|
119
|
+
}).map(item => {
|
|
120
|
+
return item as ParsedResultItem
|
|
121
|
+
})
|
|
122
|
+
} as ParsedResult;
|
|
123
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {MultiFrameResultCrossFilter} from "../utility";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The CapturedResultFilter interface represents a captured result filter, which is responsible for filtering different types of captured results,
|
|
5
|
-
* including original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results.
|
|
6
|
-
*
|
|
7
|
-
* @remarks Can only use specific inherited classes {@link MultiFrameResultCrossFilter} for now.
|
|
8
|
-
* @see {@link CaptureVisionRouter.addFilter}
|
|
9
|
-
* */
|
|
10
|
-
export interface CapturedResultFilter {
|
|
11
|
-
/**@internal*/
|
|
12
|
-
_getFilterId():string;
|
|
13
|
-
}
|
|
1
|
+
import {MultiFrameResultCrossFilter} from "../utility";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The CapturedResultFilter interface represents a captured result filter, which is responsible for filtering different types of captured results,
|
|
5
|
+
* including original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results.
|
|
6
|
+
*
|
|
7
|
+
* @remarks Can only use specific inherited classes {@link MultiFrameResultCrossFilter} for now.
|
|
8
|
+
* @see {@link CaptureVisionRouter.addFilter}
|
|
9
|
+
* */
|
|
10
|
+
export interface CapturedResultFilter {
|
|
11
|
+
/**@internal*/
|
|
12
|
+
_getFilterId():string;
|
|
13
|
+
}
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import type {CapturedResult} from "./CapturedResult";
|
|
2
|
-
import type {DecodedBarcodesResult} from "../dbr";
|
|
3
|
-
import type {RecognizedTextLinesResult} from "../dlr";
|
|
4
|
-
import type {ParsedResult} from "../dcp";
|
|
5
|
-
import type {ProcessedDocumentResult} from "../ddn";
|
|
6
|
-
import { CaptureVisionRouter } from ".";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The CapturedResultReceiver class is designed as a standardized way for retrieving captured results in the Dynamsoft Capture Vision architecture.
|
|
10
|
-
* It adopts an event-driven approach, with events dedicated to various result types,
|
|
11
|
-
* such as the original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results, etc.
|
|
12
|
-
* <p>Code snippet:</p>
|
|
13
|
-
*
|
|
14
|
-
* ```
|
|
15
|
-
* val router: CaptureVisionRouter
|
|
16
|
-
* router.addResultReceiver({
|
|
17
|
-
* onDecodedBarcodesReceived: result => {
|
|
18
|
-
* //Handle barcodes. `result` is an instance of DecodedBarcodesResult.
|
|
19
|
-
* },
|
|
20
|
-
*
|
|
21
|
-
* onRecognizedTextLinesReceived: result => {
|
|
22
|
-
* //Handle the result of text recognition. `result` is an instance of RecognizedTextLinesResult.
|
|
23
|
-
* },
|
|
24
|
-
* })
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @see {@link CaptureVisionRouter.addResultReceiver}
|
|
28
|
-
* */
|
|
29
|
-
export interface CapturedResultReceiver {
|
|
30
|
-
/**
|
|
31
|
-
* Event triggered when a generic captured result is available, occurring each time an image finishes its processing.
|
|
32
|
-
* This event can be used for any result that does not fit into the specific categories of the other callback events.
|
|
33
|
-
*
|
|
34
|
-
* @see {@link CapturedResult}
|
|
35
|
-
* */
|
|
36
|
-
onCapturedResultReceived?: (result: CapturedResult) => void;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Event triggered when decoded barcodes are available.
|
|
40
|
-
* This event is used to handle barcodes that have been successfully decoded by Dynamsoft Barcode Reader.
|
|
41
|
-
*
|
|
42
|
-
* @see {@link DecodedBarcodesResult}
|
|
43
|
-
* */
|
|
44
|
-
onDecodedBarcodesReceived?: (result: DecodedBarcodesResult) => void;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Event triggered when recognized text lines are available.
|
|
48
|
-
* This event is used to handle the result of text recognition by Dynamsoft Label Recognizer.
|
|
49
|
-
*
|
|
50
|
-
* @see {@link RecognizedTextLinesResult}
|
|
51
|
-
* */
|
|
52
|
-
onRecognizedTextLinesReceived?: (result: RecognizedTextLinesResult) => void;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Event triggered when parsed results are available.
|
|
56
|
-
* This event is used for handling results that have been parsed into a structured format by Dynamsoft Code Parser.
|
|
57
|
-
*
|
|
58
|
-
* @see {@link ParsedResult}
|
|
59
|
-
* */
|
|
60
|
-
onParsedResultsReceived?: (result: ParsedResult) => void;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Event triggered when processed document result are available.
|
|
64
|
-
* This event is used for handling images that have been processed or normalized (e.g., corrected for skew or perspective),
|
|
65
|
-
* by Dynamsoft Document Normalizer.
|
|
66
|
-
*
|
|
67
|
-
* @see {@link ProcessedDocumentResult}
|
|
68
|
-
* */
|
|
69
|
-
onProcessedDocumentResultReceived?: (result: ProcessedDocumentResult) => void;
|
|
70
|
-
|
|
71
|
-
}
|
|
1
|
+
import type {CapturedResult} from "./CapturedResult";
|
|
2
|
+
import type {DecodedBarcodesResult} from "../dbr";
|
|
3
|
+
import type {RecognizedTextLinesResult} from "../dlr";
|
|
4
|
+
import type {ParsedResult} from "../dcp";
|
|
5
|
+
import type {ProcessedDocumentResult} from "../ddn";
|
|
6
|
+
import { CaptureVisionRouter } from ".";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The CapturedResultReceiver class is designed as a standardized way for retrieving captured results in the Dynamsoft Capture Vision architecture.
|
|
10
|
+
* It adopts an event-driven approach, with events dedicated to various result types,
|
|
11
|
+
* such as the original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results, etc.
|
|
12
|
+
* <p>Code snippet:</p>
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* val router: CaptureVisionRouter
|
|
16
|
+
* router.addResultReceiver({
|
|
17
|
+
* onDecodedBarcodesReceived: result => {
|
|
18
|
+
* //Handle barcodes. `result` is an instance of DecodedBarcodesResult.
|
|
19
|
+
* },
|
|
20
|
+
*
|
|
21
|
+
* onRecognizedTextLinesReceived: result => {
|
|
22
|
+
* //Handle the result of text recognition. `result` is an instance of RecognizedTextLinesResult.
|
|
23
|
+
* },
|
|
24
|
+
* })
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @see {@link CaptureVisionRouter.addResultReceiver}
|
|
28
|
+
* */
|
|
29
|
+
export interface CapturedResultReceiver {
|
|
30
|
+
/**
|
|
31
|
+
* Event triggered when a generic captured result is available, occurring each time an image finishes its processing.
|
|
32
|
+
* This event can be used for any result that does not fit into the specific categories of the other callback events.
|
|
33
|
+
*
|
|
34
|
+
* @see {@link CapturedResult}
|
|
35
|
+
* */
|
|
36
|
+
onCapturedResultReceived?: (result: CapturedResult) => void;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Event triggered when decoded barcodes are available.
|
|
40
|
+
* This event is used to handle barcodes that have been successfully decoded by Dynamsoft Barcode Reader.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link DecodedBarcodesResult}
|
|
43
|
+
* */
|
|
44
|
+
onDecodedBarcodesReceived?: (result: DecodedBarcodesResult) => void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Event triggered when recognized text lines are available.
|
|
48
|
+
* This event is used to handle the result of text recognition by Dynamsoft Label Recognizer.
|
|
49
|
+
*
|
|
50
|
+
* @see {@link RecognizedTextLinesResult}
|
|
51
|
+
* */
|
|
52
|
+
onRecognizedTextLinesReceived?: (result: RecognizedTextLinesResult) => void;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Event triggered when parsed results are available.
|
|
56
|
+
* This event is used for handling results that have been parsed into a structured format by Dynamsoft Code Parser.
|
|
57
|
+
*
|
|
58
|
+
* @see {@link ParsedResult}
|
|
59
|
+
* */
|
|
60
|
+
onParsedResultsReceived?: (result: ParsedResult) => void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Event triggered when processed document result are available.
|
|
64
|
+
* This event is used for handling images that have been processed or normalized (e.g., corrected for skew or perspective),
|
|
65
|
+
* by Dynamsoft Document Normalizer.
|
|
66
|
+
*
|
|
67
|
+
* @see {@link ProcessedDocumentResult}
|
|
68
|
+
* */
|
|
69
|
+
onProcessedDocumentResultReceived?: (result: ProcessedDocumentResult) => void;
|
|
70
|
+
|
|
71
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
export enum EnumPresetTemplate {
|
|
2
|
-
/**
|
|
3
|
-
* Versatile function for barcode reading, document detection, or text recognition.
|
|
4
|
-
*/
|
|
5
|
-
PT_DEFAULT = "Default",
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Scans a single barcode.
|
|
9
|
-
* */
|
|
10
|
-
PT_READ_BARCODES = "ReadBarcodes_Default",
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Identifies and reads any text present.
|
|
14
|
-
*/
|
|
15
|
-
PT_RECOGNIZE_TEXT_LINES = "RecognizeTextLines_Default",
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* RIdentifies the edges of a document.
|
|
19
|
-
*/
|
|
20
|
-
PT_DETECT_DOCUMENT_BOUNDARIES = "DetectDocumentBoundaries_Default",
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Detects document edges and standardizes its format.
|
|
24
|
-
*/
|
|
25
|
-
PT_DETECT_AND_NORMALIZE_DOCUMENT = "DetectAndNormalizeDocument_Default",
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Adjusts a document to a standard format using detected borders.
|
|
29
|
-
*/
|
|
30
|
-
PT_NORMALIZE_DOCUMENT = "NormalizeDocument_Default",
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Represents a barcode reading mode where speed is prioritized.
|
|
34
|
-
*
|
|
35
|
-
* In this mode, the barcode reader will optimize for faster barcode detection
|
|
36
|
-
* and decoding, sacrificing some level of accuracy and read rate. It is suitable
|
|
37
|
-
* for situations where a quick response time is more important than perfect
|
|
38
|
-
* barcode recognition.
|
|
39
|
-
*/
|
|
40
|
-
PT_READ_BARCODES_SPEED_FIRST = "ReadBarcodes_SpeedFirst",
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Represents a barcode reading mode where barcode read rate is prioritized.
|
|
44
|
-
*
|
|
45
|
-
* In this mode, the barcode reader will optimize for higher barcode read rates,
|
|
46
|
-
* even if it may sometimes result in reduced accuracy and speed. It is suitable for
|
|
47
|
-
* scenarios where maximizing the number of successfully read barcodes is critical.
|
|
48
|
-
*/
|
|
49
|
-
PT_READ_BARCODES_READ_RATE_FIRST = "ReadBarcodes_ReadRateFirst",
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Scans a single barcode.
|
|
53
|
-
* */
|
|
54
|
-
PT_READ_SINGLE_BARCODE = "ReadSingleBarcode",
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Represents a text recognition mode focused on recognizing numbers.
|
|
58
|
-
*/
|
|
59
|
-
PT_RECOGNIZE_NUMBERS = "RecognizeNumbers",
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Represents a text recognition mode focused on recognizing alphabetic characters (letters).
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
PT_RECOGNIZE_LETTERS = "RecognizeLetters",
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Represents a text recognition mode that combines numbers and alphabetic characters (letters) recognition.
|
|
69
|
-
*/
|
|
70
|
-
PT_RECOGNIZE_NUMBERS_AND_LETTERS = "RecognizeNumbersAndLetters",
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Represents a text recognition mode that combines numbers and uppercase letters recognition.
|
|
74
|
-
*/
|
|
75
|
-
PT_RECOGNIZE_NUMBERS_AND_UPPERCASE_LETTERS = "RecognizeNumbersAndUppercaseLetters",
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Represents a text recognition mode focused on recognizing uppercase letters.
|
|
79
|
-
*/
|
|
80
|
-
PT_RECOGNIZE_UPPERCASE_LETTERS = "RecognizeUppercaseLetters",
|
|
81
|
-
}
|
|
1
|
+
export enum EnumPresetTemplate {
|
|
2
|
+
/**
|
|
3
|
+
* Versatile function for barcode reading, document detection, or text recognition.
|
|
4
|
+
*/
|
|
5
|
+
PT_DEFAULT = "Default",
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Scans a single barcode.
|
|
9
|
+
* */
|
|
10
|
+
PT_READ_BARCODES = "ReadBarcodes_Default",
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Identifies and reads any text present.
|
|
14
|
+
*/
|
|
15
|
+
PT_RECOGNIZE_TEXT_LINES = "RecognizeTextLines_Default",
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* RIdentifies the edges of a document.
|
|
19
|
+
*/
|
|
20
|
+
PT_DETECT_DOCUMENT_BOUNDARIES = "DetectDocumentBoundaries_Default",
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Detects document edges and standardizes its format.
|
|
24
|
+
*/
|
|
25
|
+
PT_DETECT_AND_NORMALIZE_DOCUMENT = "DetectAndNormalizeDocument_Default",
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Adjusts a document to a standard format using detected borders.
|
|
29
|
+
*/
|
|
30
|
+
PT_NORMALIZE_DOCUMENT = "NormalizeDocument_Default",
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Represents a barcode reading mode where speed is prioritized.
|
|
34
|
+
*
|
|
35
|
+
* In this mode, the barcode reader will optimize for faster barcode detection
|
|
36
|
+
* and decoding, sacrificing some level of accuracy and read rate. It is suitable
|
|
37
|
+
* for situations where a quick response time is more important than perfect
|
|
38
|
+
* barcode recognition.
|
|
39
|
+
*/
|
|
40
|
+
PT_READ_BARCODES_SPEED_FIRST = "ReadBarcodes_SpeedFirst",
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Represents a barcode reading mode where barcode read rate is prioritized.
|
|
44
|
+
*
|
|
45
|
+
* In this mode, the barcode reader will optimize for higher barcode read rates,
|
|
46
|
+
* even if it may sometimes result in reduced accuracy and speed. It is suitable for
|
|
47
|
+
* scenarios where maximizing the number of successfully read barcodes is critical.
|
|
48
|
+
*/
|
|
49
|
+
PT_READ_BARCODES_READ_RATE_FIRST = "ReadBarcodes_ReadRateFirst",
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Scans a single barcode.
|
|
53
|
+
* */
|
|
54
|
+
PT_READ_SINGLE_BARCODE = "ReadSingleBarcode",
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Represents a text recognition mode focused on recognizing numbers.
|
|
58
|
+
*/
|
|
59
|
+
PT_RECOGNIZE_NUMBERS = "RecognizeNumbers",
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Represents a text recognition mode focused on recognizing alphabetic characters (letters).
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
PT_RECOGNIZE_LETTERS = "RecognizeLetters",
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Represents a text recognition mode that combines numbers and alphabetic characters (letters) recognition.
|
|
69
|
+
*/
|
|
70
|
+
PT_RECOGNIZE_NUMBERS_AND_LETTERS = "RecognizeNumbersAndLetters",
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Represents a text recognition mode that combines numbers and uppercase letters recognition.
|
|
74
|
+
*/
|
|
75
|
+
PT_RECOGNIZE_NUMBERS_AND_UPPERCASE_LETTERS = "RecognizeNumbersAndUppercaseLetters",
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Represents a text recognition mode focused on recognizing uppercase letters.
|
|
79
|
+
*/
|
|
80
|
+
PT_RECOGNIZE_UPPERCASE_LETTERS = "RecognizeUppercaseLetters",
|
|
81
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {type TurboModule, TurboModuleRegistry } from "react-native";
|
|
2
|
-
export interface Spec extends TurboModule {
|
|
3
|
-
install():boolean;
|
|
4
|
-
startCapturing(templateName:string) : Promise<void>;
|
|
5
|
-
stopCapturing() : Promise<void>;
|
|
6
|
-
setInput(isaId: string) : void;
|
|
7
|
-
continueCRR() : void;
|
|
8
|
-
removeAllResultListeners(): void;
|
|
9
|
-
addFilter(filterId: string): void;
|
|
10
|
-
removeFilter(filterId: string): void;
|
|
11
|
-
resetSettings(): Promise<void>;
|
|
12
|
-
getSimplifiedSettings(templateName: string): Promise<unknown>;
|
|
13
|
-
updateSettings(settings: unknown, templateName: string): Promise<void>;
|
|
14
|
-
initSettings(content: string): Promise<void>;
|
|
15
|
-
initSettingsFromFile(file: string): Promise<void>;
|
|
16
|
-
outputSettings(templateName: string, includeDefaultValues: boolean): Promise<string | null>;
|
|
17
|
-
outputSettingsToFile(file: string, templateName: string, includeDefaultValues: boolean): Promise<void>;
|
|
18
|
-
|
|
19
|
-
addListener(type: string): void;
|
|
20
|
-
removeListeners(count: number): void;
|
|
21
|
-
addResultReceiver(type: string): void;
|
|
22
|
-
removeResultReceiver(type: string): void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default TurboModuleRegistry.get<Spec>("DynamsoftCaptureVisionRouterModule") as Spec | null;
|
|
1
|
+
import {type TurboModule, TurboModuleRegistry } from "react-native";
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
install():boolean;
|
|
4
|
+
startCapturing(templateName:string) : Promise<void>;
|
|
5
|
+
stopCapturing() : Promise<void>;
|
|
6
|
+
setInput(isaId: string) : void;
|
|
7
|
+
continueCRR() : void;
|
|
8
|
+
removeAllResultListeners(): void;
|
|
9
|
+
addFilter(filterId: string): void;
|
|
10
|
+
removeFilter(filterId: string): void;
|
|
11
|
+
resetSettings(): Promise<void>;
|
|
12
|
+
getSimplifiedSettings(templateName: string): Promise<unknown>;
|
|
13
|
+
updateSettings(settings: unknown, templateName: string): Promise<void>;
|
|
14
|
+
initSettings(content: string): Promise<void>;
|
|
15
|
+
initSettingsFromFile(file: string): Promise<void>;
|
|
16
|
+
outputSettings(templateName: string, includeDefaultValues: boolean): Promise<string | null>;
|
|
17
|
+
outputSettingsToFile(file: string, templateName: string, includeDefaultValues: boolean): Promise<void>;
|
|
18
|
+
|
|
19
|
+
addListener(type: string): void;
|
|
20
|
+
removeListeners(count: number): void;
|
|
21
|
+
addResultReceiver(type: string): void;
|
|
22
|
+
removeResultReceiver(type: string): void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default TurboModuleRegistry.get<Spec>("DynamsoftCaptureVisionRouterModule") as Spec | null;
|