logo

find_qrcodes例程运行时出错

2018-04-15 13:56
D
ycbook

在openmv ide中运行扫qrcode例程,提示image无此属性,如何解决?

2018-04-15 16:08
X
Yuan

请附上详细的代码,报错提示。

2018-04-15 17:30
D
ycbook

教程中例程在openmv ide测试

import sensor, image, time

sensor.reset()

sensor.set_pixformat(sensor.GRAYSCALE)

sensor.set_framesize(sensor.VGA)

sensor.set_windowing((240, 240)) # look at center 240x240 pixels of the VGA resolution.

sensor.skip_frames(30)

sensor.set_auto_gain(False) # must turn this off to prevent image washout...

clock = time.clock()

while(True):

clock.tick()

img = sensor.snapshot()

for code in img.find_qrcodes():

print(code)

print(clock.fps())

X
Yuan

1.OpenMV2不能使用二维码识别,内存不够。只有OpenMV3才能用。

2.如果你是OpenMV3的话,升级到最新固件。