MATLAB: How to remove the circular border from the image

circular borderImage Processing Toolbox

I want to remove the white circular border in the images attached. I need only those white spots in the image. Please help me with a matlab code for the same.

Best Answer

Is the circle in the same location for every image? If so, see code in the FAQ for how to create a circle mask that you can multiply by your image or use as logical indexes to "erase" the circle. If not, you'll have to do something fancier and additional questions will need to be answered, like are all the blobs inside the circle or can they be outside, do any of the blobs touch the circle, etc.