MATLAB: Remove objects from binary image based on shape’s eccentricity

eccentricityImage Processing Toolboxobject isolation

I am trying to identify all of the objects in an image with an eccentricity less than 0.7. The radius of the shapes vary but the primary objective is to remove all non-circle images.
Thus far I have tried the circular hough transforms and the imfindcircles but neither fulfills the purpose. My main problem is removing the noncircles and/or isolating the circles. (Just to clarify, the objects that I am trying to isolate are not perfect circles, they vary between being an ellipse and a circle.
Any help to resolve this issue would be appreciated. Thank you.

Best Answer

Try bwpropfilt().