最近在写车牌检测的程序, 想法是想把车牌框的边缘提取出来
但是经过二值化后的edge, 并不是完整的连接, 不少的地方有断点, 还有无关的边缘
先不考虑形态学, 看看是否能够较好的提取处来
首先先上关于findContours的内容 http://blog.youkuaiyun.com/traumland/article/details/51093262
即使不看算法只看看这两张图, findContours 中的 hierarchy 结构想必也能了解了
opencv官方文档中给了一个样例, 就是利用drawContours 把 connected - components 都提取出来
cv::findContours(img,outerline,hierarchy,CV_RETR_TREE,CV_CHAIN_APPROX_NONE);
int idx = 0;