how to convert an image into binary image while selecting multiple regions?

2 visualizzazioni (ultimi 30 giorni)
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...

Risposte (1)

Image Analyst
Image Analyst il 21 Lug 2014
I already answered in the duplicate question: http://www.mathworks.com/matlabcentral/answers/142820#answer_145879

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by