remove a part of image

5 views (last 30 days)
hanem ellethy
hanem ellethy on 3 Sep 2015
Commented: hanem ellethy on 5 Sep 2015
if i have an MRI image and I don't want the down part. I want to make it black or neglected.how can i do like the image I attached. I don't want the down part horizontally after point 3 or if you have a way to extract only the brain part thanks alot
it

Accepted Answer

Image Analyst
Image Analyst on 3 Sep 2015
I assume you used text() to place the numbers on the image. I'm not sure what the "down" part is, but if you want to set the image below the row that the 3 is on to be zero, then you can do this:
grayImage(row3, :) = 0;
  11 Comments
Image Analyst
Image Analyst on 5 Sep 2015
imrect() and imcrop() only allow for rectangular regions of interest. And imcrop() changes the size of the image by throwing away pixels. poly2mask() does not change the size of the image and allows you to have non-rectangular shapes to zero out.
Don't worry about that warning - it's just saying that it's shrinking your image upon display only so that it will fit into the axes. If you don't want that warning message to appear, see my utility (attached) to suppress common warning messages.
hanem ellethy
hanem ellethy on 5 Sep 2015
thank you so much.

Sign in to comment.

More Answers (0)

Categories

Find more on Biomedical Imaging in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!