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
0 件のコメント
採用された回答
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
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Neuroimaging についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
