Aspose.Barcode for Python via Java Generation and Recognition API docs
BarCodeResult Class Reference

Stores recognized barcode data like SingleDecodeType type,. More...

Inherits _MwWrapper.

Public Member Functions

def __init__ (self, _java_class)
 
bool __eq__ (self, BarCodeResult other)
 Returns a value indicating whether this instance is equal to a specified BarCodeResult value. More...
 
int __hash__ (self)
 Returns the hash code for the current instance. More...
 
str __str__ (self)
 Returns a human-readable string representation of this BarCodeResult. More...
 
List[str] code_bytes (self)
 
Optional[str] code_text (self, Optional[str] encoding=None)
 
DecodeType code_type (self)
 
Optional[str] code_type_name (self)
 
BarCodeConfidence confidence (self)
 
Optional[BarCodeExtendedParametersextended (self)
 
float reading_quality (self)
 
Optional[BarCodeRegionParametersregion (self)
 

Detailed Description

Stores recognized barcode data like SingleDecodeType type,.

string

codetext, BarCodeRegionParameters region and other parameters This sample shows how to obtain BarCodeResult.

generator = BarcodeGenerator(EncodeTypes.CODE_128, "12345")
generator.save(image_path_to_save, BarCodeImageFormat.PNG)
reader = BarCodeReader(image_path_to_save, [DecodeType.CODE_39, DecodeType.CODE_128])
for result in reader.read_barcodes():
print("\nBarCode Type:", result.code_type_name)
print("BarCode CodeText:", result.code_text)
print("BarCode Confidence:", result.confidence)
print("BarCode ReadingQuality:", result.reading_quality)
print("BarCode Angle:", result.region.angle)

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  _java_class 
)

Member Function Documentation

◆ __eq__()

bool __eq__ (   self,
BarCodeResult  other 
)

Returns a value indicating whether this instance is equal to a specified BarCodeResult value.

Parameters
other A BarCodeResult value to compare to this instance.
Returns
: true if obj has the same value as this instance otherwise, false.

◆ __hash__()

int __hash__ (   self)

Returns the hash code for the current instance.

Returns
A hash code for the current object.

◆ __str__()

str __str__ (   self)

Returns a human-readable string representation of this BarCodeResult.

Returns
: A string that represents this BarCodeResult.

◆ code_bytes()

List[str] code_bytes (   self)
Encoded code bytes.

◆ code_text()

Optional[str] code_text (   self,
Optional[str]   encoding = None 
)
Code text with optional encoding.

◆ code_type()

DecodeType code_type (   self)
Barcode type.

◆ code_type_name()

Optional[str] code_type_name (   self)
Name of the barcode type.

◆ confidence()

BarCodeConfidence confidence (   self)
Recognition confidence level of the recognized barcode.

◆ extended()

Optional[BarCodeExtendedParameters] extended (   self)

◆ reading_quality()

float reading_quality (   self)
Reading quality (1D and postal barcodes).

◆ region()

Optional[BarCodeRegionParameters] region (   self)