PredetectedRegionsUnit
The PredetectedRegionsUnit
class represents a unit that contains a collection of pre-detected regions. It inherits from the IntermediateResultUnit
class and stores the result of image color pre-detection.
Definition
Module: dynamsoft_core
class PredetectedRegionsUnit(IntermediateResultUnit)
Methods
Method | Description |
---|---|
get_count |
Gets the number of pre-detected regions in the collection. |
get_predetected_region |
Gets a specific pre-detected region in the collection. |
remove_all_predetected_regions |
Removes all pre-detected regions in the unit. |
remove_predetected_region |
Removes a pre-detected region in the unit at the specified index. |
add_predetected_region |
Adds a pre-detected region in the unit. |
set_predetected_region |
Sets a pre-detected region in the unit at the specified index. |
get_count
Gets the number of pre-detected regions in the collection.
def get_count(self) -> int:
Return value
Returns the number of pre-detected regions in the collection.
get_predetected_region
Gets a specific pre-detected region in the collection.
def get_predetected_region(self, index: int) -> PredetectedRegionElement:
Parameters
index
The index of the pre-detected region to retrieve.
Return value
Returns the specified pre-detected region in the collection.
See Also
remove_all_predetected_regions
Removes all pre-detected regions in the unit.
def remove_all_predetected_regions(self) -> None:
remove_predetected_region
Removes a pre-detected region in the unit at the specified index.
def remove_predetected_region(self, index: int) -> int:
Parameters
index
The index of the pre-detected region to remove.
Return Value
Returns 0 if succeeds, nonzero otherwise.
add_predetected_region
Adds a pre-detected region in the unit.
def add_predetected_region(self, element: PredetectedRegionElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX):
Parameters
element
The pre-detected region to add.
matrix_to_original_image
The transform matrix to the original image.
Return Value
Returns 0 if succeeds, nonzero otherwise.
See Also
set_predetected_region
Sets a pre-detected region in the unit at the specified index.
def set_predetected_region(self, index: int, element: PredetectedRegionElement, matrix_to_original_image: List[float] = IDENTITY_MATRIX):
Parameters
index
The index of the pre-detected region to set.
element
The pre-detected region to set.
matrix_to_original_image
The transform matrix to the original image.
Return Value
Returns 0 if succeeds, nonzero otherwise.
See Also