image segmentation
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hey, Im trying to segment out a polygon region out of an image. I have already got the boundary pixels . Can you please help me in finding out the pixel values inside the boundary.
Thank You
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 7 Mär. 2011
Okay, use IMFILL or POLY2MASK to generate a logical mask and then multiply it by the image to preserve the content inside the mask. I.e.
For grayscale images:
Imasked = I.*cast(Mask,class(I));
or for RGB images:
Imasked = bsxfun(@times,I,cast(Mask,class(I)));
0 Kommentare
Weitere Antworten (4)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!