MATLAB: [Image Processing] Remove a part of a figure

imageimage analysisimage processingImage Processing Toolboxmri images

Hi Everyone,
I am doing some analysis of MRI images and I almost have what I need. I have images like so: http://imgur.com/One01
Is there any way that I could remove the top semi circle? I tried bwareaopen but the region I want to remove is larger than my other ROI's. I also tried calling regionprops but there is no enclosed area so that didn't work either. I would need something automated since I have to run the script on several images.
Any recommendations would be much appreciated!
– JG

Best Answer

If you can be sure that the top one is also left most, then just label and use ismember(). Something like
[labeledImage, numberOfRegions] = bwlabel(outlineImage);
outputImage = ismember(labeledImage, 2:numberOfRegions);
If it's above but not necessarily to the left, you could transpose (to flip it on its side), then do the above code, and transpose back.
Related Question