dynamsoft-capture-vision-react-native 2.4.2000-alpha.2 → 2.6.1002

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.
Files changed (99) hide show
  1. package/LICENSE +5 -0
  2. package/README.md +32 -4
  3. package/android/build.gradle +1 -5
  4. package/android/src/main/java/com/dynamsoft/reactnativelib/dce/CameraEnhancerModuleImpl.kt +73 -64
  5. package/android/src/main/java/com/dynamsoft/reactnativelib/dce/ImageEditorViewManagerImpl.kt +2 -18
  6. package/android/src/main/java/com/dynamsoft/reactnativelib/dce/ImageEditorViewModuleImpl.kt +49 -51
  7. package/android/src/main/java/com/dynamsoft/reactnativelib/dce/RNImageEditorView.kt +19 -0
  8. package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDDN.kt +2 -0
  9. package/android/src/newarch/com/dynamsoft/reactnativelib/CameraViewManager.kt +6 -0
  10. package/dynamsoft-capture-vision-react-native.podspec +3 -5
  11. package/ios/CPP/RNDynamsoft+JSI.h +19 -0
  12. package/ios/CPP/RNDynamsoft+JSI.mm +145 -0
  13. package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/RNDynamsoft+Json.h +12 -5
  14. package/ios/{RNDynamsoftCaptureVision/CPP/RNDynamsoft+Json.mm → CPP/RNDynamsoft+Json.m} +6 -124
  15. package/ios/{RNDynamsoftCaptureVision/RNDynamsoftCaptureVisionRouter.mm → RNDynamsoftCaptureVisionRouter.mm} +1 -0
  16. package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageEditorViewManager.mm → RNDynamsoftImageEditorViewManager.mm} +5 -1
  17. package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageManager.mm → RNDynamsoftImageManager.mm} +6 -2
  18. package/package.json +2 -2
  19. package/src/core/CapturedResultItem.tsx +18 -2
  20. package/src/core/CompletionListener.tsx +4 -3
  21. package/src/core/CoreModule.tsx +3 -3
  22. package/src/core/DSRect.tsx +28 -21
  23. package/src/core/EnumCaptureResultItemType.tsx +38 -7
  24. package/src/core/EnumColourChannelUsageType.tsx +25 -7
  25. package/src/core/EnumCrossVerificationStatus.tsx +43 -0
  26. package/src/core/EnumGrayscaleEnhancementMode.tsx +40 -7
  27. package/src/core/EnumGrayscaleTransformationMode.tsx +29 -5
  28. package/src/core/EnumPixelFormat.tsx +37 -32
  29. package/src/core/ImageData.tsx +51 -4
  30. package/src/core/ImageSourceAdapter.tsx +132 -72
  31. package/src/core/NativeDynamsoftImageSourceAdapterModule.tsx +24 -13
  32. package/src/core/Point.tsx +12 -9
  33. package/src/core/Quadrilateral.tsx +9 -5
  34. package/src/core/Rect.tsx +19 -16
  35. package/src/cvr/CaptureVisionRouter.tsx +571 -279
  36. package/src/cvr/CapturedResult.tsx +117 -76
  37. package/src/cvr/CapturedResultFilter.tsx +7 -0
  38. package/src/cvr/CapturedResultReceiver.tsx +59 -3
  39. package/src/cvr/EnumPresetTemplate.tsx +66 -1
  40. package/src/cvr/SimplifiedCaptureVisionSettings.tsx +45 -0
  41. package/src/dbr/BarcodeResultItem.tsx +31 -1
  42. package/src/dbr/DecodedBarcodesResult.tsx +18 -0
  43. package/src/dbr/EnumBarcodeFormat.tsx +61 -50
  44. package/src/dbr/EnumDeblurMode.tsx +28 -12
  45. package/src/dbr/EnumLocalizationMode.tsx +15 -1
  46. package/src/dbr/SimplifiedBarcodeReaderSettings.tsx +72 -12
  47. package/src/dce/CameraEnhancer.tsx +211 -89
  48. package/src/dce/CameraView.tsx +18 -1
  49. package/src/dce/DynamsoftCameraViewNativeComponent.ts +43 -0
  50. package/src/dce/EnumCameraPosition.tsx +3 -0
  51. package/src/dce/EnumDrawingLayerId.tsx +11 -0
  52. package/src/dce/EnumEnhancedFeatures.tsx +23 -7
  53. package/src/dce/EnumFocusMode.tsx +2 -0
  54. package/src/dce/FeedBack.tsx +9 -0
  55. package/src/dce/ImageEditorView.tsx +35 -2
  56. package/src/dcp/EnumMappingStatus.tsx +12 -3
  57. package/src/dcp/EnumValidationStatus.tsx +12 -3
  58. package/src/dcp/ParsedResult.tsx +16 -0
  59. package/src/dcp/ParsedResultItem.tsx +35 -0
  60. package/src/ddn/DetectedQuadResultItem.tsx +23 -0
  61. package/src/ddn/DetectedQuadsResult.tsx +20 -1
  62. package/src/ddn/EnumImageColourMode.tsx +9 -0
  63. package/src/ddn/NormalizedImageResultItem.tsx +25 -0
  64. package/src/ddn/NormalizedImagesResult.tsx +17 -1
  65. package/src/ddn/SimplifiedDocumentNormalizerSettings.tsx +38 -2
  66. package/src/dlr/CharacterResult.tsx +17 -0
  67. package/src/dlr/RecognizedTextLinesResult.tsx +23 -1
  68. package/src/dlr/SimplifiedLabelRecognizerSettings.tsx +21 -0
  69. package/src/dlr/TextLineResultItem.tsx +26 -0
  70. package/src/license/LicenseManager.tsx +19 -0
  71. package/src/utility/ImageManager.tsx +23 -0
  72. package/src/utility/MultiFrameResultCrossFilter.tsx +99 -6
  73. package/android/.gitignore +0 -4
  74. package/ios/ReactNativeDcv.xcodeproj/project.pbxproj +0 -390
  75. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/DSImageData+HostObject.h +0 -0
  76. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/DSImageData+HostObject.mm +0 -0
  77. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/ImageDataHostObject.cpp +0 -0
  78. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/ImageDataHostObject.hpp +0 -0
  79. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/MutableRawBuffer.cpp +0 -0
  80. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/MutableRawBuffer.hpp +0 -0
  81. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/YeetJSIUtils.h +0 -0
  82. /package/ios/{RNDynamsoftCaptureVision/CPP → CPP}/YeetJSIUtils.mm +0 -0
  83. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftCameraView.h → RNDynamsoftCameraView.h} +0 -0
  84. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftCameraView.m → RNDynamsoftCameraView.m} +0 -0
  85. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftCameraViewManager.h → RNDynamsoftCameraViewManager.h} +0 -0
  86. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftCameraViewManager.m → RNDynamsoftCameraViewManager.m} +0 -0
  87. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftCaptureVisionRouter.h → RNDynamsoftCaptureVisionRouter.h} +0 -0
  88. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageEditorView.h → RNDynamsoftImageEditorView.h} +0 -0
  89. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageEditorView.m → RNDynamsoftImageEditorView.m} +0 -0
  90. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageEditorViewManager.h → RNDynamsoftImageEditorViewManager.h} +0 -0
  91. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageManager.h → RNDynamsoftImageManager.h} +0 -0
  92. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageSourceAdapter.h → RNDynamsoftImageSourceAdapter.h} +0 -0
  93. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftImageSourceAdapter.mm → RNDynamsoftImageSourceAdapter.mm} +0 -0
  94. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftLicense.h → RNDynamsoftLicense.h} +0 -0
  95. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftLicense.m → RNDynamsoftLicense.m} +0 -0
  96. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftMultiCrossFilter.h → RNDynamsoftMultiCrossFilter.h} +0 -0
  97. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftMultiCrossFilter.m → RNDynamsoftMultiCrossFilter.m} +0 -0
  98. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftVersions.h → RNDynamsoftVersions.h} +0 -0
  99. /package/ios/{RNDynamsoftCaptureVision/RNDynamsoftVersions.m → RNDynamsoftVersions.m} +0 -0
