Impoly to choose all the ROI
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello! I would like to ask, how can I use impoly to choose all the ROI and not just the polygon that is around it!
댓글 수: 0
채택된 답변
Adam
2015년 10월 2일
편집: Adam
2015년 10월 2일
mask = createMask( hROI, hIm );
should give you a binary mask for the region, where hROI is your impoly and hIm is the handle of image on which it was drawn.
댓글 수: 5
Image Analyst
2015년 10월 6일
This will apply the mask to the original image to erase the original pixels everywhere outside the mask:
% Initialize output to be same as input.
maskedImage = grayImage;
% Now erase pixels outside the mask.
maskedImage(~mask) = 0;
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!