MATLAB: Impoly to choose all the ROI

Image Processing Toolboximpolyroi

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!

Best Answer

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.