dynamsoft-capture-vision-react-native 3.4.1200 → 3.4.3000
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 +5 -5
- package/README.md +62 -66
- 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/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/main/dysJniLibsFor81/debug/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/debug/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/debug/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/debug/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/release/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/release/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/release/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor81/release/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/debug/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/debug/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/debug/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/debug/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/release/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/release/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/release/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor82/release/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibsFor86/debug/arm64-v8a/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/debug/armeabi-v7a/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/debug/x86/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/debug/x86_64/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/release/arm64-v8a/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/release/armeabi-v7a/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/release/x86/librn_dys.so +3 -0
- package/android/src/main/dysJniLibsFor86/release/x86_64/librn_dys.so +3 -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,20 +1,20 @@
|
|
|
1
|
-
import {type TurboModule, TurboModuleRegistry} from "react-native";
|
|
2
|
-
export interface Spec extends TurboModule {
|
|
3
|
-
getConstants : () => {
|
|
4
|
-
versions: {
|
|
5
|
-
core: string
|
|
6
|
-
cvr: string
|
|
7
|
-
license: string
|
|
8
|
-
dce: string
|
|
9
|
-
dbr: string
|
|
10
|
-
dlr: string
|
|
11
|
-
ddn: string
|
|
12
|
-
dnn: string
|
|
13
|
-
utility: string
|
|
14
|
-
dcp: string
|
|
15
|
-
dcpd: string
|
|
16
|
-
dip: string
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export default TurboModuleRegistry.get<Spec>("DynamsoftVersionsModule") as Spec | null;
|
|
1
|
+
import {type TurboModule, TurboModuleRegistry} from "react-native";
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
getConstants : () => {
|
|
4
|
+
versions: {
|
|
5
|
+
core: string
|
|
6
|
+
cvr: string
|
|
7
|
+
license: string
|
|
8
|
+
dce: string
|
|
9
|
+
dbr: string
|
|
10
|
+
dlr: string
|
|
11
|
+
ddn: string
|
|
12
|
+
dnn: string
|
|
13
|
+
utility: string
|
|
14
|
+
dcp: string
|
|
15
|
+
dcpd: string
|
|
16
|
+
dip: string
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export default TurboModuleRegistry.get<Spec>("DynamsoftVersionsModule") as Spec | null;
|
package/src/VersionsModule.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {NativeModules} from 'react-native';
|
|
2
|
-
// @ts-ignore Check whether __turboModuleProxy exists, it may not
|
|
3
|
-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
|
|
4
|
-
|
|
5
|
-
export const DynamsoftVersions = isTurboModuleEnabled?
|
|
6
|
-
require("./NativeDynamsoftVersionsModule").default.getConstants().versions:
|
|
7
|
-
NativeModules.DynamsoftVersionsModule.versions
|
|
1
|
+
import {NativeModules} from 'react-native';
|
|
2
|
+
// @ts-ignore Check whether __turboModuleProxy exists, it may not
|
|
3
|
+
const isTurboModuleEnabled = global.__turboModuleProxy != null;
|
|
4
|
+
|
|
5
|
+
export const DynamsoftVersions = isTurboModuleEnabled?
|
|
6
|
+
require("./NativeDynamsoftVersionsModule").default.getConstants().versions:
|
|
7
|
+
NativeModules.DynamsoftVersionsModule.versions
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {IntermediateResultManager} from "../cvr";
|
|
2
|
-
|
|
3
|
-
export interface CapturedResultBase {
|
|
4
|
-
/**
|
|
5
|
-
* The hash ID of the original image.
|
|
6
|
-
* @see {@link IntermediateResultManager.getOriginalImage}
|
|
7
|
-
* */
|
|
8
|
-
originalImageHashId: string;
|
|
9
|
-
|
|
10
|
-
/**Error code associated with the capture result.*/
|
|
11
|
-
errorCode: number;
|
|
12
|
-
|
|
13
|
-
/**Error string providing details about the error.*/
|
|
14
|
-
errorMessage: string;
|
|
15
|
-
|
|
16
|
-
/**the rotation transformation matrix of the original image relative to the rotated image.*/
|
|
17
|
-
rotationTransformMatrix: Array<number>;
|
|
18
|
-
}
|
|
1
|
+
import {IntermediateResultManager} from "../cvr";
|
|
2
|
+
|
|
3
|
+
export interface CapturedResultBase {
|
|
4
|
+
/**
|
|
5
|
+
* The hash ID of the original image.
|
|
6
|
+
* @see {@link IntermediateResultManager.getOriginalImage}
|
|
7
|
+
* */
|
|
8
|
+
originalImageHashId: string;
|
|
9
|
+
|
|
10
|
+
/**Error code associated with the capture result.*/
|
|
11
|
+
errorCode: number;
|
|
12
|
+
|
|
13
|
+
/**Error string providing details about the error.*/
|
|
14
|
+
errorMessage: string;
|
|
15
|
+
|
|
16
|
+
/**the rotation transformation matrix of the original image relative to the rotated image.*/
|
|
17
|
+
rotationTransformMatrix: Array<number>;
|
|
18
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type {EnumCapturedResultItemType} from "./EnumCaptureResultItemType";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The CapturedResultItem class provides a common structure for representing different types of captured results.
|
|
5
|
-
* Each specific captured result item type will have its own implementation and additional properties specific to that type.
|
|
6
|
-
* */
|
|
7
|
-
export interface CapturedResultItem {
|
|
8
|
-
/**
|
|
9
|
-
* The type of the captured result item.
|
|
10
|
-
* - {@link EnumCapturedResultItemType}: An enum representing the specific type of the captured result.
|
|
11
|
-
*/
|
|
12
|
-
type: EnumCapturedResultItemType | number;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The name of the task that generated the result.
|
|
16
|
-
* */
|
|
17
|
-
taskName?: string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* the name of the TargetROIDef object which includes a task that generated the result.
|
|
21
|
-
* */
|
|
22
|
-
targetROIDefName?: string;
|
|
23
|
-
}
|
|
1
|
+
import type {EnumCapturedResultItemType} from "./EnumCaptureResultItemType";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The CapturedResultItem class provides a common structure for representing different types of captured results.
|
|
5
|
+
* Each specific captured result item type will have its own implementation and additional properties specific to that type.
|
|
6
|
+
* */
|
|
7
|
+
export interface CapturedResultItem {
|
|
8
|
+
/**
|
|
9
|
+
* The type of the captured result item.
|
|
10
|
+
* - {@link EnumCapturedResultItemType}: An enum representing the specific type of the captured result.
|
|
11
|
+
*/
|
|
12
|
+
type: EnumCapturedResultItemType | number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The name of the task that generated the result.
|
|
16
|
+
* */
|
|
17
|
+
taskName?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* the name of the TargetROIDef object which includes a task that generated the result.
|
|
21
|
+
* */
|
|
22
|
+
targetROIDefName?: string;
|
|
23
|
+
}
|
package/src/core/CoreModule.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {DynamsoftVersions} from '../VersionsModule'
|
|
2
|
-
import {Platform} from "react-native";
|
|
3
|
-
|
|
4
|
-
/** @hideconstructor */
|
|
5
|
-
export class CoreModule {
|
|
6
|
-
static getVersion(): string {
|
|
7
|
-
return '[' + Platform.OS + ']: ' + DynamsoftVersions.core
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
import {DynamsoftVersions} from '../VersionsModule'
|
|
2
|
+
import {Platform} from "react-native";
|
|
3
|
+
|
|
4
|
+
/** @hideconstructor */
|
|
5
|
+
export class CoreModule {
|
|
6
|
+
static getVersion(): string {
|
|
7
|
+
return '[' + Platform.OS + ']: ' + DynamsoftVersions.core
|
|
8
|
+
}
|
|
9
|
+
}
|
package/src/core/DSRect.tsx
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {CameraEnhancer} from "../dce";
|
|
2
|
-
/**
|
|
3
|
-
* The DSRect class represents a rectangle in 2D space,
|
|
4
|
-
* which contains four integer values that specify the top, left, right, and bottom edges of the rectangle.
|
|
5
|
-
* @see {@link CameraEnhancer.setScanRegion}
|
|
6
|
-
* */
|
|
7
|
-
export interface DSRect {
|
|
8
|
-
/**
|
|
9
|
-
* Y coordinate of the top border of the region.
|
|
10
|
-
*/
|
|
11
|
-
top: number;
|
|
12
|
-
/**
|
|
13
|
-
* Y coordinate of the buttom border of the region.
|
|
14
|
-
*/
|
|
15
|
-
bottom: number;
|
|
16
|
-
/**
|
|
17
|
-
* X coordinate of the right border of the region.
|
|
18
|
-
*/
|
|
19
|
-
right: number;
|
|
20
|
-
/**
|
|
21
|
-
* X coordinate of the left border of the region.
|
|
22
|
-
*/
|
|
23
|
-
left: number;
|
|
24
|
-
/**
|
|
25
|
-
* 1/True: the coordinates are measured by percentage.
|
|
26
|
-
* 0/False: the coordinates are measured by pixel distance.
|
|
27
|
-
*/
|
|
28
|
-
measuredInPercentage: number | boolean;
|
|
29
|
-
}
|
|
1
|
+
import {CameraEnhancer} from "../dce";
|
|
2
|
+
/**
|
|
3
|
+
* The DSRect class represents a rectangle in 2D space,
|
|
4
|
+
* which contains four integer values that specify the top, left, right, and bottom edges of the rectangle.
|
|
5
|
+
* @see {@link CameraEnhancer.setScanRegion}
|
|
6
|
+
* */
|
|
7
|
+
export interface DSRect {
|
|
8
|
+
/**
|
|
9
|
+
* Y coordinate of the top border of the region.
|
|
10
|
+
*/
|
|
11
|
+
top: number;
|
|
12
|
+
/**
|
|
13
|
+
* Y coordinate of the buttom border of the region.
|
|
14
|
+
*/
|
|
15
|
+
bottom: number;
|
|
16
|
+
/**
|
|
17
|
+
* X coordinate of the right border of the region.
|
|
18
|
+
*/
|
|
19
|
+
right: number;
|
|
20
|
+
/**
|
|
21
|
+
* X coordinate of the left border of the region.
|
|
22
|
+
*/
|
|
23
|
+
left: number;
|
|
24
|
+
/**
|
|
25
|
+
* 1/True: the coordinates are measured by percentage.
|
|
26
|
+
* 0/False: the coordinates are measured by pixel distance.
|
|
27
|
+
*/
|
|
28
|
+
measuredInPercentage: number | boolean;
|
|
29
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import type {BarcodeResultItem} from "../dbr";
|
|
2
|
-
import type {TextLineResultItem} from "../dlr";
|
|
3
|
-
import type {DetectedQuadResultItem, EnhancedImageResultItem, DeskewedImageResultItem} from "../ddn";
|
|
4
|
-
import type {ParsedResultItem} from "../dcp";
|
|
5
|
-
|
|
6
|
-
/**{@link BarcodeResultItem} {@link TextLineResultItem} {@link DetectedQuadResultItem} {@link DeskewedImageResultItem} {@link ParsedResultItem} {@link EnhancedImageResultItem}* */
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Defines the various categories of items that can be recognized and captured.
|
|
10
|
-
* */
|
|
11
|
-
export enum EnumCapturedResultItemType {
|
|
12
|
-
/**
|
|
13
|
-
* Not use for react-native edition
|
|
14
|
-
* */
|
|
15
|
-
CRIT_ORIGINAL_IMAGE = 0x1,
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of the CapturedResultItem is "barcode".
|
|
19
|
-
* @see {@link BarcodeResultItem}
|
|
20
|
-
* */
|
|
21
|
-
CRIT_BARCODE = 0x2,
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The type of the CapturedResultItem is "text line".
|
|
25
|
-
* @see {@link TextLineResultItem}
|
|
26
|
-
* */
|
|
27
|
-
CRIT_TEXT_LINE = 0x4,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The type of the CapturedResultItem is "detected quad".
|
|
31
|
-
* @see {@link DetectedQuadResultItem}
|
|
32
|
-
* */
|
|
33
|
-
CRIT_DETECTED_QUAD = 0x8,
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The type of the CapturedResultItem is "deskewed image".
|
|
37
|
-
* @see {@link DeskewedImageResultItem}
|
|
38
|
-
* */
|
|
39
|
-
CRIT_DESKEWED_IMAGE = 0x10,
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The type of the CapturedResultItem is "parsed result".
|
|
43
|
-
* @see {@link ParsedResultItem}
|
|
44
|
-
* */
|
|
45
|
-
CRIT_PARSED_RESULT = 0x20,
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The type of the CapturedResultItem is "enhanced image".
|
|
49
|
-
* @see {@link EnhancedImageResultItem}
|
|
50
|
-
* */
|
|
51
|
-
CRIT_ENHANCED_IMAGE = 0x40,
|
|
52
|
-
}
|
|
1
|
+
import type {BarcodeResultItem} from "../dbr";
|
|
2
|
+
import type {TextLineResultItem} from "../dlr";
|
|
3
|
+
import type {DetectedQuadResultItem, EnhancedImageResultItem, DeskewedImageResultItem} from "../ddn";
|
|
4
|
+
import type {ParsedResultItem} from "../dcp";
|
|
5
|
+
|
|
6
|
+
/**{@link BarcodeResultItem} {@link TextLineResultItem} {@link DetectedQuadResultItem} {@link DeskewedImageResultItem} {@link ParsedResultItem} {@link EnhancedImageResultItem}* */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Defines the various categories of items that can be recognized and captured.
|
|
10
|
+
* */
|
|
11
|
+
export enum EnumCapturedResultItemType {
|
|
12
|
+
/**
|
|
13
|
+
* Not use for react-native edition
|
|
14
|
+
* */
|
|
15
|
+
CRIT_ORIGINAL_IMAGE = 0x1,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The type of the CapturedResultItem is "barcode".
|
|
19
|
+
* @see {@link BarcodeResultItem}
|
|
20
|
+
* */
|
|
21
|
+
CRIT_BARCODE = 0x2,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The type of the CapturedResultItem is "text line".
|
|
25
|
+
* @see {@link TextLineResultItem}
|
|
26
|
+
* */
|
|
27
|
+
CRIT_TEXT_LINE = 0x4,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The type of the CapturedResultItem is "detected quad".
|
|
31
|
+
* @see {@link DetectedQuadResultItem}
|
|
32
|
+
* */
|
|
33
|
+
CRIT_DETECTED_QUAD = 0x8,
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The type of the CapturedResultItem is "deskewed image".
|
|
37
|
+
* @see {@link DeskewedImageResultItem}
|
|
38
|
+
* */
|
|
39
|
+
CRIT_DESKEWED_IMAGE = 0x10,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The type of the CapturedResultItem is "parsed result".
|
|
43
|
+
* @see {@link ParsedResultItem}
|
|
44
|
+
* */
|
|
45
|
+
CRIT_PARSED_RESULT = 0x20,
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The type of the CapturedResultItem is "enhanced image".
|
|
49
|
+
* @see {@link EnhancedImageResultItem}
|
|
50
|
+
* */
|
|
51
|
+
CRIT_ENHANCED_IMAGE = 0x40,
|
|
52
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enumerates the different ways color channels can be utilized in image processing.
|
|
3
|
-
* This allows for flexible image analysis and manipulation by specifying how color data should be handled.
|
|
4
|
-
*
|
|
5
|
-
* @see {@link ImageSourceAdapter.getColourChannelUsageType}
|
|
6
|
-
* @see {@link ImageSourceAdapter.setColourChannelUsageType}
|
|
7
|
-
* */
|
|
8
|
-
export enum EnumColourChannelUsageType {
|
|
9
|
-
/** Automatic color channel usage determination based on image pixel format and scene. */
|
|
10
|
-
CCUT_AUTO = 0,
|
|
11
|
-
|
|
12
|
-
/** Automatic color channel usage determination based on image pixel format and scene. */
|
|
13
|
-
CCUT_FULL_CHANNEL = 1,
|
|
14
|
-
|
|
15
|
-
/** Use only the Y (luminance) channel for processing in images represented in the NV21 format. */
|
|
16
|
-
CCUT_Y_CHANNEL_ONLY = 2,
|
|
17
|
-
|
|
18
|
-
/** Use only the red channel for processing in RGB images.*/
|
|
19
|
-
CCUT_RGB_R_CHANNEL_ONLY = 3,
|
|
20
|
-
|
|
21
|
-
/** Use only the green channel for processing in RGB images.*/
|
|
22
|
-
CCUT_RGB_G_CHANNEL_ONLY = 4,
|
|
23
|
-
|
|
24
|
-
/** Use only the blue channel for processing in RGB images.*/
|
|
25
|
-
CCUT_RGB_B_CHANNEL_ONLY = 5
|
|
26
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Enumerates the different ways color channels can be utilized in image processing.
|
|
3
|
+
* This allows for flexible image analysis and manipulation by specifying how color data should be handled.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link ImageSourceAdapter.getColourChannelUsageType}
|
|
6
|
+
* @see {@link ImageSourceAdapter.setColourChannelUsageType}
|
|
7
|
+
* */
|
|
8
|
+
export enum EnumColourChannelUsageType {
|
|
9
|
+
/** Automatic color channel usage determination based on image pixel format and scene. */
|
|
10
|
+
CCUT_AUTO = 0,
|
|
11
|
+
|
|
12
|
+
/** Automatic color channel usage determination based on image pixel format and scene. */
|
|
13
|
+
CCUT_FULL_CHANNEL = 1,
|
|
14
|
+
|
|
15
|
+
/** Use only the Y (luminance) channel for processing in images represented in the NV21 format. */
|
|
16
|
+
CCUT_Y_CHANNEL_ONLY = 2,
|
|
17
|
+
|
|
18
|
+
/** Use only the red channel for processing in RGB images.*/
|
|
19
|
+
CCUT_RGB_R_CHANNEL_ONLY = 3,
|
|
20
|
+
|
|
21
|
+
/** Use only the green channel for processing in RGB images.*/
|
|
22
|
+
CCUT_RGB_G_CHANNEL_ONLY = 4,
|
|
23
|
+
|
|
24
|
+
/** Use only the blue channel for processing in RGB images.*/
|
|
25
|
+
CCUT_RGB_B_CHANNEL_ONLY = 5
|
|
26
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {type DetectedQuadResultItem, type DeskewedImageResultItem} from "../ddn";
|
|
2
|
-
import {CaptureVisionRouter} from "../cvr";
|
|
3
|
-
import {MultiFrameResultCrossFilter} from "../utility";
|
|
4
|
-
/**
|
|
5
|
-
* CrossVerificationStatus describes the status of the captured results.
|
|
6
|
-
* <p>Code Snippet:</p>
|
|
7
|
-
*
|
|
8
|
-
* ```
|
|
9
|
-
* let router = CaptureVisionRouter.getInstance()
|
|
10
|
-
* let filter = new MultiFrameResultCrossFilter()
|
|
11
|
-
* filter.enableResultCrossVerification(EnumCapturedResultItemType.CRIT_DETECTED_QUAD, true)
|
|
12
|
-
* router.addFilter(filter)
|
|
13
|
-
*
|
|
14
|
-
* router.addResultReceiver({
|
|
15
|
-
* onProcessedDocumentResultReceived: result => {
|
|
16
|
-
* if(result.detectedQuadResultItems && result.detectedQuadResultItems.length > 0) {
|
|
17
|
-
* //Because result cross verification of DETECT_QUAD is enabled,
|
|
18
|
-
* //crossVerificationStatus of item will be CVS_PASSED or CVS_FAILED.
|
|
19
|
-
* let crossVerificationStatus = result.detectedQuadResultItems[0].crossVerificationStatus
|
|
20
|
-
* }
|
|
21
|
-
* },
|
|
22
|
-
* })
|
|
23
|
-
* //...
|
|
24
|
-
* router.startCapturing(EnumPresetTemplate.PT_DETECT_DOCUMENT_BOUNDARIES)
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @remarks If {@link CaptureVisionRouter} doesn't add {@link MultiFrameResultCrossFilter} via {@link CaptureVisionRouter.addFilter}
|
|
28
|
-
* or added {@link MultiFrameResultCrossFilter} doesn't enable verification for the corresponding type,
|
|
29
|
-
* the crossVerificationStatus property of the item for that type will always remain {@link CVS_NOT_VERIFIED}.
|
|
30
|
-
* <p>
|
|
31
|
-
* Currently, only {@link DetectedQuadResultItem} and {@link DeskewedImageResultItem} have the crossVerificationStatus property.
|
|
32
|
-
*
|
|
33
|
-
* @see {@link MultiFrameResultCrossFilter.enableResultCrossVerification}
|
|
34
|
-
* @see {@link DetectedQuadResultItem.crossVerificationStatus}
|
|
35
|
-
* @see {@link DeskewedImageResultItem.crossVerificationStatus}
|
|
36
|
-
* */
|
|
37
|
-
export enum EnumCrossVerificationStatus {
|
|
38
|
-
/** The cross verification has not been performed yet. */
|
|
39
|
-
CVS_NOT_VERIFIED = 0,
|
|
40
|
-
|
|
41
|
-
/** The cross verification has been passed successfully. */
|
|
42
|
-
CVS_PASSED = 1,
|
|
43
|
-
|
|
44
|
-
/** The cross verification has failed. */
|
|
45
|
-
CVS_FAILED = 2
|
|
46
|
-
}
|
|
1
|
+
import {type DetectedQuadResultItem, type DeskewedImageResultItem} from "../ddn";
|
|
2
|
+
import {CaptureVisionRouter} from "../cvr";
|
|
3
|
+
import {MultiFrameResultCrossFilter} from "../utility";
|
|
4
|
+
/**
|
|
5
|
+
* CrossVerificationStatus describes the status of the captured results.
|
|
6
|
+
* <p>Code Snippet:</p>
|
|
7
|
+
*
|
|
8
|
+
* ```
|
|
9
|
+
* let router = CaptureVisionRouter.getInstance()
|
|
10
|
+
* let filter = new MultiFrameResultCrossFilter()
|
|
11
|
+
* filter.enableResultCrossVerification(EnumCapturedResultItemType.CRIT_DETECTED_QUAD, true)
|
|
12
|
+
* router.addFilter(filter)
|
|
13
|
+
*
|
|
14
|
+
* router.addResultReceiver({
|
|
15
|
+
* onProcessedDocumentResultReceived: result => {
|
|
16
|
+
* if(result.detectedQuadResultItems && result.detectedQuadResultItems.length > 0) {
|
|
17
|
+
* //Because result cross verification of DETECT_QUAD is enabled,
|
|
18
|
+
* //crossVerificationStatus of item will be CVS_PASSED or CVS_FAILED.
|
|
19
|
+
* let crossVerificationStatus = result.detectedQuadResultItems[0].crossVerificationStatus
|
|
20
|
+
* }
|
|
21
|
+
* },
|
|
22
|
+
* })
|
|
23
|
+
* //...
|
|
24
|
+
* router.startCapturing(EnumPresetTemplate.PT_DETECT_DOCUMENT_BOUNDARIES)
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @remarks If {@link CaptureVisionRouter} doesn't add {@link MultiFrameResultCrossFilter} via {@link CaptureVisionRouter.addFilter}
|
|
28
|
+
* or added {@link MultiFrameResultCrossFilter} doesn't enable verification for the corresponding type,
|
|
29
|
+
* the crossVerificationStatus property of the item for that type will always remain {@link CVS_NOT_VERIFIED}.
|
|
30
|
+
* <p>
|
|
31
|
+
* Currently, only {@link DetectedQuadResultItem} and {@link DeskewedImageResultItem} have the crossVerificationStatus property.
|
|
32
|
+
*
|
|
33
|
+
* @see {@link MultiFrameResultCrossFilter.enableResultCrossVerification}
|
|
34
|
+
* @see {@link DetectedQuadResultItem.crossVerificationStatus}
|
|
35
|
+
* @see {@link DeskewedImageResultItem.crossVerificationStatus}
|
|
36
|
+
* */
|
|
37
|
+
export enum EnumCrossVerificationStatus {
|
|
38
|
+
/** The cross verification has not been performed yet. */
|
|
39
|
+
CVS_NOT_VERIFIED = 0,
|
|
40
|
+
|
|
41
|
+
/** The cross verification has been passed successfully. */
|
|
42
|
+
CVS_PASSED = 1,
|
|
43
|
+
|
|
44
|
+
/** The cross verification has failed. */
|
|
45
|
+
CVS_FAILED = 2
|
|
46
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import type {SimplifiedBarcodeReaderSettings} from "../dbr";
|
|
2
|
-
import type {SimplifiedLabelRecognizerSettings} from "../dlr";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Specifies the method employed to enhance images in grayscale.
|
|
6
|
-
* @see {@link SimplifiedBarcodeReaderSettings.grayscaleEnhancementModes}
|
|
7
|
-
* @see {@link SimplifiedLabelRecognizerSettings.grayscaleEnhancementModes}
|
|
8
|
-
*/
|
|
9
|
-
export enum EnumGrayscaleEnhancementMode {
|
|
10
|
-
GEM_END = -1,
|
|
11
|
-
/**
|
|
12
|
-
* Disables any grayscale image preprocessing. Selecting this mode skips the preprocessing step,
|
|
13
|
-
* passing the image through to subsequent operations without modification.
|
|
14
|
-
*/
|
|
15
|
-
GEM_SKIP = 0x0,
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Automatic selection of grayscale enhancement mode. Currently, not supported.
|
|
19
|
-
* Future implementations may automatically choose the most suitable enhancement based on image analysis.
|
|
20
|
-
*/
|
|
21
|
-
GEM_AUTO = 0x1,
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Uses the original, unprocessed image for subsequent operations. This mode is selected when no specific
|
|
25
|
-
* grayscale enhancement is required, maintaining the image in its natural state.
|
|
26
|
-
*/
|
|
27
|
-
GEM_GENERAL = 0x2,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Applies a grayscale equalization algorithm to the image, enhancing contrast and detail in gray level.
|
|
31
|
-
* Suitable for images with poor contrast.
|
|
32
|
-
*/
|
|
33
|
-
GEM_GRAY_EQUALIZE = 0x4,
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Implements a grayscale smoothing algorithm to reduce noise and smooth the image.
|
|
37
|
-
* This can be beneficial for images with high levels of grain or noise.
|
|
38
|
-
*/
|
|
39
|
-
GEM_GRAY_SMOOTH = 0x8,
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Enhances the image by applying both sharpening and smoothing algorithms. This mode aims to increase
|
|
43
|
-
* clarity and detail while reducing noise, offering a balanced approach to image preprocessing.
|
|
44
|
-
*/
|
|
45
|
-
GEM_SHARPEN_SMOOTH = 0x10
|
|
46
|
-
}
|
|
1
|
+
import type {SimplifiedBarcodeReaderSettings} from "../dbr";
|
|
2
|
+
import type {SimplifiedLabelRecognizerSettings} from "../dlr";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the method employed to enhance images in grayscale.
|
|
6
|
+
* @see {@link SimplifiedBarcodeReaderSettings.grayscaleEnhancementModes}
|
|
7
|
+
* @see {@link SimplifiedLabelRecognizerSettings.grayscaleEnhancementModes}
|
|
8
|
+
*/
|
|
9
|
+
export enum EnumGrayscaleEnhancementMode {
|
|
10
|
+
GEM_END = -1,
|
|
11
|
+
/**
|
|
12
|
+
* Disables any grayscale image preprocessing. Selecting this mode skips the preprocessing step,
|
|
13
|
+
* passing the image through to subsequent operations without modification.
|
|
14
|
+
*/
|
|
15
|
+
GEM_SKIP = 0x0,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Automatic selection of grayscale enhancement mode. Currently, not supported.
|
|
19
|
+
* Future implementations may automatically choose the most suitable enhancement based on image analysis.
|
|
20
|
+
*/
|
|
21
|
+
GEM_AUTO = 0x1,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Uses the original, unprocessed image for subsequent operations. This mode is selected when no specific
|
|
25
|
+
* grayscale enhancement is required, maintaining the image in its natural state.
|
|
26
|
+
*/
|
|
27
|
+
GEM_GENERAL = 0x2,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Applies a grayscale equalization algorithm to the image, enhancing contrast and detail in gray level.
|
|
31
|
+
* Suitable for images with poor contrast.
|
|
32
|
+
*/
|
|
33
|
+
GEM_GRAY_EQUALIZE = 0x4,
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Implements a grayscale smoothing algorithm to reduce noise and smooth the image.
|
|
37
|
+
* This can be beneficial for images with high levels of grain or noise.
|
|
38
|
+
*/
|
|
39
|
+
GEM_GRAY_SMOOTH = 0x8,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Enhances the image by applying both sharpening and smoothing algorithms. This mode aims to increase
|
|
43
|
+
* clarity and detail while reducing noise, offering a balanced approach to image preprocessing.
|
|
44
|
+
*/
|
|
45
|
+
GEM_SHARPEN_SMOOTH = 0x10
|
|
46
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import type {SimplifiedBarcodeReaderSettings} from "../dbr";
|
|
2
|
-
import type {SimplifiedLabelRecognizerSettings} from "../dlr";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Specifies the method employed to transform images in grayscale.
|
|
6
|
-
* @see {@link SimplifiedBarcodeReaderSettings.grayscaleEnhancementModes}
|
|
7
|
-
* @see {@link SimplifiedLabelRecognizerSettings.grayscaleEnhancementModes}
|
|
8
|
-
* */
|
|
9
|
-
export enum EnumGrayscaleTransformationMode {
|
|
10
|
-
GTM_END = -1,
|
|
11
|
-
/**
|
|
12
|
-
* Bypasses grayscale transformation, leaving the image in its current state without any modification to its grayscale values.
|
|
13
|
-
* This mode is selected when no alteration of the grayscale data is desired, passing the image through to subsequent operations without modification.
|
|
14
|
-
*/
|
|
15
|
-
GTM_SKIP = 0x0,
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Applies an inversion to the grayscale values of the image, effectively transforming light elements to dark and vice versa.
|
|
19
|
-
* This mode is particularly useful for images with light text on dark backgrounds, enhancing visibility for further processing.
|
|
20
|
-
*/
|
|
21
|
-
GTM_INVERTED = 0x1,
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Maintains the original grayscale values of the image without any transformation. This mode is suited for images with
|
|
25
|
-
* dark elements on light backgrounds, ensuring the natural contrast and detail are preserved for subsequent analysis.
|
|
26
|
-
*/
|
|
27
|
-
GTM_ORIGINAL = 0x2,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Delegates the choice of grayscale transformation to the library's algorithm, which automatically determines the most
|
|
31
|
-
* suitable transformation based on the image's characteristics. This mode is beneficial when the optimal transformation
|
|
32
|
-
* is not known in advance or varies across different images.
|
|
33
|
-
*/
|
|
34
|
-
GTM_AUTO = 0x4
|
|
35
|
-
}
|
|
1
|
+
import type {SimplifiedBarcodeReaderSettings} from "../dbr";
|
|
2
|
+
import type {SimplifiedLabelRecognizerSettings} from "../dlr";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the method employed to transform images in grayscale.
|
|
6
|
+
* @see {@link SimplifiedBarcodeReaderSettings.grayscaleEnhancementModes}
|
|
7
|
+
* @see {@link SimplifiedLabelRecognizerSettings.grayscaleEnhancementModes}
|
|
8
|
+
* */
|
|
9
|
+
export enum EnumGrayscaleTransformationMode {
|
|
10
|
+
GTM_END = -1,
|
|
11
|
+
/**
|
|
12
|
+
* Bypasses grayscale transformation, leaving the image in its current state without any modification to its grayscale values.
|
|
13
|
+
* This mode is selected when no alteration of the grayscale data is desired, passing the image through to subsequent operations without modification.
|
|
14
|
+
*/
|
|
15
|
+
GTM_SKIP = 0x0,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Applies an inversion to the grayscale values of the image, effectively transforming light elements to dark and vice versa.
|
|
19
|
+
* This mode is particularly useful for images with light text on dark backgrounds, enhancing visibility for further processing.
|
|
20
|
+
*/
|
|
21
|
+
GTM_INVERTED = 0x1,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Maintains the original grayscale values of the image without any transformation. This mode is suited for images with
|
|
25
|
+
* dark elements on light backgrounds, ensuring the natural contrast and detail are preserved for subsequent analysis.
|
|
26
|
+
*/
|
|
27
|
+
GTM_ORIGINAL = 0x2,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Delegates the choice of grayscale transformation to the library's algorithm, which automatically determines the most
|
|
31
|
+
* suitable transformation based on the image's characteristics. This mode is beneficial when the optimal transformation
|
|
32
|
+
* is not known in advance or varies across different images.
|
|
33
|
+
*/
|
|
34
|
+
GTM_AUTO = 0x4
|
|
35
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export enum EnumImageFileFormat {
|
|
2
|
-
IFF_JPEG = 0,
|
|
3
|
-
IFF_PNG = 1,
|
|
4
|
-
IFF_BMP = 2,
|
|
5
|
-
IFF_PDF = 3
|
|
6
|
-
}
|
|
1
|
+
export enum EnumImageFileFormat {
|
|
2
|
+
IFF_JPEG = 0,
|
|
3
|
+
IFF_PNG = 1,
|
|
4
|
+
IFF_BMP = 2,
|
|
5
|
+
IFF_PDF = 3
|
|
6
|
+
}
|