logo

二维码识别

2018-09-11 18:41
K
JiuDing

大家好,我使用的是OpenMv3 M7版本的摄像头,我按照教程里的程序copy到IDE中,按照教程推荐的网页生成了二维码,然后让摄像头去识别,但是似乎并没有什么反应。这是怎么回事呢?我之刚才使用特征点识别的例程就没有问题可以成功运行,但现在不晓得为什么

import sensor, image

sensor.reset()

sensor.set_pixformat(sensor.RGB565)

sensor.set_framesize(sensor.QQVGA) # can be QVGA on M7...

sensor.skip_frames(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)

import sensor, image

sensor.reset()

sensor.set_pixformat(sensor.RGB565)

sensor.set_framesize(sensor.QQVGA) # can be QVGA on M7...

sensor.skip_frames(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)

ef10f920-7d4b-416b-8422-46507e1bf69d.png
I
网红小智智 星瞳科技

你打开终端,可以看到结果

2018-09-11 18:49
K
JiuDing

奥,好的,谢谢,我才发现原来那里有窗口:smiling_face_with_open_mouth_cold_sweat:

2018-09-11 19:00
K
JiuDing
d0a4ed1c-e3d9-40d4-8c88-db3de51100da.jpg
9e165462-12ec-4da6-87fd-75fdfd8ff92f.png
I
网红小智智 星瞳科技

你没对焦,图像看不清

K
JiuDing

好的,谢谢,我拍完照传到电脑屏幕他就看清楚了

2018-09-22 11:31
9
o64l
cf3cd348-e2f0-49f6-8f53-2f4a77146800.png
import sensor, image

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA) # can be QVGA on M7...
sensor.skip_frames(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_datamatrices():
        print(code)
b68e0bbe-5831-4b9f-a4f5-aee6a338bd28.jpg
afad50c7-8602-455e-9575-d236bf76dc03.jpg

可以帮忙看一下吗 谢谢