首先,我不确定这是不是一个数组。但这是pyzbar解码QRcode的图像
>>> from pyzbar.pyzbar import decode
>>> from PIL import Image
>>> barcode = decode(Image.open('qr111.png'))
>>> print(barcode)
[Decoded(data='812', type='QRCODE', rect=Rect(left=1166, top=306, width=336, height=336), polygon=[Point(x=1166, y=306), Point(x=1166, y=642), Point(x=1502, y=642), Point(x=1502, y=306)])]
我想具体检索数据的值“812”,我该怎么做? 我尝试打印(条形码[解码(数据)],但没有成功。在
这将得到您想要的:
都在source code里。在
相关问题 更多 >
编程相关推荐