logo

使用例程的二维码识别程序无法识别二维码

2019-11-10 20:18
W
o6dm
4a96c68d-b916-4070-8f82-7d4831484dab.png
# 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)

请问是什么情况呢

2019-11-11 12:51
I
网红小智智 星瞳科技

你要把整个二维码的图片发一下。

2019-11-11 13:00
I
网红小智智 星瞳科技

我测试了,也识别不出来。

我感觉你的二维码是错的。

2019-11-11 13:13
W
o6dm
e74bc680-63a6-45b9-b294-6510f74d6143.jpg

二维码照片在这里,用手机扫是可以识别出来的,偶尔识别出来那几次显示二维码版本号为1,请问跟这个有关系么

W
o6dm

@kidswong999 已发出来哈,在楼层下面

2019-11-12 14:17
I
网红小智智 星瞳科技

你的二维码是错的,用网站或者微信也扫不出来。

2019-11-12 14:52
W
o6dm

@kidswong999 微信直接按住图片不能显示扫描,但如果手机对着屏幕还是可以的

2019-11-13 13:02
I
网红小智智 星瞳科技

你的二维码有问题。

2025-05-02 15:58
H
ykbu

我发现只有一个二维码才能识别,有另外一个二维码的边边角角都不行