[英]Pyzbar does not recognize CODE-128 barcode
I am trying to read text encoded in barcode - I am using pyzbar
like this:我正在尝试读取以条形码编码的文本——我正在使用
pyzbar
,如下所示:
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 []
.它正常工作,但在我收到的最后一批条形码中,
pyzbar
无法读取它们 - pyzbar.decode 的pyzbar.decode
是[]
。 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).我试着把它放到在线解码器中,它解码得很好(它还说条形码类型是 CODE-128)。 Anybody knows, how can I read it in Python, please?
有谁知道,请问Python怎么读?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.