MATLAB: Removing the boundary objects

image processing

I have an image
please tell how to remove the boundary object,this is the process after segmentation

Best Answer

If you have the Image Processing Toolbox, the function imclearborder is what you want.
Related Question