FillPoly
填充多边形内部
void cvFillPoly( CvArr* img, CvPoint** pts, int* npts, int contours,
CvScalar color, int line_type=8, int shift=0 );
img
图像。
pts
指向多边形的数组指针。
npts
多边形的顶点个数的数组。
contours
组成填充区域的线段的数量。
color
多边形的颜色。
line_type
组成多边形的线条的类型。
shift
顶点坐标的小数点位数。
函数cvFillPoly用于一个单独被多边形轮廓所限定的区域内进行填充。函数可以填充复杂的区域,例如,有漏洞的区域和有交叉点的区域等等。
FillConvexPoly
填充凸多边形
void cvFillConvexPoly( CvArr* img, CvPoint* pts, int npts,
CvScalar color, int line_type=8, int shift=0 );
img
图像。
pts
指向单个多边形的指针数组。
npts
多边形的顶点个数。
color
多边形的颜色。
line_type
组成多边形的线条的类型。参见cvLine
shift
顶点坐标的小数点位数。
函数cvFillConvexPoly填充凸多边形内部。这个函数比函数cvFillPoly 更快。它除了可以填充凸多边形区域还可以填充任何的单调多边形。例如:一个被水平线(扫描线)至多两次截断的多边形。
PolyLine
绘制简单或多样的多边形。
void cvPolyLine( CvArr* img, CvPoint** pts, int* npts, int contours, int is_closed,
CvScalar color, int thickness=1, int line_type=8, int shift=0 );
img
图像。
pts
折线的顶点指针数组。
npts
折线的定点个数数组。
contours
折线的线段数量。
is_closed
指出多边形是否封闭。如果封闭,函数将起始点和结束点连线。
color
折线的颜色。
thickness
线条的粗细程度。
line_type
线段的类型。参见cvLine。
shift
顶点的小数点位数。
函数cvPolyLine 绘制一个简单的或多样的折线。