OpenCV中的Blob提取 [英] Blob extraction in OpenCV

查看:304
本文介绍了OpenCV中的Blob提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenCV对某些颜色的图像进行过滤,因此我获得了检测到的区域的二进制图像.

I'm using OpenCV to filter an image for certain colours, so I've got a binary image of the detected regions.

现在我要侵蚀那些区域,然后去除较小的区域,并找到最大的"blob"的x,y坐标

Now I want to erode those areas and then get rid of the smaller ones, and find the x,y coordinates of the largest 'blob'

我一直在寻找有关最好使用什么库的建议?我看过cvBlob和cvBlobsLib,但是我不太确定如何设置它们.我要与项目一起编译它们还是要编译并将它们安装到系统中(就像我对OpenCV所做的一样?)?

I was looking for recommendations as to what the best library would be to use? I've seen cvBlob and cvBlobsLib but I'm not too sure how to set them up. Do I want to compile them along with the project or do I want to compile and install them to the system (like I did with OpenCV)?

我目前在Ubuntu上使用Code :: Blocks IDE(尽管这不应该限制事物)

I'm currently using the Code::Blocks IDE on Ubuntu (although that shouldn't restrict things)

推荐答案

我参加聚会很晚,但我想提醒一下,在opencv中可以使用一种方法来连接组件,但它不是主线

I'm late to the party, but I'd just like to chime in that there is a way to do connected components in opencv, it's just not mainlined yet.

更新:它是主线,只是停留在等待3.0发行多年. 文档链接

Update: It is mainlined, it's just been stuck waiting for 3.0 to release for multiple years. Linky to documentation

请参见 http://code.opencv.org/issues/1236 http://code.opencv.org/attachments/467/opencv-connectedcomponents.patch

免责声明-我是作者.

这篇关于OpenCV中的Blob提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