contourArea()函数:用于计算图像轮廓的面积

您所在的位置:网站首页 求面积是用什么单位 contourArea()函数:用于计算图像轮廓的面积

contourArea()函数:用于计算图像轮廓的面积

#contourArea()函数:用于计算图像轮廓的面积| 来源: 网络整理| 查看: 265

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