how to convert an image into binary image while selecting multiple regions?
2 次查看(过去 30 天)
显示 更早的评论
Hi, I use free hand drawing to select the regions in the image.
I segmented this image and converted to bw
and the next one is the binary image(binaryImage) of the above segmented image
hFH = imfreehand();
% Create a binary image ("mask") from the ROI object.
binaryImage = hFH.createMask();
----(binaryImage)-
i did inside contouring and selected the inner region,
this is the binary image of the inner region that i got after contouring
---binaryImage1----
and in order to get the binary image for the segmented image with the inner region i did
segmentedImageMask=binaryImage-binaryImage1;
I performed contouring of multiple regions, which means selected regions one by one. This is the first region
and this is the second region
So, when i tried to get the binary mask of the multiple regions by using
segmentedImageMask=binaryImage-binaryImage2;
I could get only the last region that i selected but not multiple regions.
Can you assist me in getting all the selected regions in the segmented binary mask of the multiple regions.
thanks...
0 个评论
回答(1 个)
Image Analyst
2014-7-21
I already answered in the duplicate question: http://www.mathworks.com/matlabcentral/answers/142820#answer_145879
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!