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.
Files changed (75) hide show
  1. dynamsoft_capture_vision_bundle/ConfusableChars.data +0 -0
  2. dynamsoft_capture_vision_bundle/DynamicPdfx64.dll +0 -0
  3. dynamsoft_capture_vision_bundle/DynamsoftBarcodeReaderx64.dll +0 -0
  4. dynamsoft_capture_vision_bundle/DynamsoftCaptureVisionRouterx64.dll +0 -0
  5. dynamsoft_capture_vision_bundle/DynamsoftCodeParserDedicatorx64.dll +0 -0
  6. dynamsoft_capture_vision_bundle/DynamsoftCodeParserx64.dll +0 -0
  7. dynamsoft_capture_vision_bundle/DynamsoftCorex64.dll +0 -0
  8. dynamsoft_capture_vision_bundle/DynamsoftDocumentNormalizerx64.dll +0 -0
  9. dynamsoft_capture_vision_bundle/DynamsoftIdentityUtilityx64.dll +0 -0
  10. dynamsoft_capture_vision_bundle/DynamsoftImageProcessingx64.dll +0 -0
  11. dynamsoft_capture_vision_bundle/DynamsoftLabelRecognizerx64.dll +0 -0
  12. dynamsoft_capture_vision_bundle/DynamsoftLicensex64.dll +0 -0
  13. dynamsoft_capture_vision_bundle/DynamsoftNeuralNetworkx64.dll +0 -0
  14. dynamsoft_capture_vision_bundle/DynamsoftUtilityx64.dll +0 -0
  15. dynamsoft_capture_vision_bundle/Models/Code128Decoder.data +0 -0
  16. dynamsoft_capture_vision_bundle/Models/Code39ITFDecoder.data +0 -0
  17. dynamsoft_capture_vision_bundle/Models/DataMatrixQRCodeDeblur.data +0 -0
  18. dynamsoft_capture_vision_bundle/Models/DataMatrixQRCodeLocalization.data +0 -0
  19. dynamsoft_capture_vision_bundle/Models/EAN13Decoder.data +0 -0
  20. dynamsoft_capture_vision_bundle/Models/LetterCharRecognition.data +0 -0
  21. dynamsoft_capture_vision_bundle/Models/LowercaseCharRecognition.data +0 -0
  22. dynamsoft_capture_vision_bundle/Models/MRZCharRecognition.data +0 -0
  23. dynamsoft_capture_vision_bundle/Models/MRZLocalization.data +0 -0
  24. dynamsoft_capture_vision_bundle/Models/MRZTextLineRecognition.data +0 -0
  25. dynamsoft_capture_vision_bundle/Models/NumberCharRecognition.data +0 -0
  26. dynamsoft_capture_vision_bundle/Models/NumberLetterCharRecognition.data +0 -0
  27. dynamsoft_capture_vision_bundle/Models/NumberLowercaseCharRecognition.data +0 -0
  28. dynamsoft_capture_vision_bundle/Models/NumberUppercaseCharRecognition.data +0 -0
  29. dynamsoft_capture_vision_bundle/Models/OneDDeblur.data +0 -0
  30. dynamsoft_capture_vision_bundle/Models/OneDLocalization.data +0 -0
  31. dynamsoft_capture_vision_bundle/Models/PDF417Deblur.data +0 -0
  32. dynamsoft_capture_vision_bundle/Models/PDF417Localization.data +0 -0
  33. dynamsoft_capture_vision_bundle/Models/UppercaseCharRecognition.data +0 -0
  34. dynamsoft_capture_vision_bundle/Models/VINCharRecognition.data +0 -0
  35. dynamsoft_capture_vision_bundle/OverlappingChars.data +1 -0
  36. dynamsoft_capture_vision_bundle/ParserResources/AADHAAR.data +0 -0
  37. dynamsoft_capture_vision_bundle/ParserResources/AAMVA_DL_ID.data +1 -0
  38. dynamsoft_capture_vision_bundle/ParserResources/GS1_AI.data +66 -0
  39. dynamsoft_capture_vision_bundle/ParserResources/MRTD.data +1 -0
  40. dynamsoft_capture_vision_bundle/ParserResources/SOUTH_AFRICA_DL.data +1 -0
  41. dynamsoft_capture_vision_bundle/ParserResources/VIN.data +0 -0
  42. dynamsoft_capture_vision_bundle/Templates/DBR-PresetTemplates.json +546 -0
  43. dynamsoft_capture_vision_bundle/Templates/DDN-PresetTemplates.json +316 -0
  44. dynamsoft_capture_vision_bundle/Templates/DLR-PresetTemplates.json +471 -0
  45. dynamsoft_capture_vision_bundle/Templates/DriverLicenseScanner.json +94 -0
  46. dynamsoft_capture_vision_bundle/Templates/MRZScanner.json +804 -0
  47. dynamsoft_capture_vision_bundle/Templates/VINScanner.json +299 -0
  48. dynamsoft_capture_vision_bundle/_DynamsoftBarcodeReader.cp314-win_amd64.pyd +0 -0
  49. dynamsoft_capture_vision_bundle/_DynamsoftCaptureVisionRouter.cp314-win_amd64.pyd +0 -0
  50. dynamsoft_capture_vision_bundle/_DynamsoftCodeParser.cp314-win_amd64.pyd +0 -0
  51. dynamsoft_capture_vision_bundle/_DynamsoftCodeParserDedicator.cp314-win_amd64.pyd +0 -0
  52. dynamsoft_capture_vision_bundle/_DynamsoftCore.cp314-win_amd64.pyd +0 -0
  53. dynamsoft_capture_vision_bundle/_DynamsoftDocumentNormalizer.cp314-win_amd64.pyd +0 -0
  54. dynamsoft_capture_vision_bundle/_DynamsoftIdentityUtility.cp314-win_amd64.pyd +0 -0
  55. dynamsoft_capture_vision_bundle/_DynamsoftImageProcessing.cp314-win_amd64.pyd +0 -0
  56. dynamsoft_capture_vision_bundle/_DynamsoftLabelRecognizer.cp314-win_amd64.pyd +0 -0
  57. dynamsoft_capture_vision_bundle/_DynamsoftLicense.cp314-win_amd64.pyd +0 -0
  58. dynamsoft_capture_vision_bundle/_DynamsoftUtility.cp314-win_amd64.pyd +0 -0
  59. dynamsoft_capture_vision_bundle/__init__.py +13 -0
  60. dynamsoft_capture_vision_bundle/core.py +2785 -0
  61. dynamsoft_capture_vision_bundle/cvr.py +1347 -0
  62. dynamsoft_capture_vision_bundle/dbr.py +1223 -0
  63. dynamsoft_capture_vision_bundle/dcp.py +208 -0
  64. dynamsoft_capture_vision_bundle/dcpd.py +21 -0
  65. dynamsoft_capture_vision_bundle/ddn.py +985 -0
  66. dynamsoft_capture_vision_bundle/dip.py +24 -0
  67. dynamsoft_capture_vision_bundle/dlr.py +1136 -0
  68. dynamsoft_capture_vision_bundle/id_utility.py +98 -0
  69. dynamsoft_capture_vision_bundle/license.py +146 -0
  70. dynamsoft_capture_vision_bundle/utility.py +835 -0
  71. dynamsoft_capture_vision_bundle-3.4.1000.dist-info/METADATA +89 -0
  72. dynamsoft_capture_vision_bundle-3.4.1000.dist-info/RECORD +75 -0
  73. dynamsoft_capture_vision_bundle-3.4.1000.dist-info/WHEEL +5 -0
  74. dynamsoft_capture_vision_bundle-3.4.1000.dist-info/licenses/LICENSE.txt +1 -0
  75. dynamsoft_capture_vision_bundle-3.4.1000.dist-info/top_level.txt +12 -0
