![]() |
Aspose.Barcode for Python via Java Generation and Recognition API docs
|
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes. More...
Inherits BaseJavaClass.
Public Member Functions | |
def | __init__ (self, image, rectangles, decodeTypes) |
Initializes a new instance of the BarCodeReader :param: image encoded as base64 string or path to image :param: rectangles array of object by type Rectangle :param: decodeTypes the array of objects by DecodeType. More... | |
def | containsAny (self, decodeTypes) |
Determines whether any of the given decode types is included into :param: ...decodeTypes Types to verify. More... | |
def | init (self) |
def | getTimeout (self) |
Gets the timeout of recognition process in milliseconds. More... | |
def | setTimeout (self, value) |
Sets the timeout of recognition process in milliseconds. More... | |
def | abort (self) |
def | getFoundBarCodes (self) |
Gets recognized BarCodeResult array. More... | |
def | getFoundCount (self) |
Gets recognized barcodes count. More... | |
def | readBarCodes (self) |
Reads BarCodeResult from the image. More... | |
def | getQualitySettings (self) |
QualitySettings allows to configure recognition quality and speed manually. More... | |
def | setQualitySettings (self, value) |
QualitySettings allows to configure recognition quality and speed manually. More... | |
def | getBarcodeSettings (self) |
The main BarCode decoding parameters. More... | |
def | setBarCodeImage (self, image, areas) |
Sets bitmap image and areas for Recognition. More... | |
def | setBarCodeReadType (self, types) |
Sets SingleDecodeType type array for Recognition. More... | |
def | getBarCodeDecodeType (self) |
def | exportToXml (self, xmlFile) |
Exports BarCode properties to the xml-file specified :param: xmlFile The name of the file :return: Whether or not export completed successfully. More... | |
![]() | |
def | __init__ (self, javaClass) |
def | getJavaClass (self) |
def | setJavaClass (self, javaClass) |
def | getJavaClassName (self) |
def | isNull (self) |
def | printJavaClassName (self) |
Static Public Member Functions | |
def | construct (javaClass) |
def | convertToBase64Image (image) |
def | importFromXml (xmlFile) |
Exports BarCode properties to the xml-file specified :param xmlFile: xmlFile The name of the file :return:Whether or not export completed successfully. More... | |
Public Attributes | |
qualitySettings | |
recognizedResults | |
barcodeSettings | |
![]() | |
javaClass | |
javaClassName | |
Static Public Attributes | |
string | javaClassName = "com.aspose.mw.barcode.recognition.MwBarCodeReader" |
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.
This sample shows how to detect Code39 and Code128 barcodes.
def __init__ | ( | self, | |
image, | |||
rectangles, | |||
decodeTypes | |||
) |
Initializes a new instance of the BarCodeReader :param: image encoded as base64 string or path to image :param: rectangles array of object by type Rectangle :param: decodeTypes the array of objects by DecodeType.
def abort | ( | self | ) |
|
static |
def containsAny | ( | self, | |
decodeTypes | |||
) |
Determines whether any of the given decode types is included into :param: ...decodeTypes Types to verify.
:return: bool Value is a true if any types are included into.
|
static |
def exportToXml | ( | self, | |
xmlFile | |||
) |
Exports BarCode properties to the xml-file specified :param: xmlFile The name of the file :return: Whether or not export completed successfully.
Returns True in case of success False Otherwise
def getBarCodeDecodeType | ( | self | ) |
def getBarcodeSettings | ( | self | ) |
The main BarCode decoding parameters.
Contains parameters which make influence on recognized data.
return The main BarCode decoding parameters
def getFoundBarCodes | ( | self | ) |
Gets recognized BarCodeResult array.
This sample shows how to read barcodes with BarCodeReader
Value: The recognized BarCodeResult array
def getFoundCount | ( | self | ) |
Gets recognized barcodes count.
This sample shows how to read barcodes with BarCodeReader
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ])reader.readBarCodes()for(let i = 0 reader.getFoundCount() > i ++i)print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())Value: The recognized barcodes count
def getQualitySettings | ( | self | ) |
QualitySettings allows to configure recognition quality and speed manually.
You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality,
HighQuality, MaxBarCodes or you can manually configure separate options.
Default value of QualitySettings is NormalQuality.
This sample shows how to use QualitySettings with BarCodeReader
QualitySettings to configure recognition quality and speed.
def getTimeout | ( | self | ) |
Gets the timeout of recognition process in milliseconds.
:return: The timeout.
|
static |
Exports BarCode properties to the xml-file specified :param xmlFile: xmlFile The name of the file :return:Whether or not export completed successfully.
Returns True in case of success; False Otherwise
def init | ( | self | ) |
Reimplemented from BaseJavaClass.
def readBarCodes | ( | self | ) |
Reads BarCodeResult from the image.
This sample shows how to read barcodes with BarCodeReader
:return: Returns array of recognized
s on the image. If nothing is recognized, zero array is returned.
def setBarCodeImage | ( | self, | |
image, | |||
areas | |||
) |
Sets bitmap image and areas for Recognition.
Must be called before ReadBarCodes() method.
This sample shows how to detect Code39 and Code128 barcodes.
:param: value The bitmap image for Recognition. :param: areas areas list for recognition
BarCodeException |
def setBarCodeReadType | ( | self, | |
types | |||
) |
Sets SingleDecodeType type array for Recognition.
Must be called before readBarCodes() method.
This sample shows how to detect Code39 and Code128 barcodes.
:param: types The SingleDecodeType type array to read.
def setQualitySettings | ( | self, | |
value | |||
) |
QualitySettings allows to configure recognition quality and speed manually.
You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality,
HighQuality, MaxBarCodes or you can manually configure separate options.
Default value of QualitySettings is NormalQuality.
This sample shows how to use QualitySettings with BarCodeReader
QualitySettings to configure recognition quality and speed.
def setTimeout | ( | self, | |
value | |||
) |
Sets the timeout of recognition process in milliseconds.
:param: value The timeout.
barcodeSettings |
|
static |
qualitySettings |
recognizedResults |