@@ -3,102 +3,143 @@ import type {BarcodeResultItem, DecodedBarcodesResult} from "../dbr";
3
3
  import type {ParsedResult, ParsedResultItem} from "../dcp";
4
4
  import type {RecognizedTextLinesResult, TextLineResultItem} from "../dlr";
5
5
  import type {
6
- DetectedQuadResultItem,
7
- DetectedQuadsResult,
8
- NormalizedImageResultItem,
9
- NormalizedImagesResult
6
+ DetectedQuadResultItem,
7
+ DetectedQuadsResult,
8
+ NormalizedImageResultItem,
9
+ NormalizedImagesResult
10
10
  } from "../ddn";
11
11
 
12
+ /**
13
+ * The CapturedResult interface describes the basic structure of a result object returned by Dynamsoft Capture Vision Router({@link CaptureVisionRouter}).
14
+ *
15
+ * @remarks Depending on the functional module that generated the result item, the interface may vary:
16
+ * - dynamsoft-barcode-reader: {@link DecodedBarcodesResult}
17
+ * - dynamsoft-label-recognizer: {@link RecognizedTextLinesResult}
18
+ * - dynamsoft-document-normalizer: {@link DetectedQuadsResult} or {@link NormalizedImagesResult}
19
+ * - dynamsoft-code-parser: {@link ParsedResult}
20
+ *
21
+ * @see CapturedResultReceiver.onCapturedResultReceived
22
+ * */
12
23
  export interface CapturedResult {
13
- originalImageHashId: string;
14
- items?: Array<CapturedResultItem>;
15
- errorCode: number;
16
- errorMessage: string;
17
- rotationTransformMatrix: Array<number>;
18
- decodedBarcodesResult?: DecodedBarcodesResult;
19
- recognizedTextLinesResult?:RecognizedTextLinesResult;
20
- detectedQuadsResult?:DetectedQuadsResult;
21
- normalizedImagesResult?:NormalizedImagesResult;
22
- parsedResult?: ParsedResult;
24
+ /**
25
+ * The hash ID of the original image.
26
+ * @see IntermediateResultManager.getOriginalImage
27
+ * */
28
+ originalImageHashId: string;
29
+
30
+ /**
31
+ * An array of CapturedResultItem objects representing the captured result items.
32
+ * */
33
+ items?: Array<CapturedResultItem>;
34
+
35
+ /**Error code associated with the capture result.*/
36
+ errorCode: number;
37
+
38
+ /**Error string providing details about the error.*/
39
+ errorMessage: string;
40
+
41
+ /**the rotation transformation matrix of the original image relative to the rotated image.*/
42
+ rotationTransformMatrix: Array<number>;
43
+
44
+ /**Get a {@link DecodedBarcodesResult} object that contains all the {@link BarcodeResultItem} in this CapturedResult.*/
45
+ decodedBarcodesResult?: DecodedBarcodesResult;
46
+
47
+ /**Get a {@link RecognizedTextLinesResult} object that contains all the {@link TextLineResultItem} in this CapturedResult.*/
48
+ recognizedTextLinesResult?: RecognizedTextLinesResult;
49
+
50
+ /**Get a {@link DetectedQuadsResult} object that contains all the {@link DetectedQuadResultItem} in this CapturedResult.*/
51
+ detectedQuadsResult?: DetectedQuadsResult;
52
+
53
+ /**Get a {@link NormalizedImagesResult} object that contains all the {@link NormalizedImageResultItem} in this CapturedResult.*/
54
+ normalizedImagesResult?: NormalizedImagesResult;
55
+
56
+ /**Get a {@link ParsedResult} object that contains all the {@link ParsedResultItem} in this CapturedResult.*/
57
+ parsedResult?: ParsedResult;
23
58
  }
