class BarCode – BarCode object¶
The barcode object is returned by Image.find_barcodes(). It is an attrtuple
with 10 fields.
- class image.barcode¶
Please call
Image.find_barcodes()to create this object. It has no public constructor.- x() int¶
Returns the barcode’s bounding box x coordinate (int).
You may also get this value doing
[0]on the object.
- y() int¶
Returns the barcode’s bounding box y coordinate (int).
You may also get this value doing
[1]on the object.
- w() int¶
Returns the barcode’s bounding box w coordinate (int).
You may also get this value doing
[2]on the object.
- h() int¶
Returns the barcode’s bounding box h coordinate (int).
You may also get this value doing
[3]on the object.
- payload() str¶
Returns the payload string of the barcode (str).
You may also get this value doing
[4]on the object.
- type() int¶
Returns the type enumeration of the barcode (int).
image.EAN2
image.EAN5
image.EAN8
image.UPCE
image.ISBN10
image.UPCA
image.EAN13
image.ISBN13
image.I25
image.DATABAR
image.DATABAR_EXP
image.CODABAR
image.CODE39
image.PDF417
image.CODE93
image.CODE128
You may also get this value doing
[5]on the object.
- rotation() float¶
Returns the rotation of the barcode in radians (float).
You may also get this value doing
[6]on the object.
- quality() int¶
Returns the number of times this barcode was detected in the image (int). Each scanline that decodes the same barcode increments this value.
You may also get this value doing
[7]on the object.