I have this image:
And I wanted to detect the circle shape from it. So simple enough I used regionprops and area
CC = im2bw(temp);L = bwlabel(CC);props = regionprops(L, 'Area');idx = find( [props.Area] == max([props.Area])); BW2 = ismember(L,idx);
The above produced image BW2 singled out the circle perfectly, but it does not work every time.
When I applied the same code to this image(which is another sample in my dataset):
It picked up not the circle but the big blob connected component in the middle. Which makes sense as it has the biggest area.
Judging by this I found that area is not the best option.
How can I single out the circle type shape in my images?
Thank you
Best Answer