在lcd上显示识别的二维码信息,要怎么修改
-
import sensor, image, time,lcd sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) sensor.set_auto_gain(False) # must turn this off to prevent image washout... clock = time.clock() while(True): clock.tick() 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(): img.draw_rectangle(code.rect(), color = (255, 0, 0)) message = code.payload() img.draw_string(message) lcd.display(img) print(code) print(clock.fps())
-
-
就不能直接告诉我哪里有问题吗
我就是按那个连接写的。
-
报错提示已经很清楚了,
你没告诉他足够的参数,没有说把字写在哪个位置上。例子:http://book.openmv.cc/example/03-Drawing/text-drawing.html
文档:https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#image.draw_string