3

What does SimpleBlobDetector actually do?

It returns some points to me, but what are these points?

Does the blob detector find image regions of similar properties, including colors?

Can I retrieve the contour of the found blobs? I saw detectEx function calls in some examples on the web, but see no such function in OpenCV 2.4.5. What is used instead of this function now?

UPDATE

Here is how the blob detecting algorithm is described in the docs:

  1. Convert the source image to binary image by applying thresholding with several thresholds from minThreshold (inclusive) to maxThreshold (exclusive) with distance thresholdStep between neighboring thresholds.
  2. Extract connected components from every binary image by findContours() and calculate their centers.
  3. Group centers from several binary images by their coordinates. Close centers form one group that corresponds to one blob, which is controlled by the minDistBetweenBlobs parameter.
  4. From the groups, estimate final centers of blobs and their radiuses and return as locations and sizes of keypoints.

It is not clear that blobs should be circular!

1 Answer 1

4

The points it returns are the centres of the blobs in the image. The blobs are assumed to be circular, and the size stored as the size of the keypoints in the output vector that is obtained with the detect() function. You can specify the colour of the blobs you are looking for by using filtering based on colour, as specified in your link. Set filterByColor = true and specify the colour you are looking for in blobColor.

If you're looking for contours, you will need to break the process down into finer steps. First threshold to obtain a binary image. Then use the findContours function in OpenCV.

Sign up to request clarification or add additional context in comments.

7 Comments

How to merge contours, containing the similar color content?
Do you mean to merge blobs or merge contours? I'm not clear on how you would merge contours..?
I can just put them in single bag. Later I can calculate joined area or make a hull.
P.S. if blobs are circles, then what does convexity limit means?
Ah I see what you mean. I would merge in a brute force manner, by checking the proximity of the ends of all contours, and by comparing their pixel colours. Any contours whose ends almost touch, and whose ends are of similar colours may be merged.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.