分析和提取图像轮廓(版本X)
发布时间
阅读量:
阅读量
opencv中使用findContours()函数来识别图像中的物体轮廓,并配合drawContours()函数将检测到的轮廓图形展示出来。首先了解findContours(),opencv支持了两种定义方式
findContours()
void cv::findContours ( InputOutputArray image,
OutputArrayOfArrays contours,
OutputArray hierarchy,
int mode,
int method,
Point offset = Point()
)
参数解释
image:** 输入图像必须是8位单通道的。所有非零像素将被视为置为1;而0像素则保持其原始数值。此过程将自动生成二值图;我们可以利用以下OpenCV函数来生成二值图:cv::c
全部评论 (0)
还没有任何评论哟~
