gpt4 book ai didi

python - 如何在 Python 中读取数据矩阵代码?

转载 作者:太空宇宙 更新时间:2023-11-04 07:56:07 24 4
gpt4 key购买 nike

我想知道如何在 python 中使用 openCV 读取数据矩阵条码

我找到了 How to locate and read Data Matrix code with python但这对我来说还不清楚。我想显示读取条码的结果输出。

最佳答案

好的,几天后我找到了解决方案:

import cv2
from pylibdmtx.pylibdmtx import decode
import ctypes

def Mbox(title, text, style):
return ctypes.windll.user32.MessageBoxW(0, text, title, style)

# Read file using OpenCV
Mbox('Data Matrix', str(decode(cv2.imread('C:/Users/User/Desktop/Zdjecia_QrCode/again2.png'))), 1)

但我想知道如何提高阅读能力,因为我无法阅读每个数据矩阵。你有什么想法吗?

关于python - 如何在 Python 中读取数据矩阵代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48686574/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com