二维码识别
-
主要想解决二维码提取信息的时候 提取出 payload对应的信息
AttributeError: 'qrcode' object has no attribute 'get' 报错
代码
import sensor, imagesensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA) # can be QVGA on M7...
sensor.skip_frames(30) # 修改sensor配置之后, 跳过30帧
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
while(True):
img = sensor.snapshot()
img.lens_corr(1.8) # strength of 1.8 is good for the 2.8mm lens.
for code in img.find_qrcodes():
print(code.get("payload"))
-
code.payload()
https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#qrcode