while(True):
clock.tick()
img = sensor.snapshot().lens_corr(1.8)
#img.gaussian(1)
redBlobs = img.find_blobs([redThreshold],x_stride = 50,x_stride = 50,pixel_threshold = 400)
blueBlobs = img.find_blobs([blueThreshold],x_stride = 50,x_stride = 50,pixel_threshold = 400)
img.draw_rectangle(10,50,50,50,(255,255,0))
if redBlobs:
for r in redBlobs:
redRect = r.rect()
for c in img.find_circles(redRect,threshold = 3500):
if c :
print("redCircle")
for s in img.find_rects(redRect,threshold = 5000):
if s:
print("redSquare")
U
u2qh
@u2qh
0
声望
1
楼层
226
资料浏览
0
粉丝
0
关注
u2qh 发布的帖子
-
运行这段代码,openmv H7 Plus为什么会自动重启?