roipoly
指定感兴趣的多边形区域(ROI)
Syntax
描述
Create Polygon Interactively
Create Polygon by Specifying Vertices
例子
输入参数
Output Arguments
More About
提示
roipoly
always produces a closed polygon. If you specify input vertex positions of a closed polygon (such that the last pair of coordinates is identical to the first pair), then the length of the output coordinate vectors is equal to the number of points specified. If the points specified do not describe a closed polygon, thenroipoly
添加了一个与第一点相同的坐标的最后点。在这种情况下,输出坐标向量的长度大于指定的点数。For more information about classifying pixels on the ROI boundary, seeClassify Pixels That Are Partially Enclosed by ROI。
For any of the
roipoly
语法,您可以替换输入图像I
with two arguments,m
和n
,指定任意图像的行和列尺寸。例如,这些命令创建一个100 x-200二进制掩码。c = [112 112 79 79]; r = [37 66 66 37]; BW = roipoly(100,200,c,r);
如果指定
m
和n
与一个交互式佛rm ofroipoly
, anm
-经过-n
显示黑色图像。使用鼠标在此图像中指定多边形。