24
59
 
60
+ /**@internal*/
25
61
  export function _populateResults(result: CapturedResult | null | undefined) {
26
- if(result) {
27
- result.decodedBarcodesResult = getDecodedBarcodesResult(result)
28
- result.recognizedTextLinesResult = getRecognizedTextLinesResult(result)
29
- result.detectedQuadsResult = getDetectedQuadsResult(result)
30
- result.normalizedImagesResult = getNormalizedImagesResult(result)
31
- result.parsedResult = getParsedResult(result)
32
- }
62
+ if (result) {
63
+ result.decodedBarcodesResult = getDecodedBarcodesResult(result)
64
+ result.recognizedTextLinesResult = getRecognizedTextLinesResult(result)
65
+ result.detectedQuadsResult = getDetectedQuadsResult(result)
66
+ result.normalizedImagesResult = getNormalizedImagesResult(result)
67
+ result.parsedResult = getParsedResult(result)
68
+ }
33
69
  }
34
70
 
35
71
 
72
+ /**@internal*/
36
73
  function getDecodedBarcodesResult(result: CapturedResult): DecodedBarcodesResult {
37
- return {
38
- originalImageHashId: result.originalImageHashId,
39
- errorCode: result.errorCode,
40
- errorMessage: result.errorMessage,
41
- rotationTransformMatrix: result.rotationTransformMatrix,
42
- items: result.items?.filter(item => {
43
- return item.type == EnumCapturedResultItemType.CRIT_BARCODE
44
- }).map(item => {
45
- return item as BarcodeResultItem
46
- })
47
-
48
- } as DecodedBarcodesResult;
74
+ return {
75
+ originalImageHashId: result.originalImageHashId,
76
+ errorCode: result.errorCode,
77
+ errorMessage: result.errorMessage,
78
+ rotationTransformMatrix: result.rotationTransformMatrix,
79
+ items: result.items?.filter(item => {
80
+ return item.type == EnumCapturedResultItemType.CRIT_BARCODE
81
+ }).map(item => {
82
+ return item as BarcodeResultItem
83
+ })
84
+
85
+ } as DecodedBarcodesResult;
49
86
  }
