openmv摄像头识别二维码为什么我只有0.006帧的帧率,求大佬?
-
import sensor, image, time, math 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... clock = time.clock() 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(): message=code.payload() print(message) print("FPS %f" % clock.fps())
-
-
输出的帧率应该是摄像头每次采集到的图形,而不是识别二维码后才输出
print("FPS %f" % clock.fps())放到for循环外面
-
http://book.openmv.cc/example/01-Basics/helloworld.html
你看一下helloworld 的结构
clock.tick()要有,clock.fps() 要在while 循环最外层