dynamsoft-capture-vision-bundle 3.4.1000__cp314-cp314-win_amd64.whl
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.
- dynamsoft_capture_vision_bundle/ConfusableChars.data +0 -0
- dynamsoft_capture_vision_bundle/DynamicPdfx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftBarcodeReaderx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftCaptureVisionRouterx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftCodeParserDedicatorx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftCodeParserx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftCorex64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftDocumentNormalizerx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftIdentityUtilityx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftImageProcessingx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftLabelRecognizerx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftLicensex64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftNeuralNetworkx64.dll +0 -0
- dynamsoft_capture_vision_bundle/DynamsoftUtilityx64.dll +0 -0
- dynamsoft_capture_vision_bundle/Models/Code128Decoder.data +0 -0
- dynamsoft_capture_vision_bundle/Models/Code39ITFDecoder.data +0 -0
- dynamsoft_capture_vision_bundle/Models/DataMatrixQRCodeDeblur.data +0 -0
- dynamsoft_capture_vision_bundle/Models/DataMatrixQRCodeLocalization.data +0 -0
- dynamsoft_capture_vision_bundle/Models/EAN13Decoder.data +0 -0
- dynamsoft_capture_vision_bundle/Models/LetterCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/LowercaseCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/MRZCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/MRZLocalization.data +0 -0
- dynamsoft_capture_vision_bundle/Models/MRZTextLineRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/NumberCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/NumberLetterCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/NumberLowercaseCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/NumberUppercaseCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/OneDDeblur.data +0 -0
- dynamsoft_capture_vision_bundle/Models/OneDLocalization.data +0 -0
- dynamsoft_capture_vision_bundle/Models/PDF417Deblur.data +0 -0
- dynamsoft_capture_vision_bundle/Models/PDF417Localization.data +0 -0
- dynamsoft_capture_vision_bundle/Models/UppercaseCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/Models/VINCharRecognition.data +0 -0
- dynamsoft_capture_vision_bundle/OverlappingChars.data +1 -0
- dynamsoft_capture_vision_bundle/ParserResources/AADHAAR.data +0 -0
- dynamsoft_capture_vision_bundle/ParserResources/AAMVA_DL_ID.data +1 -0
- dynamsoft_capture_vision_bundle/ParserResources/GS1_AI.data +66 -0
- dynamsoft_capture_vision_bundle/ParserResources/MRTD.data +1 -0
- dynamsoft_capture_vision_bundle/ParserResources/SOUTH_AFRICA_DL.data +1 -0
- dynamsoft_capture_vision_bundle/ParserResources/VIN.data +0 -0
- dynamsoft_capture_vision_bundle/Templates/DBR-PresetTemplates.json +546 -0
- dynamsoft_capture_vision_bundle/Templates/DDN-PresetTemplates.json +316 -0
- dynamsoft_capture_vision_bundle/Templates/DLR-PresetTemplates.json +471 -0
- dynamsoft_capture_vision_bundle/Templates/DriverLicenseScanner.json +94 -0
- dynamsoft_capture_vision_bundle/Templates/MRZScanner.json +804 -0
- dynamsoft_capture_vision_bundle/Templates/VINScanner.json +299 -0
- dynamsoft_capture_vision_bundle/_DynamsoftBarcodeReader.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftCaptureVisionRouter.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftCodeParser.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftCodeParserDedicator.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftCore.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftDocumentNormalizer.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftIdentityUtility.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftImageProcessing.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftLabelRecognizer.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftLicense.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/_DynamsoftUtility.cp314-win_amd64.pyd +0 -0
- dynamsoft_capture_vision_bundle/__init__.py +13 -0
- dynamsoft_capture_vision_bundle/core.py +2785 -0
- dynamsoft_capture_vision_bundle/cvr.py +1347 -0
- dynamsoft_capture_vision_bundle/dbr.py +1223 -0
- dynamsoft_capture_vision_bundle/dcp.py +208 -0
- dynamsoft_capture_vision_bundle/dcpd.py +21 -0
- dynamsoft_capture_vision_bundle/ddn.py +985 -0
- dynamsoft_capture_vision_bundle/dip.py +24 -0
- dynamsoft_capture_vision_bundle/dlr.py +1136 -0
- dynamsoft_capture_vision_bundle/id_utility.py +98 -0
- dynamsoft_capture_vision_bundle/license.py +146 -0
- dynamsoft_capture_vision_bundle/utility.py +835 -0
- dynamsoft_capture_vision_bundle-3.4.1000.dist-info/METADATA +89 -0
- dynamsoft_capture_vision_bundle-3.4.1000.dist-info/RECORD +75 -0
- dynamsoft_capture_vision_bundle-3.4.1000.dist-info/WHEEL +5 -0
- dynamsoft_capture_vision_bundle-3.4.1000.dist-info/licenses/LICENSE.txt +1 -0
- dynamsoft_capture_vision_bundle-3.4.1000.dist-info/top_level.txt +12 -0
|
@@ -0,0 +1,1223 @@
|
|
|
1
|
+
__version__ = "11.4.10.7449"
|
|
2
|
+
|
|
3
|
+
if __package__ or "." in __name__:
|
|
4
|
+
from .core import *
|
|
5
|
+
else:
|
|
6
|
+
from core import *
|
|
7
|
+
|
|
8
|
+
if __package__ or "." in __name__:
|
|
9
|
+
from . import _DynamsoftBarcodeReader
|
|
10
|
+
else:
|
|
11
|
+
import _DynamsoftBarcodeReader
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from enum import IntEnum
|
|
15
|
+
from typing import List
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class EnumBarcodeFormat(IntEnum):
|
|
19
|
+
BF_NULL = _DynamsoftBarcodeReader.BF_NULL
|
|
20
|
+
BF_ALL = _DynamsoftBarcodeReader.BF_ALL
|
|
21
|
+
BF_DEFAULT = _DynamsoftBarcodeReader.BF_DEFAULT
|
|
22
|
+
BF_ONED = _DynamsoftBarcodeReader.BF_ONED
|
|
23
|
+
BF_GS1_DATABAR = _DynamsoftBarcodeReader.BF_GS1_DATABAR
|
|
24
|
+
BF_CODE_39 = _DynamsoftBarcodeReader.BF_CODE_39
|
|
25
|
+
BF_CODE_128 = _DynamsoftBarcodeReader.BF_CODE_128
|
|
26
|
+
BF_CODE_93 = _DynamsoftBarcodeReader.BF_CODE_93
|
|
27
|
+
BF_CODABAR = _DynamsoftBarcodeReader.BF_CODABAR
|
|
28
|
+
BF_ITF = _DynamsoftBarcodeReader.BF_ITF
|
|
29
|
+
BF_EAN_13 = _DynamsoftBarcodeReader.BF_EAN_13
|
|
30
|
+
BF_EAN_8 = _DynamsoftBarcodeReader.BF_EAN_8
|
|
31
|
+
BF_UPC_A = _DynamsoftBarcodeReader.BF_UPC_A
|
|
32
|
+
BF_UPC_E = _DynamsoftBarcodeReader.BF_UPC_E
|
|
33
|
+
BF_INDUSTRIAL_25 = _DynamsoftBarcodeReader.BF_INDUSTRIAL_25
|
|
34
|
+
BF_CODE_39_EXTENDED = _DynamsoftBarcodeReader.BF_CODE_39_EXTENDED
|
|
35
|
+
BF_GS1_DATABAR_OMNIDIRECTIONAL = (
|
|
36
|
+
_DynamsoftBarcodeReader.BF_GS1_DATABAR_OMNIDIRECTIONAL
|
|
37
|
+
)
|
|
38
|
+
BF_GS1_DATABAR_TRUNCATED = _DynamsoftBarcodeReader.BF_GS1_DATABAR_TRUNCATED
|
|
39
|
+
BF_GS1_DATABAR_STACKED = _DynamsoftBarcodeReader.BF_GS1_DATABAR_STACKED
|
|
40
|
+
BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL = (
|
|
41
|
+
_DynamsoftBarcodeReader.BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL
|
|
42
|
+
)
|
|
43
|
+
BF_GS1_DATABAR_EXPANDED = _DynamsoftBarcodeReader.BF_GS1_DATABAR_EXPANDED
|
|
44
|
+
BF_GS1_DATABAR_EXPANDED_STACKED = (
|
|
45
|
+
_DynamsoftBarcodeReader.BF_GS1_DATABAR_EXPANDED_STACKED
|
|
46
|
+
)
|
|
47
|
+
BF_GS1_DATABAR_LIMITED = _DynamsoftBarcodeReader.BF_GS1_DATABAR_LIMITED
|
|
48
|
+
BF_PATCHCODE = _DynamsoftBarcodeReader.BF_PATCHCODE
|
|
49
|
+
BF_CODE_32 = _DynamsoftBarcodeReader.BF_CODE_32
|
|
50
|
+
BF_PDF417 = _DynamsoftBarcodeReader.BF_PDF417
|
|
51
|
+
BF_QR_CODE = _DynamsoftBarcodeReader.BF_QR_CODE
|
|
52
|
+
BF_DATAMATRIX = _DynamsoftBarcodeReader.BF_DATAMATRIX
|
|
53
|
+
BF_AZTEC = _DynamsoftBarcodeReader.BF_AZTEC
|
|
54
|
+
BF_MAXICODE = _DynamsoftBarcodeReader.BF_MAXICODE
|
|
55
|
+
BF_MICRO_QR = _DynamsoftBarcodeReader.BF_MICRO_QR
|
|
56
|
+
BF_MICRO_PDF417 = _DynamsoftBarcodeReader.BF_MICRO_PDF417
|
|
57
|
+
BF_GS1_COMPOSITE = _DynamsoftBarcodeReader.BF_GS1_COMPOSITE
|
|
58
|
+
BF_MSI_CODE = _DynamsoftBarcodeReader.BF_MSI_CODE
|
|
59
|
+
BF_CODE_11 = _DynamsoftBarcodeReader.BF_CODE_11
|
|
60
|
+
BF_TWO_DIGIT_ADD_ON = _DynamsoftBarcodeReader.BF_TWO_DIGIT_ADD_ON
|
|
61
|
+
BF_FIVE_DIGIT_ADD_ON = _DynamsoftBarcodeReader.BF_FIVE_DIGIT_ADD_ON
|
|
62
|
+
BF_MATRIX_25 = _DynamsoftBarcodeReader.BF_MATRIX_25
|
|
63
|
+
BF_TELEPEN = _DynamsoftBarcodeReader.BF_TELEPEN
|
|
64
|
+
BF_TELEPEN_NUMERIC = _DynamsoftBarcodeReader.BF_TELEPEN_NUMERIC
|
|
65
|
+
BF_POSTALCODE = _DynamsoftBarcodeReader.BF_POSTALCODE
|
|
66
|
+
BF_NONSTANDARD_BARCODE = _DynamsoftBarcodeReader.BF_NONSTANDARD_BARCODE
|
|
67
|
+
BF_USPSINTELLIGENTMAIL = _DynamsoftBarcodeReader.BF_USPSINTELLIGENTMAIL
|
|
68
|
+
BF_POSTNET = _DynamsoftBarcodeReader.BF_POSTNET
|
|
69
|
+
BF_PLANET = _DynamsoftBarcodeReader.BF_PLANET
|
|
70
|
+
BF_AUSTRALIANPOST = _DynamsoftBarcodeReader.BF_AUSTRALIANPOST
|
|
71
|
+
BF_RM4SCC = _DynamsoftBarcodeReader.BF_RM4SCC
|
|
72
|
+
BF_KIX = _DynamsoftBarcodeReader.BF_KIX
|
|
73
|
+
BF_DOTCODE = _DynamsoftBarcodeReader.BF_DOTCODE
|
|
74
|
+
BF_PHARMACODE_ONE_TRACK = _DynamsoftBarcodeReader.BF_PHARMACODE_ONE_TRACK
|
|
75
|
+
BF_PHARMACODE_TWO_TRACK = _DynamsoftBarcodeReader.BF_PHARMACODE_TWO_TRACK
|
|
76
|
+
BF_PHARMACODE = _DynamsoftBarcodeReader.BF_PHARMACODE
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class EnumLocalizationMode(IntEnum):
|
|
80
|
+
LM_AUTO = _DynamsoftBarcodeReader.LM_AUTO
|
|
81
|
+
LM_CONNECTED_BLOCKS = _DynamsoftBarcodeReader.LM_CONNECTED_BLOCKS
|
|
82
|
+
LM_STATISTICS = _DynamsoftBarcodeReader.LM_STATISTICS
|
|
83
|
+
LM_LINES = _DynamsoftBarcodeReader.LM_LINES
|
|
84
|
+
LM_SCAN_DIRECTLY = _DynamsoftBarcodeReader.LM_SCAN_DIRECTLY
|
|
85
|
+
LM_STATISTICS_MARKS = _DynamsoftBarcodeReader.LM_STATISTICS_MARKS
|
|
86
|
+
LM_STATISTICS_POSTAL_CODE = _DynamsoftBarcodeReader.LM_STATISTICS_POSTAL_CODE
|
|
87
|
+
LM_CENTRE = _DynamsoftBarcodeReader.LM_CENTRE
|
|
88
|
+
LM_ONED_FAST_SCAN = _DynamsoftBarcodeReader.LM_ONED_FAST_SCAN
|
|
89
|
+
LM_NEURAL_NETWORK = _DynamsoftBarcodeReader.LM_NEURAL_NETWORK
|
|
90
|
+
LM_REV = _DynamsoftBarcodeReader.LM_REV
|
|
91
|
+
LM_END = _DynamsoftBarcodeReader.LM_END
|
|
92
|
+
LM_SKIP = _DynamsoftBarcodeReader.LM_SKIP
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class EnumDeblurMode(IntEnum):
|
|
96
|
+
DM_DIRECT_BINARIZATION = _DynamsoftBarcodeReader.DM_DIRECT_BINARIZATION
|
|
97
|
+
DM_THRESHOLD_BINARIZATION = _DynamsoftBarcodeReader.DM_THRESHOLD_BINARIZATION
|
|
98
|
+
DM_GRAY_EQUALIZATION = _DynamsoftBarcodeReader.DM_GRAY_EQUALIZATION
|
|
99
|
+
DM_SMOOTHING = _DynamsoftBarcodeReader.DM_SMOOTHING
|
|
100
|
+
DM_MORPHING = _DynamsoftBarcodeReader.DM_MORPHING
|
|
101
|
+
DM_DEEP_ANALYSIS = _DynamsoftBarcodeReader.DM_DEEP_ANALYSIS
|
|
102
|
+
DM_SHARPENING = _DynamsoftBarcodeReader.DM_SHARPENING
|
|
103
|
+
DM_BASED_ON_LOC_BIN = _DynamsoftBarcodeReader.DM_BASED_ON_LOC_BIN
|
|
104
|
+
DM_SHARPENING_SMOOTHING = _DynamsoftBarcodeReader.DM_SHARPENING_SMOOTHING
|
|
105
|
+
DM_NEURAL_NETWORK = _DynamsoftBarcodeReader.DM_NEURAL_NETWORK
|
|
106
|
+
DM_REV = _DynamsoftBarcodeReader.DM_REV
|
|
107
|
+
DM_END = _DynamsoftBarcodeReader.DM_END
|
|
108
|
+
DM_SKIP = _DynamsoftBarcodeReader.DM_SKIP
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class EnumQRCodeErrorCorrectionLevel(IntEnum):
|
|
112
|
+
QRECL_ERROR_CORRECTION_H = _DynamsoftBarcodeReader.QRECL_ERROR_CORRECTION_H
|
|
113
|
+
QRECL_ERROR_CORRECTION_L = _DynamsoftBarcodeReader.QRECL_ERROR_CORRECTION_L
|
|
114
|
+
QRECL_ERROR_CORRECTION_M = _DynamsoftBarcodeReader.QRECL_ERROR_CORRECTION_M
|
|
115
|
+
QRECL_ERROR_CORRECTION_Q = _DynamsoftBarcodeReader.QRECL_ERROR_CORRECTION_Q
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class EnumExtendedBarcodeResultType(IntEnum):
|
|
119
|
+
EBRT_STANDARD_RESULT = _DynamsoftBarcodeReader.EBRT_STANDARD_RESULT
|
|
120
|
+
EBRT_CANDIDATE_RESULT = _DynamsoftBarcodeReader.EBRT_CANDIDATE_RESULT
|
|
121
|
+
EBRT_PARTIAL_RESULT = _DynamsoftBarcodeReader.EBRT_PARTIAL_RESULT
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class SimplifiedBarcodeReaderSettings:
|
|
125
|
+
"""
|
|
126
|
+
The SimplifiedBarcodeReaderSettings class contains settings for barcode decoding. It is a sub-parameter of SimplifiedCaptureVisionSettings.
|
|
127
|
+
|
|
128
|
+
Attributes:
|
|
129
|
+
barcode_format_ids (int): Specifies the targeting format(s) of the barcode(s) to be decoded.
|
|
130
|
+
expected_barcodes_count (int): Specifies the expected barcode count. The default value is 0.
|
|
131
|
+
grayscale_transformation_modes (List[int]): Specifies how grayscale transformations should be applied, including whether to process inverted grayscale images and the specific transformation mode to use.
|
|
132
|
+
grayscale_enhancement_modes (List[int]): Specifies how to enhance the quality of the grayscale image.
|
|
133
|
+
localization_modes(List[int]): Specifies how to localize barcodes.
|
|
134
|
+
deblur_modes (List[int]): Specifies the mode and priority for deblurring.
|
|
135
|
+
min_result_confidence (int): Specifies the minimum result confidence to filter out the low confidence results. The default value is 30.
|
|
136
|
+
min_barcode_text_length (int): Specifies the minimum barcode text length to filter out the unqualified results.
|
|
137
|
+
barcode_text_regex_pattern (str): Specifies the RegEx pattern of the barcode text to filter out the unqualified results.
|
|
138
|
+
max_threads_in_one_task (int): Specifies the maximum available threads count in one barcode decoding task.
|
|
139
|
+
scale_down_threshold (int): Specifies the threshold for image shrinking.
|
|
140
|
+
"""
|
|
141
|
+
_thisown = property(
|
|
142
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
barcode_format_ids: int = property(
|
|
146
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_barcodeFormatIds_get,
|
|
147
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_barcodeFormatIds_set,
|
|
148
|
+
doc="""
|
|
149
|
+
Specifies the targeting format(s) of the barcode(s) to be decoded.
|
|
150
|
+
It is a bitwise OR combination of one or more values from the EnumBarcodeFormat enumeration.
|
|
151
|
+
"""
|
|
152
|
+
)
|
|
153
|
+
expected_barcodes_count: int = property(
|
|
154
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_expectedBarcodesCount_get,
|
|
155
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_expectedBarcodesCount_set,
|
|
156
|
+
doc="""
|
|
157
|
+
Specifies the expected barcode count. The default value is 0.
|
|
158
|
+
Set expected_barcodes_count to 0 if the barcode count is unknown. The library will try to find at least 1 barcode.
|
|
159
|
+
Set expected_barcodes_count to 1 to reach the highest speed for processing single barcode.
|
|
160
|
+
Set expected_barcodes_count to "n" if there will be "n" barcodes to process from an image.
|
|
161
|
+
Set expected_barcodes_count to the highest expected value if there exists multiple barcode but the exact count is not confirmed.
|
|
162
|
+
""",
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def grayscale_transformation_modes(self) -> List[int]:
|
|
167
|
+
"""
|
|
168
|
+
Specifies how grayscale transformations should be applied, including whether to process inverted grayscale images and the specific transformation mode to use.
|
|
169
|
+
It is a list of 8 integers, where each integer represents a mode specified by the EnumGrayscaleTransformationMode enumeration.
|
|
170
|
+
"""
|
|
171
|
+
if not hasattr(self, "_grayscale_transformation_modes") or self._grayscale_transformation_modes is None:
|
|
172
|
+
self._grayscale_transformation_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleTransformationModes_get(self)
|
|
173
|
+
return self._grayscale_transformation_modes
|
|
174
|
+
@grayscale_transformation_modes.setter
|
|
175
|
+
def grayscale_transformation_modes(self, value: List[int]):
|
|
176
|
+
if not hasattr(self, "_grayscale_transformation_modes") or self._grayscale_transformation_modes is None:
|
|
177
|
+
self._grayscale_transformation_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleTransformationModes_get(self)
|
|
178
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleTransformationModes_set(self, value)
|
|
179
|
+
self._grayscale_transformation_modes = value
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def grayscale_enhancement_modes(self) -> List[int]:
|
|
183
|
+
"""
|
|
184
|
+
Specifies how to enhance the quality of the grayscale image.
|
|
185
|
+
It is a list of 8 integers, where each integer represents a mode specified by the EnumGrayscaleEnhancementMode enumeration.
|
|
186
|
+
"""
|
|
187
|
+
if not hasattr(self, "_grayscale_enhancement_modes") or self._grayscale_enhancement_modes is None:
|
|
188
|
+
self._grayscale_enhancement_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleEnhancementModes_get(self)
|
|
189
|
+
return self._grayscale_enhancement_modes
|
|
190
|
+
@grayscale_enhancement_modes.setter
|
|
191
|
+
def grayscale_enhancement_modes(self, value: List[int]):
|
|
192
|
+
if not hasattr(self, "_grayscale_enhancement_modes") or self._grayscale_enhancement_modes is None:
|
|
193
|
+
self._grayscale_enhancement_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleEnhancementModes_get(self)
|
|
194
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleEnhancementModes_set(self, value)
|
|
195
|
+
self._grayscale_enhancement_modes = value
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def localization_modes(self) -> List[int]:
|
|
199
|
+
"""
|
|
200
|
+
Specifies how to localize barcodes.
|
|
201
|
+
It is a list of 8 integers, where each integer represents a mode specified by the EnumLocalizationMode enumeration.
|
|
202
|
+
"""
|
|
203
|
+
if not hasattr(self, "_localization_modes") or self._localization_modes is None:
|
|
204
|
+
self._localization_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_localizationModes_get(self)
|
|
205
|
+
return self._localization_modes
|
|
206
|
+
@localization_modes.setter
|
|
207
|
+
def localization_modes(self, value: List[int]):
|
|
208
|
+
if not hasattr(self, "_localization_modes") or self._localization_modes is None:
|
|
209
|
+
self._localization_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_localizationModes_get(self)
|
|
210
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_localizationModes_set(self, value)
|
|
211
|
+
self._localization_modes = value
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def deblur_modes(self) -> List[int]:
|
|
215
|
+
"""
|
|
216
|
+
Specifies the mode and priority for deblurring.
|
|
217
|
+
It is a list of 8 integers, where each integer represents a mode specified by the EnumDeblurMode enumeration.
|
|
218
|
+
"""
|
|
219
|
+
if not hasattr(self, "_deblur_modes") or self._deblur_modes is None:
|
|
220
|
+
self._deblur_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_deblurModes_get(self)
|
|
221
|
+
return self._deblur_modes
|
|
222
|
+
@deblur_modes.setter
|
|
223
|
+
def deblur_modes(self, value: List[int]):
|
|
224
|
+
if not hasattr(self, "_deblur_modes") or self._deblur_modes is None:
|
|
225
|
+
self._deblur_modes = _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_deblurModes_get(self)
|
|
226
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_deblurModes_set(self, value)
|
|
227
|
+
self._deblur_modes = value
|
|
228
|
+
# grayscale_transformation_modes: List[int] = property(
|
|
229
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleTransformationModes_get,
|
|
230
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleTransformationModes_set,
|
|
231
|
+
# doc="""
|
|
232
|
+
# Specifies how grayscale transformations should be applied, including whether to process inverted grayscale images and the specific transformation mode to use.
|
|
233
|
+
# It is a list of 8 integers, where each integer represents a mode specified by the EnumGrayscaleTransformationMode enumeration.
|
|
234
|
+
# """,
|
|
235
|
+
# )
|
|
236
|
+
# grayscale_enhancement_modes: List[int] = property(
|
|
237
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleEnhancementModes_get,
|
|
238
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_grayscaleEnhancementModes_set,
|
|
239
|
+
# doc="""
|
|
240
|
+
# Specifies how to enhance the quality of the grayscale image.
|
|
241
|
+
# It is a list of 8 integers, where each integer represents a mode specified by the EnumGrayscaleEnhancementMode enumeration.
|
|
242
|
+
# """,
|
|
243
|
+
# )
|
|
244
|
+
# localization_modes: List[int] = property(
|
|
245
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_localizationModes_get,
|
|
246
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_localizationModes_set,
|
|
247
|
+
# doc="""
|
|
248
|
+
# Specifies how to localize barcodes.
|
|
249
|
+
# It is a list of 8 integers, where each integer represents a mode specified by the EnumLocalizationMode enumeration.
|
|
250
|
+
# """,
|
|
251
|
+
# )
|
|
252
|
+
# deblur_modes: List[int] = property(
|
|
253
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_deblurModes_get,
|
|
254
|
+
# _DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_deblurModes_set,
|
|
255
|
+
# doc="""
|
|
256
|
+
# Specifies the mode and priority for deblurring.
|
|
257
|
+
# It is a list of 8 integers, where each integer represents a mode specified by the EnumDeblurMode enumeration.
|
|
258
|
+
# """,
|
|
259
|
+
# )
|
|
260
|
+
min_result_confidence: int = property(
|
|
261
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_minResultConfidence_get,
|
|
262
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_minResultConfidence_set,
|
|
263
|
+
doc="Specifies the minimum result confidence to filter out the low confidence results. The default value is 30.",
|
|
264
|
+
)
|
|
265
|
+
min_barcode_text_length: int = property(
|
|
266
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_minBarcodeTextLength_get,
|
|
267
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_minBarcodeTextLength_set,
|
|
268
|
+
doc="Specifies the minimum barcode text length to filter out the unqualified results.",
|
|
269
|
+
)
|
|
270
|
+
barcode_text_regex_pattern: str = property(
|
|
271
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_barcodeTextRegExPattern_get,
|
|
272
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_barcodeTextRegExPattern_set,
|
|
273
|
+
doc="Specifies the RegEx pattern of the barcode text to filter out the unqualified results.",
|
|
274
|
+
)
|
|
275
|
+
max_threads_in_one_task: int = property(
|
|
276
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_maxThreadsInOneTask_get,
|
|
277
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_maxThreadsInOneTask_set,
|
|
278
|
+
doc="""
|
|
279
|
+
Specifies the maximum available threads count in one barcode decoding task.
|
|
280
|
+
The value range is [1, 256]
|
|
281
|
+
The default value is 4
|
|
282
|
+
""",
|
|
283
|
+
)
|
|
284
|
+
scale_down_threshold: int = property(
|
|
285
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_scaleDownThreshold_get,
|
|
286
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_scaleDownThreshold_set,
|
|
287
|
+
doc="""
|
|
288
|
+
Specifies the threshold for image shrinking.
|
|
289
|
+
If the shorter edge size is larger than the given threshold value, the library will calculate the required height and width of the target image and shrink the image to that size before further operation.
|
|
290
|
+
Otherwise, the library will perform operation on the original image.
|
|
291
|
+
The value range is [512, 0x7fffffff]
|
|
292
|
+
The default value is 2300
|
|
293
|
+
"""
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
def __init__(self):
|
|
297
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
298
|
+
self, _DynamsoftBarcodeReader.new_SimplifiedBarcodeReaderSettings()
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_SimplifiedBarcodeReaderSettings
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
_DynamsoftBarcodeReader.SimplifiedBarcodeReaderSettings_register(
|
|
305
|
+
SimplifiedBarcodeReaderSettings
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class BarcodeDetails:
|
|
310
|
+
"""
|
|
311
|
+
The BarcodeDetails class represents the details of a barcode. It is an abstract base class.
|
|
312
|
+
"""
|
|
313
|
+
_thisown = property(
|
|
314
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CBarcodeDetails
|
|
318
|
+
|
|
319
|
+
def __init__(self):
|
|
320
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
321
|
+
self, _DynamsoftBarcodeReader.new_CBarcodeDetails()
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
_DynamsoftBarcodeReader.CBarcodeDetails_register(BarcodeDetails)
|
|
326
|
+
|
|
327
|
+
class OneDCodeDetails(BarcodeDetails):
|
|
328
|
+
"""
|
|
329
|
+
The OneDCodeDetails class represents detailed information about a one-dimensional barcode. It inherits from the BarcodeDetails class.
|
|
330
|
+
|
|
331
|
+
Attributes:
|
|
332
|
+
start_chars_bytes (bytes): The start chars of the one-dimensional barcode in a byte array.
|
|
333
|
+
stop_chars_bytes (bytes): The stop chars of the one-dimensional barcode in a byte array.
|
|
334
|
+
check_digit_bytes (bytes): The check digit chars of the one-dimensional barcode in a byte array.
|
|
335
|
+
start_pattern_range (List[float]): The position of the start pattern relative to the barcode location.
|
|
336
|
+
middle_pattern_range (List[float]): The position of the middle pattern relative to the barcode location.
|
|
337
|
+
end_pattern_range (List[float]): The position of the end pattern relative to the barcode location.
|
|
338
|
+
"""
|
|
339
|
+
_thisown = property(
|
|
340
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
def __init__(self):
|
|
344
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
345
|
+
self, _DynamsoftBarcodeReader.new_COneDCodeDetails()
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_COneDCodeDetails
|
|
349
|
+
start_chars_bytes: bytes = property(
|
|
350
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_startCharsBytes_get,
|
|
351
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_startCharsBytes_set,
|
|
352
|
+
doc="The start chars of the one-dimensional barcode in a byte array.",
|
|
353
|
+
)
|
|
354
|
+
stop_chars_bytes: bytes = property(
|
|
355
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_stopCharsBytes_get,
|
|
356
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_stopCharsBytes_set,
|
|
357
|
+
doc="The stop chars of the one-dimensional barcode in a byte array.",
|
|
358
|
+
)
|
|
359
|
+
check_digit_bytes: bytes = property(
|
|
360
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_checkDigitBytes_get,
|
|
361
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_checkDigitBytes_set,
|
|
362
|
+
doc="The check digit chars of the one-dimensional barcode in a byte array.",
|
|
363
|
+
)
|
|
364
|
+
start_pattern_range: List[float] = property(
|
|
365
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_startPatternRange_get,
|
|
366
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_startPatternRange_set,
|
|
367
|
+
doc="""
|
|
368
|
+
The position of the start pattern relative to the barcode location.
|
|
369
|
+
The property represents a float list of length 2:
|
|
370
|
+
Index 0: X coordinate of the start position in percentage value.
|
|
371
|
+
Index 1: X coordinate of the end position in percentage value.
|
|
372
|
+
""",
|
|
373
|
+
)
|
|
374
|
+
middle_pattern_range: List[float] = property(
|
|
375
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_middlePatternRange_get,
|
|
376
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_middlePatternRange_set,
|
|
377
|
+
doc="""
|
|
378
|
+
The position of the middle pattern relative to the barcode location.
|
|
379
|
+
The property represents a float list of length 2:
|
|
380
|
+
Index 0: X coordinate of the start position in percentage value.
|
|
381
|
+
Index 1: X coordinate of the end position in percentage value.
|
|
382
|
+
""",
|
|
383
|
+
)
|
|
384
|
+
end_pattern_range: List[float] = property(
|
|
385
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_endPatternRange_get,
|
|
386
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_endPatternRange_set,
|
|
387
|
+
doc="""
|
|
388
|
+
The position of the end pattern relative to the barcode location.
|
|
389
|
+
The property represents a float list of length 2:
|
|
390
|
+
Index 0: X coordinate of the start position in percentage value.
|
|
391
|
+
Index 1: X coordinate of the end position in percentage value.
|
|
392
|
+
""",
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
_DynamsoftBarcodeReader.COneDCodeDetails_register(OneDCodeDetails)
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class QRCodeDetails(BarcodeDetails):
|
|
400
|
+
"""
|
|
401
|
+
The QRCodeDetails class represents the details of a QR Code.
|
|
402
|
+
It is derived from the BarcodeDetails class and contains various attributes related to the QR Code.
|
|
403
|
+
|
|
404
|
+
Attributes:
|
|
405
|
+
rows (int): The row count of the QR Code.
|
|
406
|
+
columns (int): The column count of the QR Code.
|
|
407
|
+
error_correction_level (int): The error correction level of the QR Code.
|
|
408
|
+
version (int): The version of the QR Code.
|
|
409
|
+
model (int): Number of models of the QR Code.
|
|
410
|
+
mode (int): The first data encoding mode of the QR Code.
|
|
411
|
+
page (int): The position of the particular symbol in the Structured Append format of the QR Code.
|
|
412
|
+
total_page (int): The total number of symbols to be concatenated in the Structured Append format of the QR Code.
|
|
413
|
+
parity_data (int): The Parity Data shall be an 8 bit byte following the Symbol Sequence Indicator. The parity data is a value obtained by XORing byte by byte the ASCII/JIS values of all the original input data before division into symbol blocks.
|
|
414
|
+
data_mask_pattern (int): The data mask pattern reference for QR Code symbols.
|
|
415
|
+
codewords (bytes): The codewords of the QR Code.
|
|
416
|
+
|
|
417
|
+
Methods:
|
|
418
|
+
__init__(self, rows: int, columns: int, error_correction_level: int, version: int, model: int, mode: int, page: int, total_page: int, parity_data: int): Initializes a new instance of the QRCodeDetails class.
|
|
419
|
+
"""
|
|
420
|
+
_thisown = property(
|
|
421
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
def __init__(
|
|
425
|
+
self,
|
|
426
|
+
rows: int = -1,
|
|
427
|
+
columns: int = -1,
|
|
428
|
+
error_correction_level: int = EnumQRCodeErrorCorrectionLevel.QRECL_ERROR_CORRECTION_H.value,
|
|
429
|
+
version: int = -1,
|
|
430
|
+
model: int = -1,
|
|
431
|
+
mode: int = -1,
|
|
432
|
+
page: int = -1,
|
|
433
|
+
total_page: int = -1,
|
|
434
|
+
parity_data: int = -1,
|
|
435
|
+
):
|
|
436
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
437
|
+
self,
|
|
438
|
+
_DynamsoftBarcodeReader.new_CQRCodeDetails(
|
|
439
|
+
rows,
|
|
440
|
+
columns,
|
|
441
|
+
error_correction_level,
|
|
442
|
+
version,
|
|
443
|
+
model,
|
|
444
|
+
mode,
|
|
445
|
+
page,
|
|
446
|
+
total_page,
|
|
447
|
+
parity_data,
|
|
448
|
+
),
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CQRCodeDetails
|
|
452
|
+
rows: int = property(
|
|
453
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_rows_get,
|
|
454
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_rows_set,
|
|
455
|
+
)
|
|
456
|
+
columns: int = property(
|
|
457
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_columns_get,
|
|
458
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_columns_set,
|
|
459
|
+
)
|
|
460
|
+
error_correction_level: int = property(
|
|
461
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_errorCorrectionLevel_get,
|
|
462
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_errorCorrectionLevel_set,
|
|
463
|
+
)
|
|
464
|
+
version: int = property(
|
|
465
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_version_get,
|
|
466
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_version_set,
|
|
467
|
+
)
|
|
468
|
+
model: int = property(
|
|
469
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_model_get,
|
|
470
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_model_set,
|
|
471
|
+
)
|
|
472
|
+
mode: int = property(
|
|
473
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_mode_get,
|
|
474
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_mode_set,
|
|
475
|
+
)
|
|
476
|
+
page: int = property(
|
|
477
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_page_get,
|
|
478
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_page_set,
|
|
479
|
+
)
|
|
480
|
+
total_page: int = property(
|
|
481
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_totalPage_get,
|
|
482
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_totalPage_set,
|
|
483
|
+
)
|
|
484
|
+
parity_data: int = property(
|
|
485
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_parityData_get,
|
|
486
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_parityData_set,
|
|
487
|
+
)
|
|
488
|
+
data_mask_pattern: int = property(
|
|
489
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_dataMaskPattern_get,
|
|
490
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_dataMaskPattern_set,
|
|
491
|
+
)
|
|
492
|
+
codewords: bytes = property(
|
|
493
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_codewords_get,
|
|
494
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_codewords_set,
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
_DynamsoftBarcodeReader.CQRCodeDetails_register(QRCodeDetails)
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
class PDF417Details(BarcodeDetails):
|
|
502
|
+
"""
|
|
503
|
+
The PDF417Details class represents a barcode in PDF417 format.
|
|
504
|
+
It inherits from the BarcodeDetails class and contains information about the row count, column count, and error correction level of the barcode.
|
|
505
|
+
|
|
506
|
+
Attributes:
|
|
507
|
+
rows (int): The number of rows in the PDF417 barcode.
|
|
508
|
+
columns (int): The number of columns in the PDF417 barcode.
|
|
509
|
+
error_correction_level (int): The error correction level of PDF417 code.
|
|
510
|
+
has_left_row_indicator (int): Specifies whether the left row indicator of the PDF417 code exists.
|
|
511
|
+
has_right_row_indicator (int): Specifies whether the right row indicator of the PDF417 code exists.
|
|
512
|
+
codewords (List[int]): The codewords of the PDF417 Code.
|
|
513
|
+
Methods:
|
|
514
|
+
__init__(self, rows: int = -1, columns: int = -1, level: int = -1, has_left_row_indicator: int = -1, has_right_row_indicator: int = -1): Initializes a new instance of the PDF417Details class.
|
|
515
|
+
"""
|
|
516
|
+
_thisown = property(
|
|
517
|
+
lambda self: self.this.own(),
|
|
518
|
+
lambda self, v: self.this.own(v),
|
|
519
|
+
doc="The membership flag",
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
def __init__(
|
|
523
|
+
self,
|
|
524
|
+
rows: int = -1,
|
|
525
|
+
columns: int = -1,
|
|
526
|
+
level: int = -1,
|
|
527
|
+
has_left_row_indicator: int = -1,
|
|
528
|
+
has_right_row_indicator: int = -1,
|
|
529
|
+
):
|
|
530
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
531
|
+
self,
|
|
532
|
+
_DynamsoftBarcodeReader.new_CPDF417Details(
|
|
533
|
+
rows, columns, level, has_left_row_indicator, has_right_row_indicator
|
|
534
|
+
),
|
|
535
|
+
)
|
|
536
|
+
|
|
537
|
+
rows: int = property(
|
|
538
|
+
_DynamsoftBarcodeReader.CPDF417Details_rows_get,
|
|
539
|
+
_DynamsoftBarcodeReader.CPDF417Details_rows_set,
|
|
540
|
+
doc="The number of rows in the PDF417 barcode.",
|
|
541
|
+
)
|
|
542
|
+
columns: int = property(
|
|
543
|
+
_DynamsoftBarcodeReader.CPDF417Details_columns_get,
|
|
544
|
+
_DynamsoftBarcodeReader.CPDF417Details_columns_set,
|
|
545
|
+
doc="The number of columns in the PDF417 barcode.",
|
|
546
|
+
)
|
|
547
|
+
error_correction_level: int = property(
|
|
548
|
+
_DynamsoftBarcodeReader.CPDF417Details_errorCorrectionLevel_get,
|
|
549
|
+
_DynamsoftBarcodeReader.CPDF417Details_errorCorrectionLevel_set,
|
|
550
|
+
doc="The error correction level of PDF417 code.",
|
|
551
|
+
)
|
|
552
|
+
has_left_row_indicator: int = property(
|
|
553
|
+
_DynamsoftBarcodeReader.CPDF417Details_hasLeftRowIndicator_get,
|
|
554
|
+
_DynamsoftBarcodeReader.CPDF417Details_hasLeftRowIndicator_set,
|
|
555
|
+
doc="Specifies whether the left row indicator of the PDF417 code exists.",
|
|
556
|
+
)
|
|
557
|
+
has_right_row_indicator: int = property(
|
|
558
|
+
_DynamsoftBarcodeReader.CPDF417Details_hasRightRowIndicator_get,
|
|
559
|
+
_DynamsoftBarcodeReader.CPDF417Details_hasRightRowIndicator_set,
|
|
560
|
+
doc="Specifies whether the right row indicator of the PDF417 code exists.",
|
|
561
|
+
)
|
|
562
|
+
codewords: List[int] = property(
|
|
563
|
+
_DynamsoftBarcodeReader.CPDF417Details_codewords_get,
|
|
564
|
+
_DynamsoftBarcodeReader.CPDF417Details_codewords_set,
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CPDF417Details
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
_DynamsoftBarcodeReader.CPDF417Details_register(PDF417Details)
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
class DataMatrixDetails(BarcodeDetails):
|
|
574
|
+
"""
|
|
575
|
+
The DataMatrixDetails class represents the details of a DataMatrix barcode. It is derived from the BarcodeDetails class and contains various attributes related to the DataMatrix barcode.
|
|
576
|
+
|
|
577
|
+
Attributes:
|
|
578
|
+
rows (int): The row count of the DataMatrix barcode.
|
|
579
|
+
columns (int): The column count of the DataMatrix barcode.
|
|
580
|
+
data_region_rows (int): The data region row count of the DataMatrix barcode.
|
|
581
|
+
data_region_columns (int): The data region column count of the DataMatrix barcode.
|
|
582
|
+
data_region_number (int): The data region count.
|
|
583
|
+
|
|
584
|
+
Methods:
|
|
585
|
+
__init__(self, rows: int = -1, columns: int = -1, data_region_rows: int = -1, data_region_columns: int = -1, data_region_number: int = -1): Initialize a new instance of the CDataMatrixDetails class.
|
|
586
|
+
"""
|
|
587
|
+
_thisown = property(
|
|
588
|
+
lambda self: self.this.own(),
|
|
589
|
+
lambda self, v: self.this.own(v),
|
|
590
|
+
doc="The membership flag",
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
def __init__(
|
|
594
|
+
self,
|
|
595
|
+
rows: int = -1,
|
|
596
|
+
columns: int = -1,
|
|
597
|
+
data_region_rows: int = -1,
|
|
598
|
+
data_region_columns: int = -1,
|
|
599
|
+
data_region_number: int = -1,
|
|
600
|
+
):
|
|
601
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
602
|
+
self,
|
|
603
|
+
_DynamsoftBarcodeReader.new_CDataMatrixDetails(
|
|
604
|
+
rows, columns, data_region_rows, data_region_columns, data_region_number
|
|
605
|
+
),
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
rows: int = property(
|
|
609
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_rows_get,
|
|
610
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_rows_set,
|
|
611
|
+
doc="The row count of the DataMatrix barcode.",
|
|
612
|
+
)
|
|
613
|
+
columns: int = property(
|
|
614
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_columns_get,
|
|
615
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_columns_set,
|
|
616
|
+
doc="The column count of the DataMatrix barcode.",
|
|
617
|
+
)
|
|
618
|
+
data_region_rows: int = property(
|
|
619
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_dataRegionRows_get,
|
|
620
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_dataRegionRows_set,
|
|
621
|
+
doc="The data region row count of the DataMatrix barcode.",
|
|
622
|
+
)
|
|
623
|
+
data_region_columns: int = property(
|
|
624
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_dataRegionColumns_get,
|
|
625
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_dataRegionColumns_set,
|
|
626
|
+
doc="The data region column count of the DataMatrix barcode.",
|
|
627
|
+
)
|
|
628
|
+
data_region_number: int = property(
|
|
629
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_dataRegionNumber_get,
|
|
630
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_dataRegionNumber_set,
|
|
631
|
+
doc="The data region count.",
|
|
632
|
+
)
|
|
633
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CDataMatrixDetails
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
_DynamsoftBarcodeReader.CDataMatrixDetails_register(DataMatrixDetails)
|
|
637
|
+
|
|
638
|
+
class AztecDetails(BarcodeDetails):
|
|
639
|
+
"""
|
|
640
|
+
The AztecDetails class represents a barcode in Aztec format. It inherits from the BarcodeDetails class and contains information about the row count, column count, and layer number of the barcode.
|
|
641
|
+
|
|
642
|
+
Attributes:
|
|
643
|
+
rows (int): The number of rows in the Aztec barcode.
|
|
644
|
+
columns (int): The number of columns in the Aztec barcode.
|
|
645
|
+
layer_number (int): Specifies the layer number of the Aztec barcode.
|
|
646
|
+
"""
|
|
647
|
+
_thisown = property(
|
|
648
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
649
|
+
)
|
|
650
|
+
|
|
651
|
+
def __init__(self, rows: int = -1, columns: int = -1, layer_number: int = -1):
|
|
652
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
653
|
+
self, _DynamsoftBarcodeReader.new_CAztecDetails(rows, columns, layer_number)
|
|
654
|
+
)
|
|
655
|
+
|
|
656
|
+
rows: int = property(
|
|
657
|
+
_DynamsoftBarcodeReader.CAztecDetails_rows_get,
|
|
658
|
+
_DynamsoftBarcodeReader.CAztecDetails_rows_set,
|
|
659
|
+
doc="The number of rows in the Aztec barcode.",
|
|
660
|
+
)
|
|
661
|
+
columns: int = property(
|
|
662
|
+
_DynamsoftBarcodeReader.CAztecDetails_columns_get,
|
|
663
|
+
_DynamsoftBarcodeReader.CAztecDetails_columns_set,
|
|
664
|
+
doc="The number of columns in the Aztec barcode.",
|
|
665
|
+
)
|
|
666
|
+
layer_number: int = property(
|
|
667
|
+
_DynamsoftBarcodeReader.CAztecDetails_layerNumber_get,
|
|
668
|
+
_DynamsoftBarcodeReader.CAztecDetails_layerNumber_set,
|
|
669
|
+
doc="Specifies the layer number of the Aztec barcode. A negative number (-1, -2, -3, -4) specifies a compact Aztec code. A positive number (1, 2, .. 32) specifies a normal (full-range) Aztec code.",
|
|
670
|
+
)
|
|
671
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CAztecDetails
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
_DynamsoftBarcodeReader.CAztecDetails_register(AztecDetails)
|
|
675
|
+
class ECISegment:
|
|
676
|
+
"""
|
|
677
|
+
Represents the Extended Channel Interpretation (ECI) information within a barcode.
|
|
678
|
+
|
|
679
|
+
Attributes:
|
|
680
|
+
eci_value (int): ECI assignment number as defined by ISO/IEC 15424.
|
|
681
|
+
charset_encoding (str): Charset encoding name defined by IANA (e.g. "UTF-8", "ISO-8859-1").
|
|
682
|
+
start_index (int): Start index of this ECI segment in the decoded barcode bytes.
|
|
683
|
+
length (int): Length (in bytes) of this segment within the decoded barcode bytes.
|
|
684
|
+
"""
|
|
685
|
+
_thisown = property(
|
|
686
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
687
|
+
)
|
|
688
|
+
eci_value: int = property(
|
|
689
|
+
_DynamsoftBarcodeReader.CECISegment_eciValue_get,
|
|
690
|
+
_DynamsoftBarcodeReader.CECISegment_eciValue_set,
|
|
691
|
+
doc="ECI assignment number as defined by ISO/IEC 15424.",
|
|
692
|
+
)
|
|
693
|
+
charset_encoding: str = property(
|
|
694
|
+
_DynamsoftBarcodeReader.CECISegment_charsetEncoding_get,
|
|
695
|
+
_DynamsoftBarcodeReader.CECISegment_charsetEncoding_set,
|
|
696
|
+
doc="Charset encoding name defined by IANA (e.g. \"UTF-8\", \"ISO-8859-1\").",
|
|
697
|
+
)
|
|
698
|
+
start_index: int = property(
|
|
699
|
+
_DynamsoftBarcodeReader.CECISegment_startIndex_get,
|
|
700
|
+
_DynamsoftBarcodeReader.CECISegment_startIndex_set,
|
|
701
|
+
doc="Start index of this ECI segment in the decoded barcode bytes.",
|
|
702
|
+
)
|
|
703
|
+
length: int = property(
|
|
704
|
+
_DynamsoftBarcodeReader.CECISegment_length_get,
|
|
705
|
+
_DynamsoftBarcodeReader.CECISegment_length_set,
|
|
706
|
+
doc="Length (in bytes) of this segment within the decoded barcode bytes.",
|
|
707
|
+
)
|
|
708
|
+
def __init__(self):
|
|
709
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
710
|
+
self, _DynamsoftBarcodeReader.new_CECISegment()
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CECISegment
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
_DynamsoftBarcodeReader.CECISegment_register(ECISegment)
|
|
717
|
+
|
|
718
|
+
class BarcodeResultItem(CapturedResultItem):
|
|
719
|
+
"""
|
|
720
|
+
The BarcodeResultItem class represents a barcode result item decoded by barcode reader engine. It is derived from CapturedResultItem.
|
|
721
|
+
|
|
722
|
+
Methods:
|
|
723
|
+
get_format(self) -> int: Gets the format of the decoded barcode result.
|
|
724
|
+
get_format_string(self) -> str: Gets the format string of the decoded barcode result.
|
|
725
|
+
get_text(self) -> str: Gets the text result of the decoded barcode.
|
|
726
|
+
get_bytes(self) -> bytes: Gets the text bytes of the decoded barcode result.
|
|
727
|
+
get_location(self) -> Quadrilateral: Gets the location of the decoded barcode in a quadrilateral.
|
|
728
|
+
get_confidence(self) -> int: Gets the confidence of the decoded barcode result.
|
|
729
|
+
get_angle(self) -> int: Gets the angle of the decoded barcode result.
|
|
730
|
+
get_module_size(self) -> int: Gets the module size of the decoded barcode result.
|
|
731
|
+
get_details(self) -> BarcodeDetails: Gets the details of the decoded barcode result.
|
|
732
|
+
is_dpm(self) -> bool: Gets whether the decoded barcode is a DPM code.
|
|
733
|
+
is_mirrored(self) -> bool: Gets whether the decoded barcode is mirrored.
|
|
734
|
+
get_eci_segments(self) -> List[ECISegment]: Gets all the ECI segments in the barcode.
|
|
735
|
+
"""
|
|
736
|
+
_thisown = property(
|
|
737
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
def __init__(self):
|
|
741
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
742
|
+
|
|
743
|
+
def get_format(self) -> int:
|
|
744
|
+
"""
|
|
745
|
+
Gets the format of the decoded barcode result.
|
|
746
|
+
|
|
747
|
+
Returns:
|
|
748
|
+
The format of the decoded barcode result which is a value of the EnumBarcodeFormat enumeration.
|
|
749
|
+
"""
|
|
750
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetFormat(self)
|
|
751
|
+
|
|
752
|
+
def get_format_string(self) -> str:
|
|
753
|
+
"""
|
|
754
|
+
Gets the format string of the decoded barcode result.
|
|
755
|
+
|
|
756
|
+
Returns:
|
|
757
|
+
The format string of the decoded barcode result.
|
|
758
|
+
"""
|
|
759
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetFormatString(self)
|
|
760
|
+
|
|
761
|
+
def get_text(self) -> str:
|
|
762
|
+
"""
|
|
763
|
+
Gets the text result of the decoded barcode.
|
|
764
|
+
|
|
765
|
+
Returns:
|
|
766
|
+
The text result of the decoded barcode.
|
|
767
|
+
"""
|
|
768
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetText(self)
|
|
769
|
+
|
|
770
|
+
def get_bytes(self) -> bytes:
|
|
771
|
+
"""
|
|
772
|
+
Gets the text bytes of the decoded barcode result.
|
|
773
|
+
|
|
774
|
+
Returns:
|
|
775
|
+
The text bytes of the decoded barcode result.
|
|
776
|
+
"""
|
|
777
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetBytes(self)
|
|
778
|
+
|
|
779
|
+
def get_location(self) -> Quadrilateral:
|
|
780
|
+
"""
|
|
781
|
+
Gets the location of the decoded barcode in a quadrilateral.
|
|
782
|
+
|
|
783
|
+
Returns:
|
|
784
|
+
The location of the decoded barcode in a quadrilateral.
|
|
785
|
+
"""
|
|
786
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetLocation(self)
|
|
787
|
+
|
|
788
|
+
def get_confidence(self) -> int:
|
|
789
|
+
"""
|
|
790
|
+
Gets the confidence of the decoded barcode result.
|
|
791
|
+
|
|
792
|
+
Returns:
|
|
793
|
+
The confidence of the decoded barcode result.
|
|
794
|
+
"""
|
|
795
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetConfidence(self)
|
|
796
|
+
|
|
797
|
+
def get_angle(self) -> int:
|
|
798
|
+
"""
|
|
799
|
+
Gets the angle of the decoded barcode result.
|
|
800
|
+
|
|
801
|
+
Returns:
|
|
802
|
+
The angle of the decoded barcode result.
|
|
803
|
+
"""
|
|
804
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetAngle(self)
|
|
805
|
+
|
|
806
|
+
def get_module_size(self) -> int:
|
|
807
|
+
"""
|
|
808
|
+
Gets the module size of the decoded barcode result.
|
|
809
|
+
|
|
810
|
+
Returns:
|
|
811
|
+
The module size of the decoded barcode result.
|
|
812
|
+
"""
|
|
813
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetModuleSize(self)
|
|
814
|
+
|
|
815
|
+
def get_details(self) -> BarcodeDetails:
|
|
816
|
+
"""
|
|
817
|
+
Gets the details of the decoded barcode result.
|
|
818
|
+
|
|
819
|
+
Returns:
|
|
820
|
+
The details of the decoded barcode result.
|
|
821
|
+
"""
|
|
822
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_GetDetails(self)
|
|
823
|
+
|
|
824
|
+
def is_dpm(self) -> bool:
|
|
825
|
+
"""
|
|
826
|
+
Gets whether the decoded barcode is a DPM code.
|
|
827
|
+
|
|
828
|
+
Returns:
|
|
829
|
+
Whether the decoded barcode is a DPM code.
|
|
830
|
+
"""
|
|
831
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_IsDPM(self)
|
|
832
|
+
|
|
833
|
+
def is_mirrored(self) -> bool:
|
|
834
|
+
"""
|
|
835
|
+
Gets whether the decoded barcode is mirrored.
|
|
836
|
+
|
|
837
|
+
Returns:
|
|
838
|
+
Whether the decoded barcode is mirrored.
|
|
839
|
+
"""
|
|
840
|
+
return _DynamsoftBarcodeReader.CBarcodeResultItem_IsMirrored(self)
|
|
841
|
+
|
|
842
|
+
def get_eci_segments(self) -> List[ECISegment]:
|
|
843
|
+
"""
|
|
844
|
+
Gets all the ECI segments in the barcode.
|
|
845
|
+
|
|
846
|
+
Returns:
|
|
847
|
+
A list of ECISegment objects.
|
|
848
|
+
"""
|
|
849
|
+
count = _DynamsoftBarcodeReader.CBarcodeResultItem_GetECISegmentsCount(self)
|
|
850
|
+
result = []
|
|
851
|
+
for i in range(count):
|
|
852
|
+
eci = _DynamsoftBarcodeReader.CBarcodeResultItem_GetECISegment(self, i)
|
|
853
|
+
if eci is not None:
|
|
854
|
+
result.append(eci)
|
|
855
|
+
return result
|
|
856
|
+
_DynamsoftBarcodeReader.CBarcodeResultItem_register(BarcodeResultItem)
|
|
857
|
+
|
|
858
|
+
class DecodedBarcodesResult(CapturedResultBase):
|
|
859
|
+
"""
|
|
860
|
+
The DecodedBarcodesResult class represents the result of a barcode reading process.
|
|
861
|
+
It provides access to information about the decoded barcodes, the source image, and any errors that occurred during the barcode reading process.
|
|
862
|
+
|
|
863
|
+
Methods:
|
|
864
|
+
get_error_code(self) -> int: Gets the error code of the barcode reading result, if an error occurred.
|
|
865
|
+
get_error_string(self) -> str: Gets the error message of the barcode reading result, if an error occurred.
|
|
866
|
+
get_items(self) -> List[BarcodeResultItem]: Gets all the decoded barcode result items.
|
|
867
|
+
get_original_image_hash_id(self) -> str: Gets the hash ID of the source image.
|
|
868
|
+
get_original_image_tag(self) -> ImageTag: Gets the tag of the source image.
|
|
869
|
+
get_rotation_transform_matrix(self) -> List[float]: Gets the 3x3 rotation transformation matrix of the original image relative to the rotated image.
|
|
870
|
+
"""
|
|
871
|
+
_thisown = property(
|
|
872
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
873
|
+
)
|
|
874
|
+
|
|
875
|
+
def __init__(self):
|
|
876
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
877
|
+
|
|
878
|
+
__destroy__ = _DynamsoftBarcodeReader.CDecodedBarcodesResult_Release
|
|
879
|
+
|
|
880
|
+
def get_items(self) -> List[BarcodeResultItem]:
|
|
881
|
+
"""
|
|
882
|
+
Gets all the decoded barcode result items.
|
|
883
|
+
|
|
884
|
+
Returns:
|
|
885
|
+
A list of BarcodeResultItem objects with all the decoded barcode result items.
|
|
886
|
+
"""
|
|
887
|
+
list = []
|
|
888
|
+
count = _DynamsoftBarcodeReader.CDecodedBarcodesResult_GetItemsCount(self)
|
|
889
|
+
for i in range(count):
|
|
890
|
+
list.append(_DynamsoftBarcodeReader.CDecodedBarcodesResult_GetItem(self, i))
|
|
891
|
+
return list
|
|
892
|
+
|
|
893
|
+
_DynamsoftBarcodeReader.CDecodedBarcodesResult_register(DecodedBarcodesResult)
|
|
894
|
+
|
|
895
|
+
#new
|
|
896
|
+
|
|
897
|
+
class LocalizedBarcodeElement(RegionObjectElement):
|
|
898
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
899
|
+
|
|
900
|
+
def __init__(self, *args, **kwargs):
|
|
901
|
+
_DynamsoftBarcodeReader.Class_init(self, _DynamsoftBarcodeReader.CBarcodeReaderModule_CreateLocalizedBarcodeElement())
|
|
902
|
+
|
|
903
|
+
def get_possible_formats(self) -> int:
|
|
904
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_GetPossibleFormats(self)
|
|
905
|
+
|
|
906
|
+
def get_possible_formats_string(self) -> str:
|
|
907
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_GetPossibleFormatsString(self)
|
|
908
|
+
|
|
909
|
+
def get_angle(self) -> int:
|
|
910
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_GetAngle(self)
|
|
911
|
+
|
|
912
|
+
def get_module_size(self) -> int:
|
|
913
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_GetModuleSize(self)
|
|
914
|
+
|
|
915
|
+
def get_confidence(self) -> int:
|
|
916
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_GetConfidence(self)
|
|
917
|
+
|
|
918
|
+
def set_possible_formats(self, possible_formats: int) -> None:
|
|
919
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_SetPossibleFormats(self, possible_formats)
|
|
920
|
+
|
|
921
|
+
def set_location(self, location: Quadrilateral) -> int:
|
|
922
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodeElement_SetLocation(self, location)
|
|
923
|
+
|
|
924
|
+
# Register CLocalizedBarcodeElement in _DynamsoftBarcodeReader:
|
|
925
|
+
_DynamsoftBarcodeReader.CLocalizedBarcodeElement_register(LocalizedBarcodeElement)
|
|
926
|
+
class DecodedBarcodeElement(RegionObjectElement):
|
|
927
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
928
|
+
def __init__(self, *args, **kwargs):
|
|
929
|
+
_DynamsoftBarcodeReader.Class_init(self, _DynamsoftBarcodeReader.CBarcodeReaderModule_CreateDecodedBarcodeElement())
|
|
930
|
+
|
|
931
|
+
def get_format(self) -> int:
|
|
932
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetFormat(self)
|
|
933
|
+
|
|
934
|
+
def get_format_string(self) -> str:
|
|
935
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetFormatString(self)
|
|
936
|
+
|
|
937
|
+
def get_text(self) -> str:
|
|
938
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetText(self)
|
|
939
|
+
|
|
940
|
+
def get_bytes(self) -> bytes:
|
|
941
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetBytes(self)
|
|
942
|
+
|
|
943
|
+
def get_details(self) -> BarcodeDetails:
|
|
944
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetDetails(self)
|
|
945
|
+
|
|
946
|
+
def is_dpm(self) -> bool:
|
|
947
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_IsDPM(self)
|
|
948
|
+
|
|
949
|
+
def is_mirrored(self) -> bool:
|
|
950
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_IsMirrored(self)
|
|
951
|
+
|
|
952
|
+
def get_angle(self) -> int:
|
|
953
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetAngle(self)
|
|
954
|
+
|
|
955
|
+
def get_module_size(self) -> int:
|
|
956
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetModuleSize(self)
|
|
957
|
+
|
|
958
|
+
def get_confidence(self) -> int:
|
|
959
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetConfidence(self)
|
|
960
|
+
|
|
961
|
+
def get_extended_barcode_results_count(self) -> int:
|
|
962
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetExtendedBarcodeResultsCount(self)
|
|
963
|
+
|
|
964
|
+
def get_extended_barcode_result(self, index: int) -> "ExtendedBarcodeResult":
|
|
965
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetExtendedBarcodeResult(self, index)
|
|
966
|
+
|
|
967
|
+
def set_format(self, format: int) -> None:
|
|
968
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_SetFormat(self, format)
|
|
969
|
+
|
|
970
|
+
def set_text(self, text: str) -> None:
|
|
971
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_SetText(self, text)
|
|
972
|
+
|
|
973
|
+
def set_bytes(self, bytes: bytes):
|
|
974
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_SetBytes(self, bytes)
|
|
975
|
+
|
|
976
|
+
def set_confidence(self, confidence: int) -> None:
|
|
977
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_SetConfidence(self, confidence)
|
|
978
|
+
|
|
979
|
+
def set_location(self, location: Quadrilateral) -> int:
|
|
980
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodeElement_SetLocation(self, location)
|
|
981
|
+
|
|
982
|
+
def get_eci_segments(self) -> List[ECISegment]:
|
|
983
|
+
"""
|
|
984
|
+
Gets all the ECI segments in the barcode.
|
|
985
|
+
|
|
986
|
+
Returns:
|
|
987
|
+
A list of ECISegment objects.
|
|
988
|
+
"""
|
|
989
|
+
count = _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetECISegmentsCount(self)
|
|
990
|
+
result = []
|
|
991
|
+
for i in range(count):
|
|
992
|
+
eci = _DynamsoftBarcodeReader.CDecodedBarcodeElement_GetECISegment(self, i)
|
|
993
|
+
if eci is not None:
|
|
994
|
+
result.append(eci)
|
|
995
|
+
return result
|
|
996
|
+
|
|
997
|
+
_DynamsoftBarcodeReader.CDecodedBarcodeElement_register(DecodedBarcodeElement)
|
|
998
|
+
class ExtendedBarcodeResult(DecodedBarcodeElement):
|
|
999
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1000
|
+
|
|
1001
|
+
def __init__(self, *args, **kwargs):
|
|
1002
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
def get_extended_barcode_result_type(self) -> int:
|
|
1006
|
+
return _DynamsoftBarcodeReader.CExtendedBarcodeResult_GetExtendedBarcodeResultType(self)
|
|
1007
|
+
|
|
1008
|
+
def get_deformation(self) -> int:
|
|
1009
|
+
return _DynamsoftBarcodeReader.CExtendedBarcodeResult_GetDeformation(self)
|
|
1010
|
+
|
|
1011
|
+
def get_clarity(self) -> int:
|
|
1012
|
+
return _DynamsoftBarcodeReader.CExtendedBarcodeResult_GetClarity(self)
|
|
1013
|
+
|
|
1014
|
+
def get_sampling_image(self) -> ImageData:
|
|
1015
|
+
return _DynamsoftBarcodeReader.CExtendedBarcodeResult_GetSamplingImage(self)
|
|
1016
|
+
|
|
1017
|
+
# Register CExtendedBarcodeResult in _DynamsoftBarcodeReader:
|
|
1018
|
+
_DynamsoftBarcodeReader.CExtendedBarcodeResult_register(ExtendedBarcodeResult)
|
|
1019
|
+
class CandidateBarcodeZone:
|
|
1020
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1021
|
+
|
|
1022
|
+
def __init__(self, location: Quadrilateral=None, possibleFormats: int=None):
|
|
1023
|
+
if (location is not None) != (possibleFormats is not None):
|
|
1024
|
+
raise TypeError("CandidateBarcodeZone() requires either 0 or 2 arguments")
|
|
1025
|
+
_DynamsoftBarcodeReader.Class_init(self, _DynamsoftBarcodeReader.new_CCandidateBarcodeZone(location, possibleFormats))
|
|
1026
|
+
|
|
1027
|
+
def get_location(self) -> Quadrilateral:
|
|
1028
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZone_GetLocation(self)
|
|
1029
|
+
|
|
1030
|
+
def set_location(self, loc: Quadrilateral) -> None:
|
|
1031
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZone_SetLocation(self, loc)
|
|
1032
|
+
|
|
1033
|
+
def get_possible_formats(self) -> int:
|
|
1034
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZone_GetPossibleFormats(self)
|
|
1035
|
+
|
|
1036
|
+
def set_possible_formats(self, formats: int) -> None:
|
|
1037
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZone_SetPossibleFormats(self, formats)
|
|
1038
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CCandidateBarcodeZone
|
|
1039
|
+
|
|
1040
|
+
# Register CCandidateBarcodeZone in _DynamsoftBarcodeReader:
|
|
1041
|
+
_DynamsoftBarcodeReader.CCandidateBarcodeZone_register(CandidateBarcodeZone)
|
|
1042
|
+
class CandidateBarcodeZonesUnit(IntermediateResultUnit):
|
|
1043
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1044
|
+
|
|
1045
|
+
def __init__(self, *args, **kwargs):
|
|
1046
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
def get_count(self) -> int:
|
|
1050
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_GetCount(self)
|
|
1051
|
+
|
|
1052
|
+
def get_candidate_barcode_zone(self, index: int) -> Tuple[int, CandidateBarcodeZone]:
|
|
1053
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_GetCandidateBarcodeZone(self, index)
|
|
1054
|
+
|
|
1055
|
+
def remove_all_candidate_barcode_zones(self) -> None:
|
|
1056
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_RemoveAllCandidateBarcodeZones(self)
|
|
1057
|
+
|
|
1058
|
+
def remove_candidate_barcode_zone(self, index: int) -> int:
|
|
1059
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_RemoveCandidateBarcodeZone(self, index)
|
|
1060
|
+
def add_candidate_barcode_zone(self, barcode_zone: CandidateBarcodeZone, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1061
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_AddCandidateBarcodeZone(self, barcode_zone, matrix_to_original_image)
|
|
1062
|
+
|
|
1063
|
+
def set_candidate_barcode_zone(self, index: int, barcode_zone: CandidateBarcodeZone, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1064
|
+
return _DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_SetCandidateBarcodeZone(self, index, barcode_zone, matrix_to_original_image)
|
|
1065
|
+
|
|
1066
|
+
# Register CCandidateBarcodeZonesUnit in _DynamsoftBarcodeReader:
|
|
1067
|
+
_DynamsoftBarcodeReader.CCandidateBarcodeZonesUnit_register(CandidateBarcodeZonesUnit)
|
|
1068
|
+
|
|
1069
|
+
class LocalizedBarcodesUnit(IntermediateResultUnit):
|
|
1070
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1071
|
+
|
|
1072
|
+
def __init__(self, *args, **kwargs):
|
|
1073
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
def get_count(self) -> int:
|
|
1077
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodesUnit_GetCount(self)
|
|
1078
|
+
|
|
1079
|
+
def get_localized_barcode(self, index: int) -> LocalizedBarcodeElement:
|
|
1080
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodesUnit_GetLocalizedBarcode(self, index)
|
|
1081
|
+
|
|
1082
|
+
def remove_all_localized_barcodes(self) -> None:
|
|
1083
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodesUnit_RemoveAllLocalizedBarcodes(self)
|
|
1084
|
+
|
|
1085
|
+
def remove_localized_barcode(self, index: int) -> int:
|
|
1086
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodesUnit_RemoveLocalizedBarcode(self, index)
|
|
1087
|
+
|
|
1088
|
+
def add_localized_barcode(self, element: LocalizedBarcodeElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1089
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodesUnit_AddLocalizedBarcode(self, element, matrix_to_original_image)
|
|
1090
|
+
|
|
1091
|
+
def set_localized_barcode(self, index: int, element: LocalizedBarcodeElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1092
|
+
return _DynamsoftBarcodeReader.CLocalizedBarcodesUnit_SetLocalizedBarcode(self, index, element, matrix_to_original_image)
|
|
1093
|
+
|
|
1094
|
+
# Register CLocalizedBarcodesUnit in _DynamsoftBarcodeReader:
|
|
1095
|
+
_DynamsoftBarcodeReader.CLocalizedBarcodesUnit_register(LocalizedBarcodesUnit)
|
|
1096
|
+
|
|
1097
|
+
class ScaledBarcodeImageUnit(IntermediateResultUnit):
|
|
1098
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1099
|
+
|
|
1100
|
+
def __init__(self, *args, **kwargs):
|
|
1101
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1102
|
+
|
|
1103
|
+
def get_image_data(self) -> ImageData:
|
|
1104
|
+
return _DynamsoftBarcodeReader.CScaledBarcodeImageUnit_GetImageData(self)
|
|
1105
|
+
|
|
1106
|
+
def set_image_data(self, image_data: ImageData) -> int:
|
|
1107
|
+
return _DynamsoftBarcodeReader.CScaledBarcodeImageUnit_SetImageData(self, image_data)
|
|
1108
|
+
|
|
1109
|
+
# Register CScaledBarcodeImageUnit in _DynamsoftBarcodeReader:
|
|
1110
|
+
_DynamsoftBarcodeReader.CScaledBarcodeImageUnit_register(ScaledBarcodeImageUnit)
|
|
1111
|
+
class DeformationResistedBarcode:
|
|
1112
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1113
|
+
|
|
1114
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CDeformationResistedBarcode
|
|
1115
|
+
|
|
1116
|
+
def __init__(self, *args):
|
|
1117
|
+
_DynamsoftBarcodeReader.Class_init(self, _DynamsoftBarcodeReader.new_CDeformationResistedBarcode(*args))
|
|
1118
|
+
|
|
1119
|
+
def get_image_data(self) -> ImageData:
|
|
1120
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcode_GetImageData(self)
|
|
1121
|
+
|
|
1122
|
+
def set_image_data(self, img: ImageData) -> None:
|
|
1123
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcode_SetImageData(self, img)
|
|
1124
|
+
|
|
1125
|
+
def get_location(self) -> Quadrilateral:
|
|
1126
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcode_GetLocation(self)
|
|
1127
|
+
|
|
1128
|
+
def set_location(self, loc: Quadrilateral) -> None:
|
|
1129
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcode_SetLocation(self, loc)
|
|
1130
|
+
|
|
1131
|
+
def get_format(self) -> int:
|
|
1132
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcode_GetFormat(self)
|
|
1133
|
+
|
|
1134
|
+
def set_format(self, format: int) -> None:
|
|
1135
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcode_SetFormat(self, format)
|
|
1136
|
+
|
|
1137
|
+
# Register CDeformationResistedBarcode in _DynamsoftBarcodeReader:
|
|
1138
|
+
_DynamsoftBarcodeReader.CDeformationResistedBarcode_register(DeformationResistedBarcode)
|
|
1139
|
+
|
|
1140
|
+
class DeformationResistedBarcodeImageUnit(IntermediateResultUnit):
|
|
1141
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1142
|
+
|
|
1143
|
+
def __init__(self, *args, **kwargs):
|
|
1144
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1145
|
+
|
|
1146
|
+
def get_deformation_resisted_barcode(self) -> DeformationResistedBarcode:
|
|
1147
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcodeImageUnit_GetDeformationResistedBarcode(self)
|
|
1148
|
+
|
|
1149
|
+
def set_deformation_resisted_barcode(self, barcode: DeformationResistedBarcode, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1150
|
+
return _DynamsoftBarcodeReader.CDeformationResistedBarcodeImageUnit_SetDeformationResistedBarcode(self, barcode, matrix_to_original_image)
|
|
1151
|
+
|
|
1152
|
+
# Register CDeformationResistedBarcodeImageUnit in _DynamsoftBarcodeReader:
|
|
1153
|
+
_DynamsoftBarcodeReader.CDeformationResistedBarcodeImageUnit_register(DeformationResistedBarcodeImageUnit)
|
|
1154
|
+
|
|
1155
|
+
class ComplementedBarcodeImageUnit(IntermediateResultUnit):
|
|
1156
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1157
|
+
|
|
1158
|
+
def __init__(self, *args, **kwargs):
|
|
1159
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1160
|
+
|
|
1161
|
+
def get_image_data(self) -> ImageData:
|
|
1162
|
+
return _DynamsoftBarcodeReader.CComplementedBarcodeImageUnit_GetImageData(self)
|
|
1163
|
+
|
|
1164
|
+
def get_location(self) -> Quadrilateral:
|
|
1165
|
+
return _DynamsoftBarcodeReader.CComplementedBarcodeImageUnit_GetLocation(self)
|
|
1166
|
+
|
|
1167
|
+
def set_location(self, location: Quadrilateral, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1168
|
+
return _DynamsoftBarcodeReader.CComplementedBarcodeImageUnit_SetLocation(self, location, matrix_to_original_image)
|
|
1169
|
+
|
|
1170
|
+
# Register CComplementedBarcodeImageUnit in _DynamsoftBarcodeReader:
|
|
1171
|
+
_DynamsoftBarcodeReader.CComplementedBarcodeImageUnit_register(ComplementedBarcodeImageUnit)
|
|
1172
|
+
class DecodedBarcodesUnit(IntermediateResultUnit):
|
|
1173
|
+
_thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
|
|
1174
|
+
|
|
1175
|
+
def __init__(self, *args, **kwargs):
|
|
1176
|
+
raise AttributeError("No constructor defined - class is abstract")
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
def get_count(self) -> int:
|
|
1180
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodesUnit_GetCount(self)
|
|
1181
|
+
|
|
1182
|
+
def get_decoded_barcode(self, index: int) -> DecodedBarcodeElement:
|
|
1183
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodesUnit_GetDecodedBarcode(self, index)
|
|
1184
|
+
|
|
1185
|
+
def remove_all_decoded_barcodes(self) -> None:
|
|
1186
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodesUnit_RemoveAllDecodedBarcodes(self)
|
|
1187
|
+
|
|
1188
|
+
def set_decoded_barcode(self, element: DecodedBarcodeElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
|
|
1189
|
+
return _DynamsoftBarcodeReader.CDecodedBarcodesUnit_SetDecodedBarcode(self, element, matrix_to_original_image)
|
|
1190
|
+
|
|
1191
|
+
# Register CDecodedBarcodesUnit in _DynamsoftBarcodeReader:
|
|
1192
|
+
_DynamsoftBarcodeReader.CDecodedBarcodesUnit_register(DecodedBarcodesUnit)
|
|
1193
|
+
|
|
1194
|
+
class BarcodeReaderModule:
|
|
1195
|
+
"""
|
|
1196
|
+
The BarcodeReaderModule class defines general functions in the barcode reader module.
|
|
1197
|
+
|
|
1198
|
+
Methods:
|
|
1199
|
+
get_version() -> str: Returns the version of the barcode reader module.
|
|
1200
|
+
"""
|
|
1201
|
+
_thisown = property(
|
|
1202
|
+
lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
@staticmethod
|
|
1206
|
+
def get_version() -> str:
|
|
1207
|
+
"""
|
|
1208
|
+
Returns the version of the barcode reader module.
|
|
1209
|
+
|
|
1210
|
+
Returns:
|
|
1211
|
+
A string representing the version of the barcode reader module.
|
|
1212
|
+
"""
|
|
1213
|
+
return __version__ + " (Algorithm " + _DynamsoftBarcodeReader.CBarcodeReaderModule_GetVersion() + ")"
|
|
1214
|
+
|
|
1215
|
+
def __init__(self):
|
|
1216
|
+
_DynamsoftBarcodeReader.Class_init(
|
|
1217
|
+
self, _DynamsoftBarcodeReader.new_CBarcodeReaderModule()
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1220
|
+
__destroy__ = _DynamsoftBarcodeReader.delete_CBarcodeReaderModule
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
_DynamsoftBarcodeReader.CBarcodeReaderModule_register(BarcodeReaderModule)
|