poly2label
Syntax
Description
creates a numeric label matrixL
= poly2label(roiPositions
,roiLabelIDs
,imageSize
)L
from the regions of interest (ROIs) defined inroiPositions
.roiLabelIDs
specifies the numeric ID for each ROI inroiPositions
.imageSize
specifies the size of the output label matrix.
creates a numeric label matrix where the spatial referencing objectL
= poly2label(roiPositions
,roiLabelIDs
,R
)R
specifies the coordinate system used by the ROI positions inroiPositions
. The function assumes that the ROI positions are in world limits defined byR
. TheImageSize
property ofR
specifies the size of the label matrixL
.
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, seeClassify 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