opencv 3.0 填充矩形 填充多边形 fillPoly
2015-02-27 15:30
155 查看
opencv中没有旋转矩形,也没有填充矩形
原来它封装了一个 填充多边形fillPoly()
不多说上代码
结果如图
原来它封装了一个 填充多边形fillPoly()
不多说上代码
void drawpoly() { Mat img(500, 500, CV_8U, Scalar(0)); Point root_points[1][4]; root_points[0][0] = Point(215,220); root_points[0][1] = Point(460,225); root_points[0][2] = Point(466,450); root_points[0][3] = Point(235,465); const Point* ppt[1] = {root_points[0]}; int npt[] = {4}; polylines(img, ppt, npt, 1, 1, Scalar(255),1,8,0); imshow("Test", img); waitKey(); fillPoly(img, ppt, npt, 1, Scalar(255)); imshow("Test", img); waitKey(); }
结果如图
相关文章推荐
- opencv 3.0 填充矩形 填充多边形 fillPoly
- 【opencv】填充多边形 fillPoly
- opencv-线,椭圆,长方形(矩形),圆,填充多边形绘制
- OpenCV在图像上画线、矩形、椭圆、多边形、填充的多边形、圆、显示文字
- opencv 填充矩形 填充多边形
- OpenCv学习笔记(六):使用opencv画线、矩形、椭圆、多边形线、多边形体等
- opencv_tutorial_code学习——画椭圆、圆、填充矩形、直线
- opencv 3.0 旋转矩形 RotatedRect
- opencv学习笔记(十)画直线、矩形、圆形、椭圆以及多边形程序
- openCV 画矩形框或填充矩形
- OpenCV2.4.13 中 选取roi区域,任意形状(矩形,不规则多边形,圆形,椭圆,手动指定形状)
- opencv在图片指定区域内填充矩形,并在图片中显示矩形的轮廓
- Opencv用鼠标绘制填充多边形
- openCV 画矩形框或填充矩形
- 【OpenCV3】几何图形(直线、矩形、圆、椭圆、多边形等)绘制
- OpenCV环境下绘制轮廓的外接多边形、最小立式矩形、最小外接圆
- OpenCV学习九:绘制直线、矩形、椭圆、原型、填充任意图形
- OpenCV之imgproc 模块. 图像处理(5)在图像中寻找轮廓 计算物体的凸包 创建包围轮廓的矩形和圆形边界框 为轮廓创建可倾斜的边界框和椭圆 轮廓矩 多边形测试
- python opencv绘制多边形和多边形填充
- openCV 画矩形框或填充矩形