OpenCV中边缘检测与提取有很多种方法,其中cvFindContours是常用的一种轮廓提取方法。熟悉轮廓提取,对图像识别有很重要的作用。
函数cvFindContours从二值图像中检索轮廓,并返回检测到的轮廓的个数。first_contour的值由函数填充返回,它的值将为第一个外轮廓的指针,当没有轮廓被检测到时为NULL。其它轮廓可以使用h_next和v_next连接,从first_contour到达。
int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour,