contourArea()函数:用于计算图像轮廓的面积 |
您所在的位置:网站首页 › 求面积是用什么单位 › contourArea()函数:用于计算图像轮廓的面积 |
1、contourArea()函数的作用: 主要用于计算图像轮廓的面积,通常搭配findContours()函数使用。 2、double contourArea(InputArray contour,bool oriented=false) 参数: InputArray contour : 输入的点,一般是图像的轮廓点 bool oriented = false : 默认值为false,表示某一个方向上的轮廓的面积值参考博文: https://blog.csdn.net/xueluowutong/article/details/80911972 例程: Canny(grayImage, edge_image, 20, 100, 3,false); vector contours; vector hierarchy; findContours(edge_image, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point()); for (int i = 0; i |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |