CandidateBarcodeZonesUnit Class
The CandidateBarcodeZonesUnit
class represents a unit that contains candidate barcode zones unit. It inherits from the IntermediateResultUnit
class.
Definition
Module: dynamsoft_barcode_readers
Inheritance: IntermediateResultUnit -> CandidateBarcodeZonesUnit
class CandidateBarcodeZonesUnit(IntermediateResultUnit)
Methods
Method | Description |
---|---|
add_candidate_barcode_zone |
Adds a candidate barcode zone. |
get_candidate_barcode_zone |
Gets a candidate barcode zone. |
get_count |
Gets the number of candidate barcode zones in the unit. |
remove_all_candidate_barcode_zones |
Removes all the candidate barcode zones. |
remove_candidate_barcode_zone |
Removes a candidate barcode zone at the specified index. |
set_candidate_barcode_zone |
Sets a candidate barcode zone at the specified index. |
add_candidate_barcode_zone
Adds a candidate barcode zone.
def add_candidate_barcode_zone(self, barcode_zone: CandidateBarcodeZone, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
Parameters
barcode_zone
The candidate barcode zone.
matrix_to_original_image
The matrix to original image.
Return value
Returns 0 if successful, otherwise returns a negative value.
get_candidate_barcode_zone
Gets a candidate barcode zone specified by index.
def get_candidate_barcode_zone(self, index: int) -> Tuple[int, CandidateBarcodeZone]:
Parameters
index
The index of the candidate barcode zone.
Return value
Returns a tuple containing following elements:
error_code
<int>: The error code indicating the status of the operation.candidate_barcode_zone
<CandidateBarcodeZone>: The candidate barcode zone.
See Also
get_count
Gets the number of localized barcodes in the unit.
def get_count(self) -> int:
Return value
Returns the number of candidate barcode zones in the unit.
remove_all_candidate_barcode_zones
Removes all the candidate barcode zones
def remove_all_candidate_barcode_zones(self) -> None:
remove_candidate_barcode_zone
Removes a candidate barcode zone at the specified index
def remove_candidate_barcode_zone(self, index: int) -> int:
Parameters
index
The index of the candidate barcode zone.
Return value
Returns 0 if successful, otherwise returns a negative value.
set_candidate_barcode_zone
Sets a candidate barcode zone at the specified index.
def set_candidate_barcode_zone(self, index: int, barcode_zone: CandidateBarcodeZone, matrix_to_original_image: List[float] = IDENTITY_MATRIX) -> int:
Parameters
index
The index of the candidate barcode zone.
barcode_zone
The candidate barcode zone.
matrix_to_original_image
The matrix to original image.
Return value
Returns 0 if successful, otherwise returns a negative value.