50
87
 
88
+ /**@internal*/
51
89
  function getRecognizedTextLinesResult(result: CapturedResult): RecognizedTextLinesResult {
52
- return {
53
- originalImageHashId: result.originalImageHashId,
54
- errorCode: result.errorCode,
55
- errorString: result.errorMessage,
56
- rotationTransformMatrix: result.rotationTransformMatrix,
57
- items: result.items?.filter(item => {
58
- return item.type == EnumCapturedResultItemType.CRIT_TEXT_LINE
59
- }).map(item => {
60
- return item as TextLineResultItem
61
- })
62
- } as RecognizedTextLinesResult;
90
+ return {
91
+ originalImageHashId: result.originalImageHashId,
92
+ errorCode: result.errorCode,
93
+ errorString: result.errorMessage,
94
+ rotationTransformMatrix: result.rotationTransformMatrix,
95
+ items: result.items?.filter(item => {
96
+ return item.type == EnumCapturedResultItemType.CRIT_TEXT_LINE
97
+ }).map(item => {
98
+ return item as TextLineResultItem
99
+ })
100
+ } as RecognizedTextLinesResult;
63
101
  }
64
102
 
103
+ /**@internal*/
65
104
  function getDetectedQuadsResult(result: CapturedResult): DetectedQuadsResult {
66
- return {
67
- originalImageHashId: result.originalImageHashId,
68
- errorCode: result.errorCode,
69
- errorString: result.errorMessage,
70
- rotationTransformMatrix: result.rotationTransformMatrix,
71
- items: result.items?.filter(item => {
72
- return item.type == EnumCapturedResultItemType.CRIT_DETECTED_QUAD
73
- }).map(item => {
74
- return item as DetectedQuadResultItem
75
- })
76
- } as DetectedQuadsResult;
105
+ return {
106
+ originalImageHashId: result.originalImageHashId,
107
+ errorCode: result.errorCode,
108
+ errorString: result.errorMessage,
109
+ rotationTransformMatrix: result.rotationTransformMatrix,
110
+ items: result.items?.filter(item => {
111
+ return item.type == EnumCapturedResultItemType.CRIT_DETECTED_QUAD
112
+ }).map(item => {
113
+ return item as DetectedQuadResultItem
114
+ })
115
+ } as DetectedQuadsResult;
77
116
  }