@@ -0,0 +1,985 @@
1
+ __version__ = "3.0.40.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 _DynamsoftDocumentNormalizer
10
+ else:
11
+ import _DynamsoftDocumentNormalizer
12
+ from typing import List, Tuple, Union
13
+
14
+
15
+ from enum import IntEnum
16
+
17
+
18
+ class EnumImageColourMode(IntEnum):
19
+ ICM_COLOUR = _DynamsoftDocumentNormalizer.ICM_COLOUR
20
+ ICM_GRAYSCALE = _DynamsoftDocumentNormalizer.ICM_GRAYSCALE
21
+ ICM_BINARY = _DynamsoftDocumentNormalizer.ICM_BINARY
22
+
23
+ class SimplifiedDocumentNormalizerSettings:
24
+ """
25
+ The SimplifiedDocumentNormalizerSettings class contains settings for document normalization. It is a sub-parameter of SimplifiedCaptureVisionSettings.
26
+
27
+ Attributes:
28
+ 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.
29
+ grayscale_enhancement_modes(List[int]): Specifies how to enhance the quality of the grayscale image.
30
+ colour_mode(int): Specifies the colour mode of the output image.
31
+ page_size(List[int]): Specifies the page size (width by height in pixels) of the normalized image.
32
+ brightness(int): Specifies the brightness of the normalized image.
33
+ contrast(int): Specifies the contrast of the normalized image.
34
+ max_threads_in_one_task(int): Specifies the maximum available threads count in one document normalization task.
35
+ scale_down_threshold(int): Specifies the threshold for the image shrinking.
36
+ min_quadrilateral_area_ratio(int): Specifies the minimum ratio between the target quadrilateral area and the total image area. Only those exceeding this value will be output (measured in percentages).
37
+ expected_documents_count(int): Specifies the number of documents expected to be detected.
38
+ """
39
+ _thisown = property(
40
+ lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
41
+ )
42
+
43
+ @property
44
+ def grayscale_transformation_modes(self) -> List[int]:
45
+ if not hasattr(self, '_grayscale_transformation_modes') or self._grayscale_transformation_modes is None:
46
+ self._grayscale_transformation_modes = _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_grayscaleTransformationModes_get(self)
47
+ return self._grayscale_transformation_modes
48
+
49
+ @grayscale_transformation_modes.setter
50
+ def grayscale_transformation_modes(self, value: List[int]):
51
+ if not hasattr(self, '_grayscale_transformation_modes') or self._grayscale_transformation_modes is None:
52
+ self._grayscale_transformation_modes = _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_grayscaleTransformationModes_get(self)
53
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_grayscaleTransformationModes_set(self, value)
54
+ self._grayscale_transformation_modes = value
55
+ @property
56
+ def grayscale_enhancement_modes(self) -> List[int]:
57
+ if not hasattr(self, '_grayscale_enhancement_modes') or self._grayscale_enhancement_modes is None:
58
+ self._grayscale_enhancement_modes = _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_grayscaleEnhancementModes_get(self)
59
+ return self._grayscale_enhancement_modes
60
+
61
+ @grayscale_enhancement_modes.setter
62
+ def grayscale_enhancement_modes(self, value: List[int]):
63
+ if not hasattr(self, '_grayscale_enhancement_modes') or self._grayscale_enhancement_modes is None:
64
+ self._grayscale_enhancement_modes = _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_grayscaleEnhancementModes_get(self)
65
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_grayscaleEnhancementModes_set(self, value)
66
+ self._grayscale_enhancement_modes = value
67
+ colour_mode: int = property(
68
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_colourMode_get,
69
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_colourMode_set,
70
+ doc="""
71
+ Specifies the colour mode of the output image.
72
+ It is a list of 8 integers, where each integer represents a mode specified by the EnumColourMode enumeration.
73
+ """
74
+ )
75
+ @property
76
+ def page_size(self) -> List[int]:
77
+ if not hasattr(self, '_page_size') or self._page_size is None:
78
+ self._page_size = _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_pageSize_get(self)
79
+ return self._page_size
80
+
81
+ @page_size.setter
82
+ def page_size(self, value: List[int]):
83
+ if not hasattr(self, '_page_size') or self._page_size is None:
84
+ self._page_size = _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_pageSize_get(self)
85
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_pageSize_set(self, value)
86
+ self._page_size = value
87
+
88
+ brightness: int = property(
89
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_brightness_get,
90
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_brightness_set,
91
+ doc="""
92
+ Specifies the brightness of the normalized image.
93
+ Value Range: [-100,100]
94
+ Default Value: 0
95
+ """
96
+ )
97
+ contrast: int = property(
98
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_contrast_get,
99
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_contrast_set,
100
+ doc="""
101
+ Specifies the contrast of the normalized image.
102
+ Value Range: [-100,100]
103
+ Default Value: 0
104
+ """
105
+ )
106
+ max_threads_in_one_task: int = property(
107
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_maxThreadsInOneTask_get,
108
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_maxThreadsInOneTask_set,
109
+ doc="""
110
+ Specifies the maximum available threads count in one document normalization task.
111
+ Value Range: [1,256]
112
+ Default Value: 4
113
+ """
114
+ )
115
+ scale_down_threshold: int = property(
116
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_scaleDownThreshold_get,
117
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_scaleDownThreshold_set,
118
+ doc="""
119
+ Specifies the threshold for the image shrinking.
120
+ Value Range: [512, 0x7fffffff]
121
+ Default Value: 2300
122
+ """
123
+ )
124
+ min_quadrilateral_area_ratio: int = property(
125
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_minQuadrilateralAreaRatio_get,
126
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_minQuadrilateralAreaRatio_set,
127
+ doc="""
128
+ Specifies the minimum ratio between the target quadrilateral area and the total image area.
129
+ Only those exceeding this value will be output (measured in percentages).
130
+ Value Range: [0, 100]
131
+ Default Value: 0, which means no limitation.
132
+ """
133
+ )
134
+ expected_documents_count: int = property(
135
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_expectedDocumentsCount_get,
136
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_expectedDocumentsCount_set,
137
+ doc="""
138
+ Specifies the number of documents expected to be detected.
139
+ Value Range: [0, 0x7fffffff]
140
+ Default Value: 0, which means the count is unknown. The library will try to find at least 1 document.
141
+ """
142
+ )
143
+
144
+ def __init__(self):
145
+ _DynamsoftDocumentNormalizer.Class_init(
146
+ self,
147
+ _DynamsoftDocumentNormalizer.new_SimplifiedDocumentNormalizerSettings(),
148
+ )
149
+
150
+ __destroy__ = (
151
+ _DynamsoftDocumentNormalizer.delete_SimplifiedDocumentNormalizerSettings
152
+ )
153
+
154
+
155
+ _DynamsoftDocumentNormalizer.SimplifiedDocumentNormalizerSettings_register(
156
+ SimplifiedDocumentNormalizerSettings
157
+ )
158
+
159
+ class DetectedQuadResultItem(CapturedResultItem):
160
+ """
161
+ The DetectedQuadResultItem class stores a captured result whose type is detected quad.
162
+
163
+ Methods:
164
+ get_location(self) -> Quadrilateral: Gets the location of current object.
165
+ get_confidence_as_document_boundary(self) -> int: Gets the confidence of current object as a document boundary.
166
+ get_cross_verification_status(self) -> EnumCrossVerificationStatus: Gets the status of current object as a verified document boundary.
167
+ get_local_to_original_matrix(self) -> List[float]: Gets the transformation matrix from the local coordinate system to the original image coordinate system.
168
+ """
169
+ _thisown = property(
170
+ lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
171
+ )
172
+
173
+ def __init__(self):
174
+ raise AttributeError("No constructor defined - class is abstract")
175
+
176
+ def get_location(self) -> Quadrilateral:
177
+ """
178
+ Gets the location of current object.
179
+
180
+ Returns:
181
+ The location of current object.
182
+ """
183
+ return _DynamsoftDocumentNormalizer.CDetectedQuadResultItem_GetLocation(self)
184
+
185
+ def get_confidence_as_document_boundary(self) -> int:
186
+ """
187
+ Gets the confidence of current object as a document boundary.
188
+
189
+ Returns:
190
+ The confidence as document boundary of the detected quad result.
191
+ """
192
+ return _DynamsoftDocumentNormalizer.CDetectedQuadResultItem_GetConfidenceAsDocumentBoundary(
193
+ self
194
+ )
195
+ def get_cross_verification_status(self) -> EnumCrossVerificationStatus:
196
+ """
197
+ Gets the status of current object as a verified document boundary.
198
+
199
+ Returns:
200
+ Return the CrossVerificationStatus of the detected quad result.
201
+ """
202
+ return _DynamsoftDocumentNormalizer.CDetectedQuadResultItem_GetCrossVerificationStatus(self)
203
+
204
+ _DynamsoftDocumentNormalizer.CDetectedQuadResultItem_register(DetectedQuadResultItem)
205
+
206
+
207
+ class DeskewedImageResultItem(CapturedResultItem):
208
+ """
209
+ The DeskewedImageResultItem class stores a captured result item whose type is deskewed image.
210
+
211
+ Methods:
212
+ get_image_data(self) -> ImageData: Gets the image data of current object.
213
+ get_source_deskew_quad(self) -> Quadrilateral: Gets the quadrilateral used for deskewing the image.
214
+ get_cross_verification_status(self) -> EnumCrossVerificationStatus: Gets the status of current object as a verified deskewed image.
215
+ get_local_to_original_matrix(self) -> List[float]: Gets the transformation matrix from the local coordinate system to the original image coordinate system.
216
+ """
217
+ _thisown = property(
218
+ lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
219
+ )
220
+
221
+ def __init__(self):
222
+ raise AttributeError("No constructor defined - class is abstract")
223
+
224
+ def get_image_data(self) -> ImageData:
225
+ """
226
+ Gets the image data of current object.
227
+
228
+ Returns:
229
+ The image data.
230
+ """
231
+ return _DynamsoftDocumentNormalizer.CDeskewedImageResultItem_GetImageData(
232
+ self
233
+ )
234
+
235
+ def get_source_deskew_quad(self) -> Quadrilateral:
236
+ """
237
+ Gets the quadrilateral used for deskewing the image.
238
+
239
+ Returns:
240
+ A CQuadrilateral object representing the four corners of the quadrilateral used to deskew the image.
241
+ """
242
+ return _DynamsoftDocumentNormalizer.CDeskewedImageResultItem_GetSourceDeskewQuad(self)
243
+
244
+ def get_cross_verification_status(self) -> EnumCrossVerificationStatus:
245
+ """
246
+ Gets the status of current object as a verified deskewed image.
247
+
248
+ Returns:
249
+ Return the CrossVerificationStatus of the deskewed image result.
250
+ """
251
+ return _DynamsoftDocumentNormalizer.CDeskewedImageResultItem_GetCrossVerificationStatus(self)
252
+
253
+ def get_original_to_local_matrix(self) -> List[float]:
254
+ """
255
+ Gets the transformation matrix from the local coordinate system to the original image coordinate system.
256
+
257
+ Returns:
258
+ A double array of size 9, representing the 3x3 transformation matrix that converts coordinates from the local image to the original image.
259
+ """
260
+ return _DynamsoftDocumentNormalizer.CDeskewedImageResultItem_GetOriginalToLocalMatrix(self)
261
+ _DynamsoftDocumentNormalizer.CDeskewedImageResultItem_register(
262
+ DeskewedImageResultItem
263
+ )
264
+
265
+ class EnhancedImageResultItem(CapturedResultItem):
266
+ """
267
+ The EnhancedImageResultItem class stores a captured result item whose type is enhanced image.
268
+
269
+ Methods:
270
+ get_image_data(self) -> ImageData: Gets the image data of current object.
271
+ get_local_to_original_matrix(self) -> List[float]: Gets the transformation matrix from the local coordinate system to the original image coordinate system.
272
+ """
273
+ _thisown = property(
274
+ lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
275
+ )
276
+ def __init__(self):
277
+ raise AttributeError("No constructor defined - class is abstract")
278
+
279
+ def get_image_data(self) -> ImageData:
280
+ """
281
+ Gets the image data of current object.
282
+
283
+ Returns:
284
+ The image data.
285
+ """
286
+ return _DynamsoftDocumentNormalizer.CEnhancedImageResultItem_GetImageData(
287
+ self
288
+ )
289
+
290
+ def get_original_to_local_matrix(self) -> List[float]:
291
+ """
292
+ Gets the transformation matrix from the local coordinate system to the original image coordinate system.
293
+
294
+ Returns:
295
+ A double array of size 9, representing the 3x3 transformation matrix that converts coordinates from the local image to the original image.
296
+ """
297
+ return _DynamsoftDocumentNormalizer.CEnhancedImageResultItem_GetOriginalToLocalMatrix(
298
+ self
299
+ )
300
+
301
+
302
+ _DynamsoftDocumentNormalizer.CEnhancedImageResultItem_register(EnhancedImageResultItem)
303
+
304
+ class ProcessedDocumentResult(CapturedResultBase):
305
+ """
306
+ The ProcessedDocumentResult class stores a collection of captured result items.
307
+
308
+ Methods:
309
+ get_detected_quad_result_items(self, index: int) -> DetectedQuadResultItem: Retrieves the detected quad result items.
310
+ get_deskewed_image_result_items(self, index: int) -> DeskewedImageResultItem: Retrieves the deskewed image result items.
311
+ get_enhanced_image_result_items(self, index: int) -> EnhancedImageResultItem: Retrieves the enhanced image result items.
312
+ """
313
+ _thisown = property(
314
+ lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
315
+ )
316
+
317
+ def __init__(self):
318
+ raise AttributeError("No constructor defined - class is abstract")
319
+
320
+ def get_detected_quad_result_items(self) -> List[DetectedQuadResultItem]:
321
+ """
322
+ Retrieves the detected quad result items.
323
+
324
+ Returns:
325
+ A DetectedQuadResultItem object representing the detected quad result items.
326
+ """
327
+ list = []
328
+ count = _DynamsoftDocumentNormalizer.CProcessedDocumentResult_GetDetectedQuadResultItemsCount(self)
329
+ for i in range(count):
330
+ list.append(_DynamsoftDocumentNormalizer.CProcessedDocumentResult_GetDetectedQuadResultItem(self, i))
331
+ return list
332
+
333
+ def get_deskewed_image_result_items(self) -> List[DeskewedImageResultItem]:
334
+ """
335
+ Retrieves the deskewed image result items.
336
+
337
+ Returns:
338
+ A DeskewedImageResultItem object representing the deskewed image result items.
339
+ """
340
+ list = []
341
+ count = _DynamsoftDocumentNormalizer.CProcessedDocumentResult_GetDeskewedImageResultItemsCount(self)
342
+ for i in range(count):
343
+ list.append(_DynamsoftDocumentNormalizer.CProcessedDocumentResult_GetDeskewedImageResultItem(self, i))
344
+ return list
345
+
346
+ def get_enhanced_image_result_items(self) -> List[EnhancedImageResultItem]:
347
+ """
348
+ Retrieves the enhanced image result items.
349
+
350
+ Returns:
351
+ A EnhancedImageResultItem object representing the enhanced image result items.
352
+ """
353
+ list = []
354
+ count = _DynamsoftDocumentNormalizer.CProcessedDocumentResult_GetEnhancedImageResultItemsCount(self)
355
+ for i in range(count):
356
+ list.append(_DynamsoftDocumentNormalizer.CProcessedDocumentResult_GetEnhancedImageResultItem(self, i))
357
+ return list
358
+
359
+ __destroy__ = _DynamsoftDocumentNormalizer.CProcessedDocumentResult_Release
360
+
361
+ _DynamsoftDocumentNormalizer.CProcessedDocumentResult_register(
362
+ ProcessedDocumentResult
363
+ )
364
+
365
+ class DocumentNormalizerModule:
366
+ """
367
+ The DocumentNormalizerModule class defines general functions in the document normalizer module.
368
+
369
+ Methods:
370
+ get_version() -> str: Returns the version of the document normalizer module.
371
+ """
372
+ _thisown = property(
373
+ lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag"
374
+ )
375
+
376
+ @staticmethod
377
+ def get_version() -> str:
378
+ """
379
+ Returns the version of the document normalizer module.
380
+
381
+ Returns:
382
+ A string representing the version of the document normalizer module.
383
+ """
384
+ return __version__ + " (Algorithm " + _DynamsoftDocumentNormalizer.CDocumentNormalizerModule_GetVersion() + ")"
385
+
386
+ def __init__(self):
387
+ _DynamsoftDocumentNormalizer.Class_init(
388
+ self, _DynamsoftDocumentNormalizer.new_CDocumentNormalizerModule()
389
+ )
390
+
391
+ __destroy__ = _DynamsoftDocumentNormalizer.delete_CDocumentNormalizerModule
392
+
393
+
394
+ _DynamsoftDocumentNormalizer.CDocumentNormalizerModule_register(
395
+ DocumentNormalizerModule
396
+ )
397
+
398
+ class DetectedQuadElement(RegionObjectElement):
399
+ """
400
+ The DetectedQuadElement class stores an intermediate result whose type is detected quad.
401
+
402
+ Methods:
403
+ get_confidence_as_document_boundary(self) -> int: Gets the confidence as document boundary of current object.
404
+ set_location(self, location: Quadrilateral) -> int: Sets the location of current object.
405
+ """
406
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
407
+
408
+ def __init__(self, *args, **kwargs):
409
+ _DynamsoftDocumentNormalizer.Class_init(
410
+ self, _DynamsoftDocumentNormalizer.CDocumentNormalizerModule_CreateDetectedQuadElement()
411
+ )
412
+
413
+ def get_confidence_as_document_boundary(self) -> int:
414
+ """
415
+ Gets the confidence as document boundary of current object.
416
+
417
+ Returns:
418
+ The confidence as document boundary of current object.
419
+ """
420
+ return _DynamsoftDocumentNormalizer.CDetectedQuadElement_GetConfidenceAsDocumentBoundary(self)
421
+ def set_location(self, location: Quadrilateral) -> int:
422
+ """
423
+ Sets the location of current object.
424
+
425
+ Args:
426
+ location: The location of current object.
427
+ """
428
+ return _DynamsoftDocumentNormalizer.CDetectedQuadElement_SetLocation(self, location)
429
+
430
+ # Register CDetectedQuadElement in _DynamsoftDocumentNormalizer:
431
+ _DynamsoftDocumentNormalizer.CDetectedQuadElement_register(DetectedQuadElement)
432
+ class DeskewedImageElement(RegionObjectElement):
433
+ """
434
+ The DeskewedImageElement class stores an intermediate result whose type is deskewed image.
435
+
436
+ Methods:
437
+ set_image_data(self, image_data: ImageData) -> int: Sets the image data of the deskewed image element.
438
+ get_source_deskew_quad(self) -> Quadrilateral: Gets the quadrilateral used for deskewing the image.
439
+ """
440
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
441
+
442
+ def __init__(self, *args, **kwargs):
443
+ _DynamsoftDocumentNormalizer.Class_init(
444
+ self, _DynamsoftDocumentNormalizer.CDocumentNormalizerModule_CreateDeskewedImageElement()
445
+ )
446
+
447
+ def set_image_data(self, image_data: ImageData) -> int:
448
+ """
449
+ Sets the image data of the deskewed image element.
450
+
451
+ Args:
452
+ image_data(ImageData): The image data to set.
453
+
454
+ Returns:
455
+ Returns 0 if successful, otherwise returns a negative value.
456
+ """
457
+ return _DynamsoftDocumentNormalizer.CDeskewedImageElement_SetImageData(self, image_data)
458
+
459
+ def get_source_deskew_quad(self) -> Quadrilateral:
460
+ """
461
+ Gets the quadrilateral used for deskewing the image.
462
+
463
+ Returns:
464
+ A Quadrilateral object representing the four corners of the quadrilateral used to deskew the image.
465
+ """
466
+ return _DynamsoftDocumentNormalizer.CDeskewedImageElement_GetSourceDeskewQuad(self)
467
+
468
+ # Register CDeskewedImageElement in _DynamsoftDocumentNormalizer:
469
+ _DynamsoftDocumentNormalizer.CDeskewedImageElement_register(DeskewedImageElement)
470
+
471
+ class EnhancedImageElement(RegionObjectElement):
472
+ """
473
+ The EnhancedImageElement class stores an intermediate result whose type is enhanced image.
474
+
475
+ Methods:
476
+ set_image_data(self, image_data: ImageData) -> int: Sets the image data of the enhanced image element.
477
+ """
478
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
479
+
480
+ def __init__(self, *args, **kwargs):
481
+ _DynamsoftDocumentNormalizer.Class_init(
482
+ self, _DynamsoftDocumentNormalizer.CDocumentNormalizerModule_CreateEnhancedImageElement()
483
+ )
484
+
485
+ def set_image_data(self, image_data: ImageData) -> int:
486
+ """
487
+ Sets the image data of the enhanced image element.
488
+
489
+ Args:
490
+ image_data(ImageData): The image data to set.
491
+
492
+ Returns:
493
+ Returns 0 if successful, otherwise returns a negative value.
494
+ """
495
+ return _DynamsoftDocumentNormalizer.CEnhancedImageElement_SetImageData(self, image_data)
496
+
497
+ _DynamsoftDocumentNormalizer.CEnhancedImageElement_register(EnhancedImageElement)
498
+
499
+ class LongLinesUnit(IntermediateResultUnit):
500
+ """
501
+ The LongLinesUnit class represents an intermediate result unit whose type is long lines.
502
+
503
+ Methods:
504
+ get_count(self) -> int: Gets the count of long line objects in current object.
505
+ get_long_line(self, index: int) -> LineSegment: Gets a longline object from current object by specifying an index.
506
+ remove_all_long_lines(self): Removes all the long lines in current object.
507
+ remove_long_line(self, index: int) -> int: Removes a long line object from current object by specifying an index.
508
+ add_long_line(self, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Adds a long line object to current object.
509
+ set_long_line(self, index: int, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> Sets a long line object in current object by specifying an index.
510
+ """
511
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
512
+
513
+ def __init__(self, *args, **kwargs):
514
+ raise AttributeError("No constructor defined - class is abstract")
515
+
516
+
517
+ def get_count(self) -> int:
518
+ """
519
+ Gets the count of long line objects in current object.
520
+
521
+ Returns:
522
+ The count of long line objects in current object.
523
+ """
524
+ return _DynamsoftDocumentNormalizer.CLongLinesUnit_GetCount(self)
525
+
526
+ def get_long_line(self, index: int) -> LineSegment:
527
+ """
528
+ Gets a longline object from current object by specifying an index.
529
+
530
+ Args:
531
+ index: The index of the long line object to get.
532
+
533
+ Returns:
534
+ A LineSegment object representing the long line object.
535
+ """
536
+ return _DynamsoftDocumentNormalizer.CLongLinesUnit_GetLongLine(self, index)
537
+
538
+ def remove_all_long_lines(self) -> None:
539
+ """
540
+ Removes all the long lines in current object.
541
+ """
542
+ return _DynamsoftDocumentNormalizer.CLongLinesUnit_RemoveAllLongLines(self)
543
+
544
+ def remove_long_line(self, index: int) -> int:
545
+ """
546
+ Removes a long line object from current object by specifying an index.
547
+
548
+ Args:
549
+ index: The index of the long line object to remove.
550
+
551
+ Returns:
552
+ Returns 0 if successful, otherwise returns a negative value.
553
+ """
554
+ return _DynamsoftDocumentNormalizer.CLongLinesUnit_RemoveLongLine(self, index)
555
+
556
+ def add_long_line(self, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
557
+ """
558
+ Adds a long line object to current object.
559
+
560
+ Args:
561
+ line: The long line object to add.
562
+ matrix_to_original_image: The matrix to the original image.
563
+
564
+ Returns:
565
+ Returns 0 if successful, otherwise returns a negative value.
566
+
567
+ """
568
+ return _DynamsoftDocumentNormalizer.CLongLinesUnit_AddLongLine(self, line, matrix_to_original_image)
569
+
570
+ def set_long_line(self, index: int, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
571
+ """
572
+ Sets a long line object in current object by specifying an index.
573
+
574
+ Args:
575
+ index: The index of the longline to be set.
576
+ line: The longline to be set.
577
+ matrix_to_original_image: The matrix to the original image.
578
+
579
+ Returns:
580
+ Returns 0 if successful, otherwise returns a negative value.
581
+ """
582
+ return _DynamsoftDocumentNormalizer.CLongLinesUnit_SetLongLine(self, index, line, matrix_to_original_image)
583
+
584
+ # Register CLongLinesUnit in _DynamsoftDocumentNormalizer:
585
+ _DynamsoftDocumentNormalizer.CLongLinesUnit_register(LongLinesUnit)
586
+
587
+ class LogicLinesUnit(IntermediateResultUnit):
588
+ """
589
+ The LogicLinesUnit class represents an intermediate result unit containing logic lines.
590
+
591
+ Methods:
592
+ get_count(self) -> int: Gets the number of logic lines in the unit.
593
+ get_logic_line(self, index: int) -> LineSegment: Gets a logic line at the specified index.
594
+ remove_all_logic_lines(self): Removes all logic lines.
595
+ remove_logic_line(self, index: int) -> int: Removes a logic line at the specified index.
596
+ add_logic_line(self, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Adds a logic line to the unit.
597
+ set_logic_line(self, index: int, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Sets a logic line at the specified index.
598
+ """
599
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
600
+
601
+ def __init__(self, *args, **kwargs):
602
+ raise AttributeError("No constructor defined - class is abstract")
603
+
604
+
605
+ def get_count(self) -> int:
606
+ """
607
+ Gets the number of logic lines in the unit.
608
+
609
+ Returns:
610
+ The number of logic lines in the unit.
611
+ """
612
+ return _DynamsoftDocumentNormalizer.CLogicLinesUnit_GetCount(self)
613
+
614
+ def get_logic_line(self, index: int) -> LineSegment:
615
+ """
616
+ Gets a logic line at the specified index.
617
+
618
+ Args:
619
+ index: The index of the logic line to get.
620
+
621
+ Returns:
622
+ A LineSegment object at the specified index.
623
+ """
624
+ return _DynamsoftDocumentNormalizer.CLogicLinesUnit_GetLogicLine(self, index)
625
+
626
+ def remove_all_logic_lines(self) -> None:
627
+ """
628
+ Removes all logic lines.
629
+ """
630
+ return _DynamsoftDocumentNormalizer.CLogicLinesUnit_RemoveAllLogicLines(self)
631
+
632
+ def remove_logic_line(self, index: int) -> int:
633
+ """
634
+ Removes the logic line at the specified index.
635
+
636
+ Args:
637
+ index: The index of the logic line to remove.
638
+
639
+ Returns:
640
+ Returns 0 if successful, otherwise returns a negative value.
641
+ """
642
+ return _DynamsoftDocumentNormalizer.CLogicLinesUnit_RemoveLogicLine(self, index)
643
+
644
+ def add_logic_line(self, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
645
+ """
646
+ Adds a logic line to the unit.
647
+
648
+ Args:
649
+ line: The logic line to add.
650
+ matrix_to_original_image: The matrix to the original image.
651
+
652
+ Returns:
653
+ Returns 0 if successful, otherwise returns a negative value.
654
+ """
655
+ return _DynamsoftDocumentNormalizer.CLogicLinesUnit_AddLogicLine(self, line, matrix_to_original_image)
656
+
657
+ def set_logic_line(self, index: int, line: LineSegment, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
658
+ return _DynamsoftDocumentNormalizer.CLogicLinesUnit_SetLogicLine(self, index, line, matrix_to_original_image)
659
+
660
+ # Register CLogicLinesUnit in _DynamsoftDocumentNormalizer:
661
+ _DynamsoftDocumentNormalizer.CLogicLinesUnit_register(LogicLinesUnit)
662
+
663
+ class CornersUnit(IntermediateResultUnit):
664
+ """
665
+ The CornersUnit class represents an intermediate result unit whose type is corners.
666
+ """
667
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
668
+
669
+ def __init__(self, *args, **kwargs):
670
+ raise AttributeError("No constructor defined - class is abstract")
671
+
672
+
673
+ def get_count(self) -> int:
674
+ """
675
+ Gets the count of Corner objects in current object.
676
+
677
+ Returns:
678
+ The count of Corner objects in current object.
679
+ """
680
+ return _DynamsoftDocumentNormalizer.CCornersUnit_GetCount(self)
681
+
682
+ def get_corner(self, index: int) -> Tuple[int, Corner]:
683
+ """
684
+ Gets a Corner object from current object by specifying a index.
685
+
686
+ Args:
687
+ index: The index of the Corner to be get.
688
+
689
+ Returns:
690
+ Returns 0 if successful, otherwise returns a negative value.
691
+ """
692
+ return _DynamsoftDocumentNormalizer.CCornersUnit_GetCorner(self, index)
693
+
694
+ def remove_all_corners(self) -> None:
695
+ """
696
+ Removes all Corner objects in current object.
697
+ """
698
+ return _DynamsoftDocumentNormalizer.CCornersUnit_RemoveAllCorners(self)
699
+
700
+ def remove_corner(self, index: int) -> int:
701
+ """
702
+ Removes a Corner object from current object by specifying a index.
703
+
704
+ Args:
705
+ index: The index of the Corner to be removed.
706
+
707
+ Returns:
708
+ Returns 0 if successful, otherwise returns a negative value.
709
+ """
710
+ return _DynamsoftDocumentNormalizer.CCornersUnit_RemoveCorner(self, index)
711
+
712
+ def add_corner(self, corner: Corner, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
713
+ """
714
+ Adds a Corner object to current object.
715
+
716
+ Args:
717
+ corner: The Corner object to be added.
718
+ matrix_to_original_image: The matrix to the original image.
719
+
720
+ Returns:
721
+ Returns 0 if successful, otherwise returns a negative value.
722
+ """
723
+ return _DynamsoftDocumentNormalizer.CCornersUnit_AddCorner(self, corner, matrix_to_original_image)
724
+
725
+ def set_corner(self, index: int, corner: Corner, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
726
+ """
727
+ Sets a Corner object in current object by specifying a index.
728
+
729
+ Args:
730
+ index: The index of the Corner to be set.
731
+ corner: The Corner object to be set.
732
+ matrix_to_original_image: The matrix to the original image.
733
+
734
+ Returns:
735
+ Returns 0 if successful, otherwise returns a negative value.
736
+ """
737
+ return _DynamsoftDocumentNormalizer.CCornersUnit_SetCorner(self, index, corner, matrix_to_original_image)
738
+
739
+ # Register CCornersUnit in _DynamsoftDocumentNormalizer:
740
+ _DynamsoftDocumentNormalizer.CCornersUnit_register(CornersUnit)
741
+ class CandidateQuadEdgesUnit(IntermediateResultUnit):
742
+ """
743
+ The CandidateQuadEdgesUnit class represents an intermediate result unit whose type is candidate quad edges.
744
+
745
+ Methods:
746
+ get_count(self) -> int: Gets the count of CandidateQuadEdge objects in current object.
747
+ get_candidate_quad_edge(self, index: int) -> Tuple[int, Edge]: Gets a CandidateQuadEdge object from current object by specifying a index.
748
+ remove_all_candidate_quad_edges(self): Removes all CandidateQuadEdge objects in current object.
749
+ remove_candidate_quad_edge(self, index: int) -> int: Removes a CandidateQuadEdge object from current object by specifying a index.
750
+ add_candidate_quad_edge(self, edge: Edge, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Adds a CandidateQuadEdge object to current object.
751
+ set_candidate_quad_edge(self, index: int, edge: Edge, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Sets a CandidateQuadEdge object in current object by specifying a index.
752
+ """
753
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
754
+
755
+ def __init__(self, *args, **kwargs):
756
+ raise AttributeError("No constructor defined - class is abstract")
757
+
758
+
759
+ def get_count(self) -> int:
760
+ """
761
+ Gets the count of CandidateQuadEdge objects in current object.
762
+
763
+ Returns:
764
+ The count of CandidateQuadEdge objects in current object.
765
+ """
766
+ return _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_GetCount(self)
767
+
768
+ def get_candidate_quad_edge(self, index: int) -> Tuple[int, Edge]:
769
+ """
770
+ Gets a CandidateQuadEdge object from current object by specifying a index.
771
+
772
+ Args:
773
+ index: The index of the CandidateQuadEdge to be get.
774
+
775
+ Returns:
776
+ Returns 0 if successful, otherwise returns a negative value.
777
+ """
778
+ return _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_GetCandidateQuadEdge(self, index)
779
+
780
+ def remove_all_candidate_quad_edges(self) -> None:
781
+ """
782
+ Removes all CandidateQuadEdge objects in current object.
783
+ """
784
+ return _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_RemoveAllCandidateQuadEdges(self)
785
+
786
+ def remove_candidate_quad_edge(self, index: int) -> int:
787
+ """
788
+ Removes a CandidateQuadEdge object from current object by specifying a index.
789
+
790
+ Args:
791
+ index: The index of the CandidateQuadEdge to be removed.
792
+
793
+ Returns:
794
+ Returns 0 if successful, otherwise returns a negative value.
795
+ """
796
+ return _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_RemoveCandidateQuadEdge(self, index)
797
+
798
+ def add_candidate_quad_edge(self, edge: Edge, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
799
+ """
800
+ Adds a CandidateQuadEdge object to current object.
801
+
802
+ Args:
803
+ edge: The CandidateQuadEdge object to be added.
804
+ matrix_to_original_image: The matrix to the original image.
805
+
806
+ Returns:
807
+ Returns 0 if successful, otherwise returns a negative value.
808
+ """
809
+ return _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_AddCandidateQuadEdge(self, edge, matrix_to_original_image)
810
+
811
+ def set_candidate_quad_edge(self, index: int, edge: Edge, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
812
+ """
813
+ Sets a CandidateQuadEdge object in current object by specifying a index.
814
+
815
+ Args:
816
+ index: The index of the CandidateQuadEdge to be set.
817
+ edge: The CandidateQuadEdge object to be set.
818
+ matrix_to_original_image: The matrix to the original image.
819
+
820
+ Returns:
821
+ Returns 0 if successful, otherwise returns a negative value.
822
+ """
823
+ return _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_SetCandidateQuadEdge(self, index, edge, matrix_to_original_image)
824
+
825
+ # Register CCandidateQuadEdgesUnit in _DynamsoftDocumentNormalizer:
826
+ _DynamsoftDocumentNormalizer.CCandidateQuadEdgesUnit_register(CandidateQuadEdgesUnit)
827
+ class DetectedQuadsUnit(IntermediateResultUnit):
828
+ """
829
+ The DetectedQuadsUnit class represents an intermediate result unit whose type is detected quads.
830
+
831
+ Methods:
832
+ get_count(self) -> int: Gets the count of DetectedQuad objects in current object.
833
+ get_detected_quad(self, index: int) -> DetectedQuadElement: Gets a DetectedQuad object from current object by specifying a index.
834
+ remove_all_detected_quads(self): Removes all DetectedQuad objects in current object.
835
+ remove_detected_quad(self, index: int) -> int: Removes a DetectedQuad object from current object by specifying a index.
836
+ add_detected_quad(self, detected_quad: DetectedQuad, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Adds a DetectedQuad object to current object.
837
+ set_detected_quad(self, index: int, detected_quad: DetectedQuad, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Sets a DetectedQuad object in current object by specifying a index.
838
+ """
839
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
840
+
841
+ def __init__(self, *args, **kwargs):
842
+ raise AttributeError("No constructor defined - class is abstract")
843
+
844
+
845
+ def get_count(self) -> int:
846
+ """
847
+ Gets the count of DetectedQuad objects in current object.
848
+
849
+ Returns:
850
+ The count of DetectedQuad objects in current object.
851
+ """
852
+ return _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_GetCount(self)
853
+
854
+ def get_detected_quad(self, index: int) -> DetectedQuadElement:
855
+ """
856
+ Gets a DetectedQuad object from current object by specifying a index.
857
+
858
+ Args:
859
+ index: The index of the DetectedQuad to be get.
860
+
861
+ Returns:
862
+ Returns 0 if successful, otherwise returns a negative value.
863
+ """
864
+ return _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_GetDetectedQuad(self, index)
865
+
866
+ def remove_all_detected_quads(self) -> None:
867
+ """
868
+ Removes all DetectedQuad objects in current object.
869
+ """
870
+ return _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_RemoveAllDetectedQuads(self)
871
+
872
+ def remove_detected_quad(self, index: int) -> int:
873
+ """
874
+ Removes a DetectedQuad object from current object by specifying a index.
875
+
876
+ Args:
877
+ index: The index of the DetectedQuad to be removed.
878
+
879
+ Returns:
880
+ Returns 0 if successful, otherwise returns a negative value.
881
+ """
882
+ return _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_RemoveDetectedQuad(self, index)
883
+
884
+ def add_detected_quad(self, element: DetectedQuadElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
885
+ """
886
+ Adds a DetectedQuad object to current object.
887
+
888
+ Args:
889
+ element: The DetectedQuad object to be added.
890
+ matrix_to_original_image: The matrix to the original image.
891
+
892
+ Returns:
893
+ Returns 0 if successful, otherwise returns a negative value.
894
+ """
895
+ return _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_AddDetectedQuad(self, element, matrix_to_original_image)
896
+
897
+ def set_detected_quad(self, index: int, element: DetectedQuadElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
898
+ """
899
+ Sets a DetectedQuad object in current object by specifying a index.
900
+
901
+ Args:
902
+ index: The index of the DetectedQuad to be set.
903
+ element: The DetectedQuad object to be set.
904
+ matrix_to_original_image: The matrix to the original image.
905
+
906
+ Returns:
907
+ Returns 0 if successful, otherwise returns a negative value.
908
+ """
909
+ return _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_SetDetectedQuad(self, index, element, matrix_to_original_image)
910
+
911
+ # Register CDetectedQuadsUnit in _DynamsoftDocumentNormalizer:
912
+ _DynamsoftDocumentNormalizer.CDetectedQuadsUnit_register(DetectedQuadsUnit)
913
+ class DeskewedImageUnit(IntermediateResultUnit):
914
+ """
915
+ The DeskewedImageUnit class represents an intermediate result unit whose type is deskewed images.
916
+
917
+ Methods:
918
+ get_deskewed_image(self) -> DeskewedImageElement: Gets a DeskewedImageElement object from current object.
919
+ set_deskewed_image(self, element: DeskewedImageElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int: Sets the deskewed image.
920
+ """
921
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
922
+
923
+ def __init__(self, *args, **kwargs):
924
+ raise AttributeError("No constructor defined - class is abstract")
925
+
926
+ def get_deskewed_image(self) -> DeskewedImageElement:
927
+ """
928
+ Gets a DeskewedImageElement object from current unit.
929
+
930
+ Returns:
931
+ The DeskewedImageElement object.
932
+ """
933
+ return _DynamsoftDocumentNormalizer.CDeskewedImageUnit_GetDeskewedImage(self)
934
+
935
+ def set_deskewed_image(self, element: DeskewedImageElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
936
+ """
937
+ Sets the deskewed image.
938
+
939
+ Args:
940
+ element: The deskewed image to be set.
941
+ matrix_to_original_image: The matrix to the original image.
942
+
943
+ Returns:
944
+ Returns 0 if successful, otherwise returns a negative value.
945
+ """
946
+ return _DynamsoftDocumentNormalizer.CDeskewedImageUnit_SetDeskewedImage(self, element, matrix_to_original_image)
947
+
948
+ # Register CDeskewedImageUnit in _DynamsoftDocumentNormalizer:
949
+ _DynamsoftDocumentNormalizer.CDeskewedImageUnit_register(DeskewedImageUnit)
950
+
951
+ class EnhancedImageUnit(IntermediateResultUnit):
952
+ """
953
+ The EnhancedImageUnit class represents an intermediate result unit whose type is enhanced images.
954
+
955
+ Methods:
956
+ get_enhanced_image(self) -> EnhancedImageElement: Gets a EnhancedImageElement object from current object.
957
+ set_enhanced_image(self, element: EnhancedImageElement) -> int: Sets the enhanced image.
958
+ """
959
+ _thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
960
+
961
+ def __init__(self, *args, **kwargs):
962
+ raise AttributeError("No constructor defined - class is abstract")
963
+
964
+ def get_enhanced_image(self) -> EnhancedImageElement:
965
+ """
966
+ Gets a EnhancedImageElement object from current unit.
967
+
968
+ Returns:
969
+ The EnhancedImageElement object.
970
+ """
971
+ return _DynamsoftDocumentNormalizer.CEnhancedImageUnit_GetEnhancedImage(self)
972
+
973
+ def set_enhanced_image(self, element: EnhancedImageElement) -> int:
974
+ """
975
+ Sets the enhanced image.
976
+
977
+ Args:
978
+ element: The enhanced image to be set.
979
+
980
+ Returns:
981
+ Returns 0 if successful, otherwise returns a negative value.
982
+ """
983
+ return _DynamsoftDocumentNormalizer.CEnhancedImageUnit_SetEnhancedImage(self, element)
984
+
985
+ _DynamsoftDocumentNormalizer.CEnhancedImageUnit_register(EnhancedImageUnit)