how to get the roi of an image by masking
古いコメントを表示
I have an image of size 584x565x3 and a binary mask of size 584x565. please consider the following piece of code
greenimg=I(:,:,2);
masked_I=mask.*greenimg;
imshow(masked_I);
But I am not getting the region of interest instead it seems same as the original mask
Please help
4 件のコメント
Walter Roberson
2013 年 3 月 12 日
Check the data type of masked_I : is it the same as I ?
Check
any(mask(:) ~= 1)
if it does not say true (or 1) in response then the masked version would be exactly the same
Mahua Nandy(Pal)
2013 年 3 月 12 日
Mahua Nandy(Pal)
2013 年 3 月 13 日
Alessandro
2013 年 3 月 13 日
probably you are reading the roi in the wrong way or you roi isn t a valid roi. look for the values on your roi using unique(roi(:)). Read the roi using imread.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!