Img.find_blobs() will always try to find a blob even though there's no more blobs in the image

Hi, I’m trying to identify a rectangle in the image, using its color, with the find_blobs function and it works just fine whenever there’s a rectangle of the color I want in the image, but when there’s no blobs in sight, if there’s anything with the slightest resemblance to the color I want to detect, it thinks it’s a blob. And I want it to detect when there’s no blob in sight.

Hi, you need to filter the detections. You can do this by setting an area or pixel count threshold on blobs returned.

Thank you, I’ll try to use the pixel count threshold but not the area one, because my blob area changes.