img = sensor.snapshot() # Take a picture and return the image.
img.binary(thresholds)
img.difference("/template.bmp")
###没准腐蚀
###image.find_blobs(thresholds[, invert=False[, roi[, x_stride=2[, y_stride=1[,
###area_threshold=10[, pixels_threshold=10[, merge=False[, margin=0[,
###threshold_cb=None[, merge_cb=None]]]]]]]]]])
head_blob = img.find_blobs(thresholds, x_stride=200, y_stride=200, area_threshold=600, pixels_threshold=700, merge= True)
if head_blob:
img.draw_rectangle(head_blob[0].rect())#画出色块矩形和中心点
img.draw_cross(head_blob[0].cx(), head_blob.cy())
print(head_blob.count)
print("u")
sf6r
@sf6r
0
声望
7
楼层
713
资料浏览
0
粉丝
0
关注
sf6r 发布的帖子
-
二值化后能用色块查找白色的多块目标吗,不能的话用什么好?