Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV?

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

blob detection test image HERE

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV?OpenCV? Do I need to rite my own?

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

blob detection test image HERE

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV? Do I need to rite write my own?

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

blob detection test image HERE

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

click to hide/show revision 4
None

updated 2018-03-28 14:00:19 -0600

berak gravatar image

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV? Do I need to write my own?OpenCV?

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

blob [blob detection test image HEREHERE][1]

!

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

click to hide/show revision 5
None

updated 2018-03-28 14:02:24 -0600

berak gravatar image

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV?

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

[blob detection test image HERE][1]

! https://i.stack.imgur.com/qnzMG.jpg

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV?

All of these parameters were commented out when the image was taken, only the code above was executed

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

https://i.stack.imgur.com/qnzMG.jpg

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV?

All of these parameters were commented out out when the image was taken, only the code above was executed

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

https://i.stack.imgur.com/qnzMG.jpg

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources

OpenCv SimpleBlobDetector does not find all blobs. C++ , VS2015

I have a simple task for OpenCV SimpleBlobDetector

cv::SimpleBlobDetector::Params params;
cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params);
std::vector<cv::KeyPoint> keypoints;
detector->detect(crop, keypoints);
drawKeypoints(crop, keypoints, crop, cv::Scalar(0, 0, 255), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
cv::imshow("crop", crop);
cv::waitKey(0);

It is not detecting half of the blobs in my image. Please see picture below,

I tried adding parameters and varying them, at no point has it ever detected every single blob. Blob detection is a simple and straightforward algorithm that should be completely refined in every image processing API. Is this not the case with OpenCV?

All of these parameters were commented out when the image was taken, only the code above was executed

//params.minThreshold = 0;
//params.maxThreshold = 255;
//params.filterByArea = true;
//params.minArea = 1000;
//params.maxArea = 5000;
//params.filterByCircularity = true;
//params.minCircularity = 0.4;
//params.filterByConvexity = true;
//params.minConvexity = 0.87;
//params.filterByInertia = true;
//params.minInertiaRatio = 0.71;

https://i.stack.imgur.com/qnzMG.jpg

I'm using either OpenCV 3.3 or 3.2, I can't seem to find the version number in the sources