
# QRCode Example
#
# This example shows the power of the OpenMV Cam to detect QR Codes
# using lens correction (see the qrcodes_with_lens_corr.py script for higher performance).
import sensor, image, time
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
sensor.set_auto_exposure(False, 9000)#这里设置曝光时间
clock = time.clock()
while(True):
clock.tick()
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():
img.draw_rectangle(code.rect(), color = (255, 0, 0))
print(code)请问是什么情况呢
你要把整个二维码的图片发一下。
我测试了,也识别不出来。
我感觉你的二维码是错的。

二维码照片在这里,用手机扫是可以识别出来的,偶尔识别出来那几次显示二维码版本号为1,请问跟这个有关系么
@kidswong999 已发出来哈,在楼层下面
你的二维码是错的,用网站或者微信也扫不出来。
@kidswong999 微信直接按住图片不能显示扫描,但如果手机对着屏幕还是可以的
你的二维码有问题。
我发现只有一个二维码才能识别,有另外一个二维码的边边角角都不行