目录
-
转载请注明本函数文详细地址
-
本文讲解了opencv自带轮廓跟踪以及绘制轮廓的函数
-
本文讲解了一种基于链码的一种轮廓检测方法
-
本文一到四部分转载至:《opencv cv.findContours 函数详解》
一、函数 cv.findContours
contours, hierarchy = cv.findContours( image, mode, method[, contours[, hierarchy[, offset]]] )
参数1:源图像
参数2:轮廓的检索方式,这篇文章主要讲解这个参数
参数3:一般用 cv.CHAIN_APPROX_SIMPLE,就表示用尽可能少的像素点表示轮廓
contours:图像轮廓坐标,是一个列表
hierarchy:[Next, Previous, First Child, Parent],文中有详细解释
我们使用cv.findContours()寻找轮廓时,参数2表示轮廓的检索方式(RetrievalModes),