import sensor, image, time
a = code.payload()
red_threshold = ( 0, 100, 13, 127, 4, 63)# 已调整
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False)
clock = time.clock()
while():
clock.tick()
img = sensor.snapshot()
img.lens_corr(1.8)#畸变矫正
for code in img.find_qrcodes():
img.draw_rectangle(code.rect(), color = (255, 0, 0))
print(code)
if a == '红色':
break
if a == "code.payload":
S
smfb
@smfb
0
声望
1
楼层
259
资料浏览
0
粉丝
0
关注
smfb 发布的帖子
-
扫完码后如何停止扫码并得到扫码获得的那个数值赋值给a,进行下一步操作?