Ask Your Question
3

What exactly is a Blob in OpenCV ?

asked 2014-11-09 17:19:16 -0600

huehuehue gravatar image

When I run the SimpleBlobDetector, it fails to detect hollow circles (like a donut) but it detects any plain object. So I am confused, what's the definition of a blob ?

edit retag flag offensive close merge delete

Comments

Unfortunately that doesn't answer my question, I need a correct definition of a blob, like a definition of a line or a circle.

huehuehue gravatar imagehuehuehue ( 2014-11-10 14:09:16 -0600 )edit
1

blob is nothing but a contour

Balaji R gravatar imageBalaji R ( 2014-11-11 03:33:31 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
6

answered 2015-02-18 03:51:40 -0600

theodore gravatar image

updated 2015-02-18 03:58:49 -0600

Apparently you need to read some theory first in order to get the definition of what is a BLOB. If you make a small research probably you will get it, but shortly:

BLOB definition

BLOB stands for Binary Large OBject and refers to a group of connected pixels in a binary image. The term "Large" indicates that only objects of a certain size are of interest and that the other "small" binary objects are usually noise. There are three procedures regarding BLOB analysis.

  1. BLOB extraction
  2. BLOB representation
  3. BLOB classification

BLOB extraction

The purpose here is to isolate the BLOBs (objects) in a binary image. As mentioned above, a BLOB consists of a group of connected pixels. Whether or not two pixels are connected is defined by the connectivity, that is, which pixels are neighbours or not. There are two main types of connectivity. The 8-connectivity and the 4-connectivity. The 8-connectivity is better than the 4-connectivity, but the 4-connectivity is often applied since it requires fewer computations, hence you process your image faster.

Moreover, a number of different algorithms exist for finding the BLOBs and such algorithms are usually referred to as connected component analysis or connected component labeling. Such algorithms are the Recursive Grass-Fire Algorithm, the Sequential Grass-Fire Algorithm, etc (I will not explain here how they work, but you can search by yourself).

BLOB representation

When you have extracted your BLOB, the next step is now to classify the different BLOBs. For example we want to classify each BLOB as either a circle of not a circle, or a human vs. non-human BLOB. The classification process consists of two steps. First, each BLOB is represented by a number of characteristics, denoted as features, and second some matching method is applied to compare the features of each BLOB with the features of the type of object we are looking for. For example, to find circles we could calculate the circularity of each BLOB and compare that to the circularity of a perfect circle. So, BLOB representation is a matter of converting each BLOB into a few representative numbers. That is, keep the relevant information and ignore the rest. Such of information include for example, the area, the circularity, the compactness, the perimeter, the center of mass, etc...

BLOB classification

The task here is to determine which BLOB for example, is a circle and which not. The question here now is how to define which BLOBs are circles and which are not based on their features that we mentioned earlier. For this purpose usually you need to make a prototype model of the object you are looking for. That means, what are the feature values of a perfect circle and what kind of deviation will you accept. This prototype model could differ from a simple box classifier (i.e. just a threshold value/limit) to a more advanced statistical classifier.

As @Balaji Renganathan mentioned in his answer there are many different libraries that deal with BLOB analysis and ... (more)

edit flag offensive delete link more
6

answered 2015-02-17 23:56:59 -0600

spmallick gravatar image

I have written a tutorial for SimpleBlobDetector : Blob detection using OpenCV . I have explained what the various parameters mean with code in both Python and C++. Hope this helps.

edit flag offensive delete link more
4

answered 2014-11-09 23:27:27 -0600

Blob is a library for computer vision to detect connected regions in binary digital images. This is nothing but contours in opencv with some extra features like blob/contour orientation, centroid, color, Area,Mean and standard deviation of the pixel values in the covered region,etc...

I have noticed few blob libraries such as

OpenCVBlobsLib - This one looks pretty good as it got Multi core support for the extraction stage & this is well documented.

cvblob- this is old c implementation.

cvBlobLib- this is not well documented.

OpenCVBlobsLib is well documented & got some interesting features in it. You can also check each libraries & evaluate them individually. For more details read their doc!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-11-09 17:19:16 -0600

Seen: 35,459 times

Last updated: Feb 18 '15