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())没矫正畸变吧
运行这个例子:
https://book.openmv.cc/example/16-Codes/find-datamatrices.html


你可以把effect参数改大。

