logo

求教:怎么将Openmv识别的二维码显示在lcd上面

2021-01-07 19:25
N
frsx

怎么将Openmv识别的二维码显示在lcd上面,请问我该怎么改呢

代码:import sensor, image

import lcd

sensor.reset()

sensor.set_pixformat(sensor.RGB565)

sensor.set_framesize(sensor.QQVGA2) # can be QVGA on M7...

sensor.skip_frames(30)

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

lcd.display(code.payload())

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():

print(code.payload())

2021-01-08 17:05
I
网红小智智 星瞳科技
import sensor, image
import lcd
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA2) # can be QVGA on M7...
sensor.skip_frames(30)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...

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():
        img.draw_string(10,10,code.payload())
    lcd.display(img)