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

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

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
BarCodeResult deepClone (self)
 Creates a copy of BarCodeResult class. More...
 
bool equals (self, BarCodeResult other)
 Returns a value indicating whether this instance is equal to a specified BarCodeResult value. 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...
 
int hashCode (self)
 Returns the hash code for this instance. More...
 
None init (self)
 
str toString (self)
 Returns a human-readable string representation of this BarCodeResult. More...
 
- 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

◆ deepClone()

BarCodeResult deepClone (   self)

Creates a copy of BarCodeResult class.

Returns
: Returns copy of BarCodeResult class.

◆ equals()

bool equals (   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.

◆ 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.

◆ hashCode()

int hashCode (   self)

Returns the hash code for this instance.

Returns
: A 32-bit signed integer hash code.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ toString()

str toString (   self)

Returns a human-readable string representation of this BarCodeResult.

Returns
: A string that represents this BarCodeResult.

Member Data Documentation

◆ extended

extended

◆ region

region