remove a part of image

4 次查看(过去 30 天)
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

采纳的回答

Image Analyst
Image Analyst 2015-9-3
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 个评论
Image Analyst
Image Analyst 2015-9-5
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 2015-9-5
thank you so much.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Neuroimaging 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by