Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blobs with OpenCV. Which library is best? [closed]

I plan to start experimenting with blobs as a C++ user, with some experience at cv::Mat's from the OpenCV.

Now the question is, which blobs library should I use if at all?

I have seen these alternatives so far:

  1. cvBlobs (on google code) -- that is a c library really, working with IplImage so it needs serious adaptation to c++.
  2. CvBlobsLib (on willowgarage opencv webpage) -- that looks like a c++ library but has quite bad docs with plenty of stuff left unexplained and barely any code example.
  3. I have seen cv::findContours, cv::moments and cv::drawContours in the OpenCV 2.4.3 library.

What do you suggest as an expert? My pressing issue: what will the new OpenCV not cover of cvBlobs on google code?


Here is the link for the follow-up question on this subject, where I ask about SimpleBlobDetector. You might be interested.

like image 983
Barney Szabolcs Avatar asked Nov 23 '12 13:11

Barney Szabolcs


People also ask

What is blob detection Opencv?

Blob stands for Binary Large Object and refers to the connected pixel in the binary image. The term "Large" focuses on the object of a specific size, and that other "small" binary objects are usually noise.

What is blob detection used for?

In computer vision, blob detection methods are aimed at detecting regions in a digital image that differ in properties, such as brightness or color, compared to surrounding regions.

What is blob in image processing?

The method of analyzing an image that has undergone binarization processing is called "blob analysis". A blob refers to a lump. Blob analysis is image processing's most basic method for analyzing the shape features of an object, such as the presence, number, area, position, length, and direction of lumps.

What format is the image read in using Opencv as an array in C++ and as a list in Python?

It loads the image in BGR format.


2 Answers

You should use the SimpleBlobDetector class in OpenCV 2.4. You pretty much create an object of type SimpleBlobDetector and then call the detect(cv::Mat input, vector<cv::KeyPoint> keypoints, cv::Mat mask) function with a cv::Mat image as input, an empty vector for keypoints, and another cv::Mat as an optional mask for a specific area of the image to look for keypoints in.

Note that the cv::Mat object has taken over image and matrix storage duty for all of the formerly separate image and matrix classes in the earlier releases of OpenCV.

like image 118
thealmightygrant Avatar answered Oct 12 '22 23:10

thealmightygrant


You should take a look at the new opencvblobslib. It has great features like multi core support.

like image 33
rold2007 Avatar answered Oct 12 '22 23:10

rold2007