78
117
 
118
+ /**@internal*/
79
119
  function getNormalizedImagesResult(result: CapturedResult): NormalizedImagesResult {
80
- return {
81
- originalImageHashId: result.originalImageHashId,
82
- errorCode: result.errorCode,
83
- errorString: result.errorMessage,
84
- rotationTransformMatrix: result.rotationTransformMatrix,
85
- items: result.items?.filter(item => {
86
- return item.type == EnumCapturedResultItemType.CRIT_NORMALIZED_IMAGE
87
- }).map(item => {
88
- return item as NormalizedImageResultItem
89
- })
90
- } as NormalizedImagesResult;
120
+ return {
121
+ originalImageHashId: result.originalImageHashId,
122
+ errorCode: result.errorCode,
123
+ errorString: result.errorMessage,
124
+ rotationTransformMatrix: result.rotationTransformMatrix,
125
+ items: result.items?.filter(item => {
126
+ return item.type == EnumCapturedResultItemType.CRIT_NORMALIZED_IMAGE
127
+ }).map(item => {
128
+ return item as NormalizedImageResultItem
129
+ })
130
+ } as NormalizedImagesResult;
91
131
  }
92
132
 
133
+ /**@internal*/
93
134
  function getParsedResult(result: CapturedResult): ParsedResult {
94
- return {
95
- originalImageHashId: result.originalImageHashId,
96
- errorCode: result.errorCode,
97
- errorMessage: result.errorMessage,
98
- items: result.items?.filter(item => {
99
- return item.type == EnumCapturedResultItemType.CRIT_PARSED_RESULT
100
- }).map(item => {
101
- return item as ParsedResultItem
102
- })
103
- } as ParsedResult;
135
+ return {
136
+ originalImageHashId: result.originalImageHashId,
137
+ errorCode: result.errorCode,
138
+ errorMessage: result.errorMessage,
139
+ items: result.items?.filter(item => {
140
+ return item.type == EnumCapturedResultItemType.CRIT_PARSED_RESULT
141
+ }).map(item => {
142
+ return item as ParsedResultItem
143
+ })
144
+ } as ParsedResult;
104
145
  }
