How to remove false detections?
image-processing, opencv
Solution
One option is a bit hacky: On top of findContours use minEnclosingCircle and filter contours by min. enclosing radius based on a threshold value (remove smaller than radius A (remove tiny blobs) and greater than radius B( remove huge blobs)). You can also try minAreaRect and check width/height ratio to look for uniform blobs rather than tall/wide ones.
The less hacky solution is to use Hough transforms. Have a look at the hough circle and the tutorial
Problem
I am using OpenCV to detect ellipses in a binary image as shown below. In the image, there are eight ellipses to be detected. I can use findContours to obtain a lot of contours including the eight ellipses. The problem is: how can I judge and which one is ellipse which one is not? How to remove all the other false detections?