image segmentation
조회 수: 9 (최근 30일)
이전 댓글 표시
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
채택된 답변
Sean de Wolski
2011년 3월 7일
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
추가 답변 (4개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!