热线电话:13121318867

登录
2019-06-28 阅读量: 776
python如何读取or码

扫描和读取QR码相对简单。在创建QR对象时,我们必须简单地指定QR码的路径作为参数。假设我们正在尝试解码在文章开头创建的QR代码。

# Python 2.x program to Scan and Read a QR code

from qrtools import QR

my_QR = QR(filename = "home/user/Desktop/qr.png")

# decodes the QR code and returns True if successful

my_QR.decode()

# prints the data

print my_QR.data

0.0000
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子