MATLAB: Get the inner white circle

morphological operation

i wanted to get the inner white circle and blacken all the remaining portions….
please can someone help me solve this…
i am trying to get such an image…. but not getting… please help…

Best Answer

regionprops() 'BoundingBox' would give you the bounding box without any problems. You could also request the 'Eccentricity' and use that to choose between the two output regions. You might also want the 'Image' property.