我的代码可以读取二维码,但不能读取二维码(数据矩阵)

My code can read QR but not 2D code (datamatrix)

提问人:gtomer 提问时间:7/10/2023 更新时间:7/10/2023 访问量:37

问:

我正在使用下面的代码从图像中解码代码。 这适用于 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')

如何将其更改为解码二维码?

python-3.x 二维码 GS1-数据矩阵

评论

0赞 jasonharper 7/10/2023
这回答了你的问题吗?如何在Python中读取数据矩阵代码?

答: 暂无答案