@@ -1,3 +1,10 @@
1
+ /**
2
+ * The CapturedResultFilter interface represents a captured result filter, which is responsible for filtering different types of captured results,
3
+ * including original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results.
4
+ *
5
+ * @remarks Can only use specific inherited classes {@link MultiFrameResultCrossFilter} for now.
6
+ * @see CaptureVisionRouter.addFilter
7
+ * */
1
8
  export interface CapturedResultFilter {
2
9
  /**@internal*/
3
10
  _getFilterId():string;
@@ -4,19 +4,75 @@ import type {DetectedQuadsResult, NormalizedImagesResult} from "../ddn";
4
4
  import type {RecognizedTextLinesResult} from "../dlr";
5
5
  import type {ParsedResult} from "../dcp";
6
6
 
7
+ /**
8
+ * The CapturedResultReceiver class is designed as a standardized way for retrieving captured results in the Dynamsoft Capture Vision architecture.
9
+ * It adopts an event-driven approach, with events dedicated to various result types,
10
+ * such as the original image, decoded barcodes, recognized text lines, detected quads, normalized images, and parsed results, etc.
11
+ * <p>
12
+ * code snippet:
13
+ * ```
14
+ * val router: CaptureVisionRouter
15
+ * router.addResultReceiver({
16
+ * onDecodedBarcodesReceived: result => {
17
+ * //Handle barcodes. `result` is an instance of DecodedBarcodesResult.
18
+ * },
19
+ *
20
+ * onRecognizedTextLinesReceived: result => {
21
+ * //Handle the result of text recognition. `result` is an instance of RecognizedTextLinesResult.
22
+ * },
23
+ * })
24
+ * ```
25
+ *
26
+ * @see CaptureVisionRouter.addResultReceiver
27
+ * */
7
28
  export interface CapturedResultReceiver {
8
- /**@internal*/
9
- // receiverId?:string;
10
-
29
+ /**
30
+ * Event triggered when a generic captured result is available, occurring each time an image finishes its processing.
31
+ * This event can be used for any result that does not fit into the specific categories of the other callback events.
32
+ *
33
+ * @see CapturedResult
34
+ * */
11
35
  onCapturedResultReceived?: (result: CapturedResult) => void;
12
36
 
37
+ /**
38
+ * Event triggered when decoded barcodes are available.
39
+ * This event is used to handle barcodes that have been successfully decoded by Dynamsoft Barcode Reader.
40
+ *
41
+ * @see DecodedBarcodesResult
42
+ * */
13
43
  onDecodedBarcodesReceived?: (result: DecodedBarcodesResult) => void;
14
44
 
45
+ /**
46
+ * Event triggered when detected quads are available.
47
+ * This event is used to handle the detection of quadrilateral shapes, typically used as document boundaries,
48
+ * by Dynamsoft Document Normalizer.
49
+ *
50
+ * @see DetectedQuadsResult
51
+ * */
15
52
  onDetectedQuadsReceived?: (result: DetectedQuadsResult) => void;
16
53
 
54
+ /**
55
+ * Event triggered when normalized images are available.
56
+ * This event is used for handling images that have been processed or normalized (e.g., corrected for skew or perspective),
57
+ * by Dynamsoft Document Normalizer.
58
+ *
59
+ * @see NormalizedImagesResult
60
+ * */
17
61
  onNormalizedImagesReceived?: (result: NormalizedImagesResult) => void;
18
62
 
63
+ /**
64
+ * Event triggered when recognized text lines are available.
65
+ * This event is used to handle the result of text recognition by Dynamsoft Label Recognizer.
66
+ *
67
+ * @see RecognizedTextLinesResult
68
+ * */
19
69
  onRecognizedTextLinesReceived?: (result: RecognizedTextLinesResult) => void;
20
70
 
71
+ /**
72
+ * Event triggered when parsed results are available.
73
+ * This event is used for handling results that have been parsed into a structured format by Dynamsoft Code Parser.
74
+ *
75
+ * @see ParsedResult
76
+ * */
21
77
  onParsedResultsReceived?: (result: ParsedResult) => void;
22
78
  }
@@ -1,16 +1,81 @@
1
1
  export enum EnumPresetTemplate {
2
- PT_DEFAULT = "Default",//DBR + DLR + DDN-Normalize
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
+ * */
3
10
  PT_READ_BARCODES = "ReadBarcodes_Default",
11
+
12
+ /**
13
+ * Identifies and reads any text present.
14
+ */
4
15
  PT_RECOGNIZE_TEXT_LINES = "RecognizeTextLines_Default",
16
+
17
+ /**
18
+ * RIdentifies the edges of a document.
19
+ */
5
20
  PT_DETECT_DOCUMENT_BOUNDARIES = "DetectDocumentBoundaries_Default",
21
+
22
+ /**
23
+ * Detects document edges and standardizes its format.
24
+ */
6
25
  PT_DETECT_AND_NORMALIZE_DOCUMENT = "DetectAndNormalizeDocument_Default",
26
+
27
+ /**
28
+ * Adjusts a document to a standard format using detected borders.
29
+ */
7
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
+ */
8
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
+ */
9
49
  PT_READ_BARCODES_READ_RATE_FIRST = "ReadBarcodes_ReadRateFirst",
50
+
51
+ /**
52
+ * Scans a single barcode.
53
+ * */
10
54
  PT_READ_SINGLE_BARCODE = "ReadSingleBarcode",
55
+
56
+ /**
57
+ * Represents a text recognition mode focused on recognizing numbers.
58
+ */
11
59
  PT_RECOGNIZE_NUMBERS = "RecognizeNumbers",
60
+
61
+ /**
62
+ * Represents a text recognition mode focused on recognizing alphabetic characters (letters).
63
+ *
64
+ */
12
65
  PT_RECOGNIZE_LETTERS = "RecognizeLetters",
66
+
67
+ /**
68
+ * Represents a text recognition mode that combines numbers and alphabetic characters (letters) recognition.
69
+ */
13
70
  PT_RECOGNIZE_NUMBERS_AND_LETTERS = "RecognizeNumbersAndLetters",
71
+
72
+ /**
73
+ * Represents a text recognition mode that combines numbers and uppercase letters recognition.
74
+ */
14
75
  PT_RECOGNIZE_NUMBERS_AND_UPPERCASE_LETTERS = "RecognizeNumbersAndUppercaseLetters",
76
+
77
+ /**
78
+ * Represents a text recognition mode focused on recognizing uppercase letters.
79
+ */
15
80
  PT_RECOGNIZE_UPPERCASE_LETTERS = "RecognizeUppercaseLetters",
16
81
  }
@@ -3,14 +3,59 @@ import type {SimplifiedBarcodeReaderSettings} from "../dbr";
3
3
  import type {SimplifiedLabelRecognizerSettings} from "../dlr";
4
4
  import type {SimplifiedDocumentNormalizerSettings} from "../ddn";
5
5
 
6
+ /**
7
+ * The SimplifiedCaptureVisionSettings interface provides a standardized way to adjust a select set of settings for a given CaptureVisionTemplate.
8
+ * @see CaptureVisionRouter.getSimplifiedSettings
9
+ * @see CaptureVisionRouter.updateSettings
10
+ * */
6
11
  export interface SimplifiedCaptureVisionSettings {
12
+ /**
13
+ * Specifies the types of result items that are expected to be returned. It is of type {@link EnumCapturedResultItemType}.
14
+ * */
7
15
  capturedResultItemTypes?: EnumCapturedResultItemType | number;
16
+
17
+ /**
18
+ * Designates the region of interest (ROI) within an image,
19
+ * limiting the image processing activities exclusively to this specified area.
20
+ * It is of type {@link Quadrilateral}.
21
+ * */
8
22
  roi?: Quadrilateral;
23
+
24
+ /**
25
+ * Determines if the coordinates for the region of interest (ROI) are expressed
26
+ * in percentage terms (true) or as exact pixel measurements (false).
27
+ * */
9
28
  roiMeasuredInPercentage?: boolean;
29
+
30
+ /**
31
+ * Specifies the maximum number of parallel tasks(in native) that can be used for image capture and recognition.
32
+ * */
10
33
  maxParallelTasks?:number
34
+
35
+ /**
36
+ * Specifies the maximum time (in milliseconds) allowed for image capture and recognition.
37
+ * */
11
38
  timeout?: number;
39
+
40
+ /**
41
+ * Specifies the shortest time span, in milliseconds, that must elapse between two successive image captures.
42
+ * Opting for a higher interval decreases capture frequency, which can lower the system's processing load and conserve energy.
43
+ * On the other hand, a smaller interval value increases the frequency of image captures, enhancing the system's responsiveness.
44
+ * */
12
45
  minImageCaptureInterval?: number;
46
+
47
+ /**
48
+ * Specifies the basic settings for the barcode reader module. It is of type {@link SimplifiedBarcodeReaderSettings}.
49
+ * */
13
50
  barcodeSettings?: SimplifiedBarcodeReaderSettings;
51
+
52
+ /**
53
+ * Specifies the basic settings for the label recognizer module. It is of type {@link SimplifiedLabelRecognizerSettings}.
54
+ * */
14
55
  labelSettings?: SimplifiedLabelRecognizerSettings;
56
+
57
+ /**
58
+ * Specifies the basic settings for the document normalizer module. It is of type {@link SimplifiedDocumentNormalizerSettings}.
59
+ * */
15
60
  documentSettings?: SimplifiedDocumentNormalizerSettings;
16
61
  }
@@ -2,15 +2,45 @@ import type {CapturedResultItem} from "../core/CapturedResultItem";
2
2
  import type {Quadrilateral} from "../core/Quadrilateral";
3
3
  import type {EnumBarcodeFormat} from "./EnumBarcodeFormat";
4
4
 
5
+ /**
6
+ * Interface BarcodeResultItem extends {@link CapturedResultItem}, represents a barcode result item decoded by barcode reader engine.
7
+ * @see DecodedBarcodesResult
8
+ * @see EnumCapturedResultItemType.CRIT_BARCODE
9
+ * */
5
10
  export interface BarcodeResultItem extends CapturedResultItem{
11
+ /**
12
+ * The format of the barcode. It specifies the type of barcode that was recognized.
13
+ * @see EnumBarcodeFormat
14
+ * */
6
15
  format: EnumBarcodeFormat | bigint;
16
+
17
+ /**@internal*/
7
18
  _formatNumberString: string;
19
+
20
+ /**A string that describes the format of the barcode in human-readable form. It provides a textual representation of the barcode format.*/
8
21
  formatString: string;
22
+
23
+ /**The textual data decoded from the barcode. It represents the content of the barcode.*/
9
24
  text: string;
25
+ /**
26
+ * The location of the barcode in the form of a {@link Quadrilateral} (a set of coordinates defining the four corners of the detected barcode).
27
+ * It describes where the barcode was found within an image.
28
+ * @see Quadrilateral
29
+ * */
10
30
  location: Quadrilateral;
31
+
32
+ /**The confidence score or reliability of the barcode detection.*/
11
33
  confidence: number;
34
+
35
+ /**The angle or orientation of the barcode, indicating if the barcode was detected at an angle or rotated.*/
12
36
  angle: number;
37
+
38
+ /**The size of the individual modules or elements within the barcode.*/
13
39
  moduleSize: number;
40
+
41
+ /**Whether the barcode is mirrored or reversed from its normal orientation.*/
14
42
  isMirrored: boolean;
43
+
44
+ /**Indicates whether the barcode is a Direct Part Marking (DPM) barcode.*/
15
45
  isDPM: boolean;
16
- }
46
+ }
@@ -1,9 +1,27 @@
1
1
  import type {BarcodeResultItem} from "./BarcodeResultItem";
2
2
 
3
+ /**
4
+ * Interface DecodedBarcodesResult represents information of decoded barcodes from an image.
5
+ * @see CapturedResultReceiver.onDecodedBarcodesReceived
6
+ * */
3
7
  export interface DecodedBarcodesResult {
8
+ /**
9
+ * A unique identifier or hash of the original image from which the barcodes were decoded. It can be used to associate the result with a specific input image.
10
+ * @see IntermediateResultManager.getOriginalImage
11
+ * */
4
12
  originalImageHashId: string;
13
+
14
+ /**
15
+ * An array of {@link BarcodeResultItem} objects, representing the list of decoded barcodes found in the image.
16
+ * */
5
17
  items?: Array<BarcodeResultItem>;
18
+
19
+ /**The error code of the barcode reading result, if an error occurred.*/
6
20
  errorCode: number;
21
+
22
+ /**The error message of the barcode reading result, if an error occurred.*/
7
23
  errorMessage?: string;
24
+
25
+ /**the rotation transformation matrix of the original image relative to the rotated image.*/
8
26
  rotationTransformMatrix: Array<number>;
9
27
  }