问题描述
这个Q&一个网站建议我使用findContour模拟matlab中的bwlabel。但我不确定,因为我认为轮廓是闭合形状的检测到的边缘和bwlabel元素是一个连接的形状。我想他们可能在逻辑上是一样的。他们在实践中怎么样?
Some people in this Q & A site suggested I use findContour to imitate what bwlabel in Matlab. But I am not sure because I think a contour is closed shape of detected edges and element from bwlabel is a connected shape. I guess they might be logically the same. What about them in practice? Are they really same?
推荐答案
使用这两个库.... 或 ...你会得到许多关于连接的组件的功能,如大小和轮廓和椭圆率和边界框...你可以过滤blob和添加togethar 2个或更多的blob ...试试它在敞篷综合bwlabel是一个双扫描连接的组件,其中cvblob或cvBlobslib是一个扫描算法...
Use either of these two library....cvBlobslib or cvblob...you will get many features about the connected components such as size and contour and ellipticity and bounding box...you can filter blobs and add togethar 2 or more blobs...try it..under the hood algo of bwlabel is a two scan connected component where as cvblob or cvBlobslib is a one scan algo...
这篇关于可以在OpenCV中找到Contour工作像matlab中的bwlabel?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!