I am trying to read text encoded in barcode - I am using pyzbar
like this:
from pyzbar import pyzbar
import cv2
img = cv2.imread("example/path")
barcodes = pyzbar.decode(img, symbols=[pyzbar.ZBarSymbol.CODE128])
print(barcodes)
It normally works, but in the last batch of barcodes that I have received, pyzbar
cannot read them - output of pyzbar.decode
is []
. There is one example:
I have tried to put it into online decoder and it decodes it just fine (it also says the barcode type is CODE-128). Anybody knows, how can I read it in Python, please?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.