Table of contents
Swift
Objective-C

DecodedBarcodeElement Class

The DecodedBarcodeElement class represents a decoded barcode element. It inherits from the RegionObjectElement class and provides additional functionality for retrieving information about the decoded barcode.

Definition

Module: dynamsoft_barcode_readers

Inheritance: RegionObjectElement -> DecodedBarcodeElement

class DecodedBarcodeElement(RegionObjectElement)

Methods

Method Description
__init__ Initializes a new instance of the DecodedBarcodeElement class.
get_format Gets the format of the barcode.
get_format_string Gets the string representation of the barcode format.
get_text Gets the text of the decoded barcode.
get_bytes Gets the raw bytes of the decoded barcode.
get_details Gets the details of the decoded barcode.
is_dpm Determines whether the decoded barcode is a DPM (Direct Part Marking) code.
is_mirrored Determines whether the decoded barcode is mirrored.
get_angle Gets the orientation angle of the barcode.
get_module_size Gets the module size of the barcode.
get_confidence Gets the confidence score of the barcode recognition result.
get_extended_barcode_results_count Gets the number of extended barcode results for the decoded barcode.
get_extended_barcode_result Gets the extended barcode result at the specified index for the decoded barcode.
set_format Sets the format of the barcode.
set_text Sets the text of the decoded barcode.
set_bytes Sets the raw bytes of the decoded barcode.
set_confidence Sets the confidence score of the barcode recognition result.

__init__

Initializes a new instance of the DecodedBarcodeElement class.

def __init__(self):

get_format

It is used to get the format of the barcode.

def get_format(self) -> int:

Return value

Returns the format of the barcode. This is one of the values of the EnumBarcodeFormat enumeration.

See Also

EnumBarcodeFormat

get_format_string

It is used to get the string representation of the barcode format.

def get_format_string(self) -> str:

Return value

Returns the string representation of the barcode format.

get_text

Gets the text of the decoded barcode.

def get_text(self) -> str:

Return value

Returns a string representing the text of the decoded barcode.

get_bytes

Gets the raw bytes of the decoded barcode.

def get_bytes(self) -> bytes:

Return value

Returns the raw bytes of the decoded barcode.

get_details

Gets the details of the decoded barcode.

def get_details(self) -> BarcodeDetails:

Return value

Returns the details of the decoded barcode.

See Also

is_dpm

Determines whether the decoded barcode is a DPM (Direct Part Marking) code.

def is_dpm(self) -> bool:

Return value

Returns true if the decoded barcode is a DPM code, false otherwise.

is_mirrored

Determines whether the decoded barcode is mirrored.

def is_mirrored(self) -> bool:

Return value

Returns true if the decoded barcode is mirrored, false otherwise.

get_angle

It is used to get the orientation angle of the barcode.

def get_angle(self) -> int:

Return value

Returns the orientation angle of the barcode.

get_module_size

It is used to get the module size of the barcode.

def get_module_size(self) -> int:

Return value

Returns the module size of the barcode.

get_confidence

It is used to get the confidence score of the barcode recognition result.

def get_confidence(self) -> int:

Return value

Returns the confidence score of the barcode recognition result.

get_extended_barcode_results_count

Gets the number of extended barcode results for the decoded barcode.

def get_extended_barcode_results_count(self) -> int:

Return value

Returns the number of extended barcode results for the decoded barcode.

get_extended_barcode_result

Gets the extended barcode result at the specified index for the decoded barcode.

def get_extended_barcode_result(self, index: int) -> "ExtendedBarcodeResult":

Parameters

index The index of the extended barcode result to retrieve.

Return value

Returns an ExtendedBarcodeResult object at the specified index for the decoded barcode.

See Also

ExtendedBarcodeResult

set_format

Sets the format of the barcode.

def set_format(self, format: int) -> None:

Parameters

format The format of the barcode. This is one of the values of the EnumBarcodeFormat enumeration.

See Also

EnumBarcodeFormat

set_text

Sets the text of the barcode.

def set_text(self, text: str) -> None:

Parameters

text The text of the barcode.

set_bytes

Sets the raw bytes of the barcode.

def set_bytes(self, bytes: bytes):

Parameters

bytes The raw bytes of the barcode.

set_confidence

Sets the confidence of the barcode.

def set_confidence(self, confidence: int) -> None:

Parameters

confidence The confidence of the barcode.