如何过滤掉面积很小的色块 比如背景上随机识别的颜色
L
lrpu 发布的帖子
-
二维码识别
主要想解决二维码提取信息的时候 提取出 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"))