Impoly to choose all the ROI
2 次查看(过去 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!