import sensor, image, timered_threshold_01 = (0, 35, 0, 50, -10, 40)sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(10) sensor.set_auto_whitebal(False)clock = time.clock() while(True): clock.tick() img = sensor.snapshot() blobs = img.find_blobs([red_threshold_01], area_threshold=150) if blobs: print(blobs) for b in blobs: img.draw_rectangle(b[0:4]) img.draw_cross(b[5], b[6]) print(cx,cy) print(clock.fps())
R
rsyh
@rsyh
0
声望
30
楼层
723
资料浏览
0
粉丝
0
关注
rsyh 发布的帖子
-
RE: 怎样得到物块位置