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")