import sensor, image
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(30)
sensor.set_auto_gain(False)
while(True):
img = sensor.snapshot()
img.lens_corr(1.8)
blobs = img.find_qrcodes()
if blobs:
for b in blobs:
img.draw_rectangle(b[0:4])
img.draw_cross(b[5], b[6],size=5,color=(0,0,0))
sensor.snapshot().save("example.jpg")
for code in img.find_qrcodes():
print(code)
Z
zoml 发布的帖子
-
为什么我这一段代码显示的十字总在左上角?