logo

找DM二维码只能识别图像中间区域的二维码,当把二维码移到图像边缘就识别不到了怎么回事?

2021-01-14 10:03
G
刘贵波
import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # can be QVGA on M7...
sensor.skip_frames(30)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
clock = time.clock()
while(True):



    img = sensor.snapshot()#.lens_corr(0.47)
    clock.tick() #必须放在img = sensor.snapshot()下面
    for code in img.find_datamatrices( effort = 200):#effort越大帧率越低,上限240,越小帧率越高下限160
        print(code)
        print("FPS %f" % clock.fps())
2021-01-14 19:50
I
网红小智智 星瞳科技

没矫正畸变吧

运行这个例子:

https://book.openmv.cc/example/16-Codes/find-datamatrices.html

2021-01-15 09:45
G
刘贵波
757e8e9f-f1e5-406a-ad08-d1861c6a3a2e.png
6f89a346-030d-4b11-bd92-4e47c6e8a144.png
2021-01-15 19:34
I
网红小智智 星瞳科技

你可以把effect参数改大。

85148348-608e-44ba-9826-5a2b2f7d5865.jpg
2021-01-19 09:42
G
刘贵波
ec19cca2-5e60-489a-9f67-46b5a9f049c3.png