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

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

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
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...
 
BarCodeResult deepClone (self)
 Creates a copy of BarCodeResult class. More...
 
List[str] getCodeBytes (self)
 Gets the encoded code bytes. More...
 
str getCodeText (self)
 Gets the code text. More...
 
DecodeType getCodeType (self)
 Gets the barcode type. More...
 
str getCodeTypeName (self)
 Gets the name of the barcode type. More...
 
BarCodeConfidence getConfidence (self)
 Gets recognition confidence level of the recognized barcode. More...
 
Optional[BarCodeExtendedParametersgetExtended (self)
 Gets extended parameters of recognized barcode. More...
 
float getReadingQuality (self)
 Gets the reading quality. More...
 
Optional[BarCodeRegionParametersgetRegion (self)
 Gets the barcode region. More...
 
None init (self)
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Public Attributes

 extended
 
 region
 
- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Stores recognized barcode data like SingleDecodeType type,.

string

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

generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "12345")
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)
reader = Recognition.BarCodeReader(self.image_path_to_save, None, [Recognition.DecodeType.CODE_39, Recognition.DecodeType.CODE_128])
for result in reader.readBarCodes():
print("\nBarCode Type: " + result.getCodeTypeName())
print("BarCode CodeText: " + result.getCodeText())
print("BarCode Confidence: " + str(result.getConfidence()))
print("BarCode ReadingQuality: " + str(result.getReadingQuality()))
print("BarCode Angle: " + str(result.getRegion().getAngle()))

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  javaClass 
)

Reimplemented from BaseJavaClass.

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.

◆ deepClone()

BarCodeResult deepClone (   self)

Creates a copy of BarCodeResult class.

Returns
: Returns copy of BarCodeResult class.

◆ getCodeBytes()

List[str] getCodeBytes (   self)

Gets the encoded code bytes.

Value: The code bytes of the barcode.

◆ getCodeText()

str getCodeText (   self)

Gets the code text.

Value: The code text of the barcode.

◆ getCodeType()

DecodeType getCodeType (   self)

Gets the barcode type.

Value: The type information of the recognized barcode.

◆ getCodeTypeName()

str getCodeTypeName (   self)

Gets the name of the barcode type.

Value: The type name of the recognized barcode.

◆ getConfidence()

BarCodeConfidence getConfidence (   self)

Gets recognition confidence level of the recognized barcode.

Value: BarCodeConfidence.

◆ getExtended()

Optional[BarCodeExtendedParameters] getExtended (   self)

Gets extended parameters of recognized barcode.

Value: The extended parameters of recognized barcode.

◆ getReadingQuality()

float getReadingQuality (   self)

Gets the reading quality.

Works for 1D and postal barcodes.

Returns
The reading quality percent.

◆ getRegion()

Optional[BarCodeRegionParameters] getRegion (   self)

Gets the barcode region.

Value: The region of the recognized barcode.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

Member Data Documentation

◆ extended

extended

◆ region

region