poly2label
Description
creates a numeric label matrix L
= poly2label(roiPositions
,roiLabelIDs
,imageSize
)L
from the regions of interest (ROIs)
defined in roiPositions
. roiLabelIDs
specifies the
numeric ID for each ROI in roiPositions
. imageSize
specifies the size of the output label matrix.
creates a numeric label matrix where the spatial referencing object L
= poly2label(roiPositions
,roiLabelIDs
,R
)R
specifies the coordinate system used by the ROI positions in
roiPositions
. The function assumes that the ROI positions are in
world limits defined by R
. The ImageSize
property of
R
specifies the size of the label matrix
L
.
Examples
Input Arguments
Output Arguments
Tips
The
poly2label
function sets pixels that are inside an ROI to a label value. For more information about classifying pixels on the ROI boundary, see Classify Pixels That Are Partially Enclosed by ROI.When the positions of several ROIs overlap each other, the ROI label with the lowest index number in the
roiPositions
cell array overwrites the other ROIs.
Version History
Introduced in R2020b
See Also
poly2mask
| drawpolygon
| labeloverlay
| roipoly
| polyToBlockedImage