cv2.fillPoly 和 cv2.fillConvexPoly:非凸任意形状填充和凸填充
来源:互联网 发布:噼里啪啦直播软件 编辑:程序博客网 时间:2024/06/05 08:16
cv2.fillConvexPoly:
官方文档:The function fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).
使用方法:
import cv2import numpya = numpy.zeros((10,10))triangle = numpy.array([ [1,3], [4,8], [1,9] ], numpy.int32)cv2.fillConvexPoly(a, triangle, 1)
cv2.fillPoly:
官方文档:The function fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.
使用方法:
cv2.fillPoly(a, [triangle], 1)
如果有多个形状:
cv2.fillPoly(a, [triangle, square, hexagon], 1)
阅读全文
0 0
- cv2.fillPoly 和 cv2.fillConvexPoly:非凸任意形状填充和凸填充
- 【opencv】填充多边形 fillPoly
- cv2
- python下使用cv2.drawContours填充轮廓颜色
- opencv 3.0 填充矩形 填充多边形 fillPoly
- opencv 3.0 填充矩形 填充多边形 fillPoly
- opencv2 和 opencv3冲突问题 im = cv2.imread(cur_path + '/../demo/' + im_name, cv2.IMREAD_COLOR | cv2.IMREA
- python cv2 中cv2.imread和cv2.resize输入输出参数顺序
- PIL:Image 和 cv2简单比较
- cv2.setMouseCallback、cv2.createTrackbar
- 区域填充:扫描线种子填充和剖面线填充
- css边界和填充
- svg 笔画和填充
- cv2.imread()和caffe.io.loadimage的区别
- cv2.imread()和caffe.io.loadimage的区别
- make pySunergy 和 Pycharm import cv2 出现numpy错误
- pycaffe读图 cv2.imread 和 caffe.io.loadimage区别
- opencv学习——fft用numpy和cv2
- 深度学习利器:TensorFlow使用实战分享
- 利用ScheduledThreadPoolExecutor定时执行任务
- JavaScript总结(1)
- HQL语句
- Spark SQL下Parquet内幕深度解密
- cv2.fillPoly 和 cv2.fillConvexPoly:非凸任意形状填充和凸填充
- PAT甲级 1001. A+B Format (20)
- webApi调用
- LeetCode | 50. Pow(x, n)
- centos7下安装配置JDK(时间戳2017年7月1日)
- JavaScript问题积累(1)
- sklearn中常用数据预处理方法
- ssm后端校验,解决数据无法回显和jsp页面属性无法绑定userBean
- 最小生成树——Prim