Alex Rivera | Logout

Blob extraction in OpenCV

Asked 2011-01-09T21:09:28.743
13

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

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'

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)?

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

Edit
Report

2 Answers

11

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.

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

See http://code.opencv.org/issues/1236 and http://code.opencv.org/attachments/467/opencv-connectedcomponents.patch

Disclaimer - I'm the author.

answered 2012-04-12T02:23:03.460
0

I think the best and easy option to work with blobs with OpenCV is to use cvBlob library. Its a complemntary library with OpenCV a its so easy to use.

answered 2011-03-02T21:58:38.777

Your Answer