![]() |
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 | getChecksumValidation (self) |
Enable checksum validation during recognition for 1D barcodes. More... | |
def | setChecksumValidation (self, value) |
Enable checksum validation during recognition for 1D barcodes. More... | |
def | getStripFNC (self) |
Strip FNC1, FNC2, FNC3 characters from codetext. More... | |
def | setStripFNC (self, value) |
Strip FNC1, FNC2, FNC3 characters from codetext. More... | |
def | getCustomerInformationInterpretingType (self) |
Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.OTHER. More... | |
def | setCustomerInformationInterpretingType (self, value) |
Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.OTHER. 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 | getDetectEncoding (self) |
A flag which force engine to detect codetext encoding for Unicode codesets. More... | |
def | setDetectEncoding (self, value) |
A flag which force engine to detect codetext encoding for Unicode codesets. 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 getChecksumValidation | ( | self | ) |
Enable checksum validation during recognition for 1D barcodes.
Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
Checksum never used: Codabar
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
Checksum always used: Rest symbologies
This sample shows influence of ChecksumValidation on recognition quality and results
The checksum validation flag.
def getCustomerInformationInterpretingType | ( | self | ) |
Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.OTHER.
def getDetectEncoding | ( | self | ) |
A flag which force engine to detect codetext encoding for Unicode codesets.
This sample shows how to detect text encoding on the fly if DetectEncoding is enabled
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 getStripFNC | ( | self | ) |
Strip FNC1, FNC2, FNC3 characters from codetext.
Default value is false.
This sample shows how to strip FNC characters
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 setChecksumValidation | ( | self, | |
value | |||
) |
Enable checksum validation during recognition for 1D barcodes.
Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
Checksum never used: Codabar
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
Checksum always used: Rest symbologies
This sample shows influence of ChecksumValidation on recognition quality and results
The checksum validation flag.
def setCustomerInformationInterpretingType | ( | self, | |
value | |||
) |
Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.OTHER.
def setDetectEncoding | ( | self, | |
value | |||
) |
A flag which force engine to detect codetext encoding for Unicode codesets.
This sample shows how to detect text encoding on the fly if DetectEncoding is enabled
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 setStripFNC | ( | self, | |
value | |||
) |
Strip FNC1, FNC2, FNC3 characters from codetext.
Default value is false.
This sample shows how to strip FNC characters
def setTimeout | ( | self, | |
value | |||
) |
Sets the timeout of recognition process in milliseconds.
:param: value The timeout.
barcodeSettings |
|
static |
qualitySettings |
recognizedResults |