Ask Your Question

Malcolmmaya's profile - activity

2018-07-03 09:11:57 -0600 received badge  Popular Question (source)
2016-04-28 07:28:55 -0600 received badge  Student (source)
2015-05-28 05:29:14 -0600 commented question Blob detection

That pretty much answer my question thanks a lot :).

2015-05-27 12:39:18 -0600 commented question Blob detection

Is there a way to make it so that it does not have parameter and just detect every blob ?

2015-05-27 10:29:35 -0600 commented question Blob detection

I edited the question in regard to your comment

2015-05-27 10:29:21 -0600 received badge  Editor (source)
2015-05-27 09:36:49 -0600 asked a question Blob detection

Hello all,

I'm trying to detect the blob in the following image (the one on the bottom left) :

image description

I used the cv::SimpleBlobDetector detector to detect blob in other previous image as here (after inverting the color so the square is actually black) :

image description

And it worked fine.

However with the first image, the code doesn't return any keypoints. Here is the said code :

cv::SimpleBlobDetector::Params params;
params.filterByCircularity = false;
params.filterByArea = true;
params.minArea = 1;
cv::SimpleBlobDetector detector(params);
std::vector<cv::KeyPoint> keypoints;
detector.detect( roi, keypoints);

std::cout << "print keypoints" << std::endl;
for(size_t i = 0 ; i < keypoints.size() ; i++){
    std::cout << "keypoint : " << keypoints[i].pt << std::endl;
}
std::cout << std::endl;
return true;

I've seen this page and I know that by default the blob detector is tuned to detect black circular blobs. Could it be the reason for the failing ?

ANSWER :

Sorry I can't post an answer for now because I'm too new :

One need to set those parameters :

cv::SimpleBlobDetector::Params params;
params.filterByConvexity = false;
params.filterByInertia = false;
params.filterByCircularity = false;
params.filterByArea = true;
params.minArea = 1;