1- __version__ = "4.0.10.7501 "
1+ __version__ = "4.0.10.7771 "
22
33if __package__ or "." in __name__ :
44 from . import _DynamsoftCore
@@ -369,7 +369,7 @@ def __init__(self, x: int = 0, y: int = 0):
369369
370370 def __repr__ (self ):
371371 return f"Point({ self .x } , { self .y } )"
372-
372+
373373 def distance_to (self , pt : "Point" ) -> float :
374374 """
375375 Calculates the distance between the current point and the specified target point.
@@ -426,7 +426,7 @@ def __init__(self):
426426
427427 def __repr__ (self ):
428428 return f"Rect(top={ self .top } , left={ self .left } , right={ self .right } , bottom={ self .bottom } )"
429-
429+
430430 __destroy__ = _DynamsoftCore .delete_CRect
431431
432432
@@ -446,7 +446,7 @@ class Quadrilateral:
446446 _thisown = property (
447447 lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag"
448448 )
449-
449+
450450 def __init__ (self ):
451451 """
452452 Initializes a new instance of the Quadrilateral class with default values.
@@ -496,7 +496,7 @@ def get_area(self) -> int:
496496
497497 def get_bounding_rect (self ) -> Rect :
498498 return _DynamsoftCore .CQuadrilateral_GetBoundingRect (self )
499-
499+
500500 __destroy__ = _DynamsoftCore .delete_CQuadrilateral
501501
502502_DynamsoftCore .CQuadrilateral_register (Quadrilateral )
@@ -1014,7 +1014,7 @@ def __init__(self):
10141014 AttributeError: If the constructor is called.
10151015 """
10161016 raise AttributeError ("No constructor defined - class is abstract" )
1017-
1017+
10181018 def get_original_image_hash_id (self ) -> str :
10191019 """
10201020 Gets the hash ID of the original image.
@@ -1045,7 +1045,7 @@ def get_rotation_transform_matrix(self) -> List[float]:
10451045 return _DynamsoftCore .CCapturedResultBase_GetRotationTransformMatrix (
10461046 self
10471047 )
1048-
1048+
10491049 def get_error_code (self ) -> int :
10501050 """
10511051 Gets the error code of the detection operation.
@@ -1063,7 +1063,7 @@ def get_error_string(self) -> str:
10631063 The error message of the detection operation as a string.
10641064 """
10651065 return _DynamsoftCore .CCapturedResultBase_GetErrorString (self )
1066-
1066+
10671067_DynamsoftCore .CCapturedResultBase_register (CapturedResultBase )
10681068#end new
10691069
@@ -1349,7 +1349,7 @@ def __init__(self):
13491349
13501350class Contour :
13511351 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1352-
1352+
13531353 __destroy__ = _DynamsoftCore .delete_CContour
13541354
13551355 def __init__ (self ):
@@ -1363,11 +1363,11 @@ def set_points(self, points: List[Point]) -> None:
13631363
13641364 def get_points (self ) -> List [Point ]:
13651365 return _DynamsoftCore .CContour_GetPoints (self )
1366-
1366+
13671367_DynamsoftCore .CContour_register (Contour )
13681368class Vector4 :
13691369 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1370-
1370+
13711371 value = property (_DynamsoftCore .CVector4_value_get , _DynamsoftCore .CVector4_value_set )
13721372
13731373 def __init__ (self , v1 : int , v2 : int , v3 : int , v4 : int ):
@@ -1381,7 +1381,7 @@ def __getitem__(self, index: int) -> int:
13811381 if index < 0 or index > 3 :
13821382 raise IndexError ("Index out of range" )
13831383 return _DynamsoftCore .CVector4_GetItem (self , index )
1384-
1384+
13851385 def __setitem__ (self , index : int , value : int ) -> None :
13861386 if index < 0 or index > 3 :
13871387 raise IndexError ("Index out of range" )
@@ -1391,7 +1391,7 @@ def __setitem__(self, index: int, value: int) -> None:
13911391
13921392class LineSegment :
13931393 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1394-
1394+
13951395 start_point : Point = property (_DynamsoftCore .CLineSegment_GetStartPoint , _DynamsoftCore .CLineSegment_SetStartPoint )
13961396 end_point : Point = property (_DynamsoftCore .CLineSegment_GetEndPoint , _DynamsoftCore .CLineSegment_SetEndPoint )
13971397 id : int = property (_DynamsoftCore .CLineSegment_GetId , _DynamsoftCore .CLineSegment_SetId )
@@ -1407,7 +1407,7 @@ def __repr__(self):
14071407_DynamsoftCore .CLineSegment_register (LineSegment )
14081408class Corner :
14091409 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1410-
1410+
14111411 type : int = property (_DynamsoftCore .CCorner_type_get , _DynamsoftCore .CCorner_type_set )
14121412 intersection : Point = property (_DynamsoftCore .CCorner_intersection_get , _DynamsoftCore .CCorner_intersection_set )
14131413 line1 : LineSegment = property (_DynamsoftCore .CCorner_line1_get , _DynamsoftCore .CCorner_line1_set )
@@ -1419,7 +1419,7 @@ def __init__(self):
14191419_DynamsoftCore .CCorner_register (Corner )
14201420class Edge :
14211421 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1422-
1422+
14231423 start_corner : Corner = property (_DynamsoftCore .CEdge_startCorner_get , _DynamsoftCore .CEdge_startCorner_set )
14241424 end_corner : Corner = property (_DynamsoftCore .CEdge_endCorner_get , _DynamsoftCore .CEdge_endCorner_set )
14251425
@@ -1450,7 +1450,7 @@ class RegionObjectElement:
14501450
14511451 def __init__ (self ):
14521452 raise AttributeError ("No constructor defined - class is abstract" )
1453-
1453+
14541454
14551455 def get_location (self ) -> Quadrilateral :
14561456 return _DynamsoftCore .CRegionObjectElement_GetLocation (self )
@@ -1463,23 +1463,23 @@ def get_element_type(self) -> int:
14631463
14641464 def clone (self ) -> "RegionObjectElement" :
14651465 return _DynamsoftCore .CRegionObjectElement_Clone (self )
1466-
1466+
14671467 def get_image_data (self ) -> ImageData :
14681468 return _DynamsoftCore .CRegionObjectElement_GetImageData (self )
14691469
14701470_DynamsoftCore .CRegionObjectElement_register (RegionObjectElement )
14711471class PredetectedRegionElement (RegionObjectElement ):
14721472 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1473-
1473+
14741474 def __init__ (self ):
14751475 _DynamsoftCore .Class_init (self , _DynamsoftCore .CImageProcessingModule_CreatePredetectedRegionElement ())
1476-
1476+
14771477 def get_mode_name (self ) -> str :
14781478 return _DynamsoftCore .CPredetectedRegionElement_GetModeName (self )
14791479
14801480 def set_location (self , loc : Quadrilateral ) -> int :
14811481 return _DynamsoftCore .CPredetectedRegionElement_SetLocation (self , loc )
1482-
1482+
14831483_DynamsoftCore .CPredetectedRegionElement_register (PredetectedRegionElement )
14841484class IntermediateResultUnit :
14851485 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
@@ -1521,10 +1521,10 @@ def set_original_image_tag(self, tag: ImageTag) -> None:
15211521
15221522 def replace (self , unit : "IntermediateResultUnit" ) -> int :
15231523 return _DynamsoftCore .CIntermediateResultUnit_Replace (self , unit )
1524-
1524+
15251525 def get_usage_count (self ) -> int :
15261526 return _DynamsoftCore .CIntermediateResultUnit_GetUsageCount (self )
1527-
1527+
15281528 def set_usage_count (self , usage_count : int ) -> None :
15291529 return _DynamsoftCore .CIntermediateResultUnit_SetUsageCount (self , usage_count )
15301530
@@ -1534,7 +1534,7 @@ class IntermediateResult:
15341534
15351535 def __init__ (self ):
15361536 raise AttributeError ("No constructor defined - class is abstract" )
1537-
1537+
15381538 def get_intermediate_result_units (self ) -> List [IntermediateResultUnit ]:
15391539 list = []
15401540 count = _DynamsoftCore .CIntermediateResult_GetCount (self )
@@ -1549,7 +1549,7 @@ class ColourImageUnit(IntermediateResultUnit):
15491549
15501550 def __init__ (self ):
15511551 raise AttributeError ("No constructor defined - class is abstract" )
1552-
1552+
15531553
15541554 def get_image_data (self ) -> ImageData :
15551555 return _DynamsoftCore .CColourImageUnit_GetImageData (self )
@@ -1563,7 +1563,7 @@ class ScaledColourImageUnit(IntermediateResultUnit):
15631563
15641564 def __init__ (self ):
15651565 raise AttributeError ("No constructor defined - class is abstract" )
1566-
1566+
15671567
15681568 def get_image_data (self ) -> ImageData :
15691569 return _DynamsoftCore .CScaledColourImageUnit_GetImageData (self )
@@ -1577,7 +1577,7 @@ class GrayscaleImageUnit(IntermediateResultUnit):
15771577
15781578 def __init__ (self ):
15791579 raise AttributeError ("No constructor defined - class is abstract" )
1580-
1580+
15811581
15821582 def get_image_data (self ) -> ImageData :
15831583 return _DynamsoftCore .CGrayscaleImageUnit_GetImageData (self )
@@ -1591,7 +1591,7 @@ class TransformedGrayscaleImageUnit(IntermediateResultUnit):
15911591
15921592 def __init__ (self ):
15931593 raise AttributeError ("No constructor defined - class is abstract" )
1594-
1594+
15951595
15961596 def get_image_data (self ) -> ImageData :
15971597 return _DynamsoftCore .CTransformedGrayscaleImageUnit_GetImageData (self )
@@ -1605,7 +1605,7 @@ class PredetectedRegionsUnit(IntermediateResultUnit):
16051605
16061606 def __init__ (self ):
16071607 raise AttributeError ("No constructor defined - class is abstract" )
1608-
1608+
16091609
16101610 def get_count (self ) -> int :
16111611 return _DynamsoftCore .CPredetectedRegionsUnit_GetCount (self )
@@ -1631,7 +1631,7 @@ class EnhancedGrayscaleImageUnit(IntermediateResultUnit):
16311631
16321632 def __init__ (self ):
16331633 raise AttributeError ("No constructor defined - class is abstract" )
1634-
1634+
16351635
16361636 def get_image_data (self ) -> ImageData :
16371637 return _DynamsoftCore .CEnhancedGrayscaleImageUnit_GetImageData (self )
@@ -1645,7 +1645,7 @@ class BinaryImageUnit(IntermediateResultUnit):
16451645
16461646 def __init__ (self ):
16471647 raise AttributeError ("No constructor defined - class is abstract" )
1648-
1648+
16491649
16501650 def get_image_data (self ) -> ImageData :
16511651 return _DynamsoftCore .CBinaryImageUnit_GetImageData (self )
@@ -1659,7 +1659,7 @@ class TextureDetectionResultUnit(IntermediateResultUnit):
16591659
16601660 def __init__ (self ):
16611661 raise AttributeError ("No constructor defined - class is abstract" )
1662-
1662+
16631663
16641664 def get_x_spacing (self ) -> int :
16651665 return _DynamsoftCore .CTextureDetectionResultUnit_GetXSpacing (self )
@@ -1679,7 +1679,7 @@ class TextureRemovedGrayscaleImageUnit(IntermediateResultUnit):
16791679
16801680 def __init__ (self ):
16811681 raise AttributeError ("No constructor defined - class is abstract" )
1682-
1682+
16831683
16841684 def get_image_data (self ) -> ImageData :
16851685 return _DynamsoftCore .CTextureRemovedGrayscaleImageUnit_GetImageData (self )
@@ -1693,7 +1693,7 @@ class TextureRemovedBinaryImageUnit(IntermediateResultUnit):
16931693
16941694 def __init__ (self ):
16951695 raise AttributeError ("No constructor defined - class is abstract" )
1696-
1696+
16971697
16981698 def get_image_data (self ) -> ImageData :
16991699 return _DynamsoftCore .CTextureRemovedBinaryImageUnit_GetImageData (self )
@@ -1704,11 +1704,8 @@ def set_image_data(self, img_data: ImageData) -> int:
17041704_DynamsoftCore .CTextureRemovedBinaryImageUnit_register (TextureRemovedBinaryImageUnit )
17051705class TextZone (object ):
17061706 _thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
1707-
1707+
17081708 __destroy__ = _DynamsoftCore .delete_CTextZone
1709- def __new__ (cls , * args , ** kwargs ):
1710- instance = super ().__new__ (cls )
1711- instance ._is_non
17121709 def __init__ (self , loc : Quadrilateral = None , char_contours_indices : List [int ] = None ):
17131710 if char_contours_indices is not None and loc is None :
17141711 raise ValueError ("If char_contours_indices is not None, loc should not be None" )
@@ -1732,7 +1729,7 @@ class TextZonesUnit(IntermediateResultUnit):
17321729
17331730 def __init__ (self ):
17341731 raise AttributeError ("No constructor defined - class is abstract" )
1735-
1732+
17361733
17371734 def get_count (self ) -> int :
17381735 return _DynamsoftCore .CTextZonesUnit_GetCount (self )
@@ -1757,7 +1754,7 @@ class TextRemovedBinaryImageUnit(IntermediateResultUnit):
17571754
17581755 def __init__ (self ):
17591756 raise AttributeError ("No constructor defined - class is abstract" )
1760-
1757+
17611758
17621759 def get_image_data (self ) -> ImageData :
17631760 return _DynamsoftCore .CTextRemovedBinaryImageUnit_GetImageData (self )
@@ -1771,7 +1768,7 @@ class ContoursUnit(IntermediateResultUnit):
17711768
17721769 def __init__ (self ):
17731770 raise AttributeError ("No constructor defined - class is abstract" )
1774-
1771+
17751772 def get_contours (self ) -> Tuple [int , List [Contour ], List [Vector4 ]]:
17761773 return _DynamsoftCore .CContoursUnit_GetContours (self )
17771774
@@ -1784,7 +1781,7 @@ class LineSegmentsUnit(IntermediateResultUnit):
17841781
17851782 def __init__ (self ):
17861783 raise AttributeError ("No constructor defined - class is abstract" )
1787-
1784+
17881785
17891786 def get_count (self ) -> int :
17901787 return _DynamsoftCore .CLineSegmentsUnit_GetCount (self )
@@ -1810,7 +1807,7 @@ class ShortLinesUnit(IntermediateResultUnit):
18101807
18111808 def __init__ (self ):
18121809 raise AttributeError ("No constructor defined - class is abstract" )
1813-
1810+
18141811
18151812 def get_count (self ) -> int :
18161813 return _DynamsoftCore .CShortLinesUnit_GetCount (self )
@@ -1836,7 +1833,7 @@ class ObservationParameters:
18361833
18371834 def __init__ (self ):
18381835 raise AttributeError ("No constructor defined - class is abstract" )
1839-
1836+
18401837 __destroy__ = _DynamsoftCore .delete_CObservationParameters
18411838
18421839 def set_observed_result_unit_types (self , types : int ) -> None :
@@ -1877,13 +1874,13 @@ def __init__(self):
18771874
18781875 def get_observation_parameters (self ) -> ObservationParameters :
18791876 return _DynamsoftCore .CAbstractIntermediateResultReceiver_GetObservationParameters (self )
1880-
1877+
18811878 @abstractmethod
18821879 def on_task_results_received (self , result : IntermediateResult , info : IntermediateResultExtraInfo ) -> None :
18831880 pass
18841881
18851882 @abstractmethod
18861883 def on_unit_result_received (self , unit : IntermediateResultUnit , info : IntermediateResultExtraInfo ) -> None :
18871884 pass
1888-
1885+
18891886_DynamsoftCore .CAbstractIntermediateResultReceiver_register (AbstractIntermediateResultReceiver )
0 commit comments