提问人:gtomer 提问时间:7/10/2023 更新时间:7/10/2023 访问量:37
我的代码可以读取二维码,但不能读取二维码(数据矩阵)
My code can read QR but not 2D code (datamatrix)
问:
我正在使用下面的代码从图像中解码代码。 这适用于 QR 码,但不适用于 2D 数据矩阵。
def read_qr_code(filename):
try:
img = cv2.imread(filename)
detect = cv2.QRCodeDetector()
value, points, straight_qrcode = detect.detectAndDecode(img)
return value
except:
print ('Error')
return
read_qr_code('single.jpg')
如何将其更改为解码二维码?
答: 暂无答案
评论