SimpleBlobDetector bug?

asked 2013-08-16 18:23:47 -0500

redfood gravatar image

updated 2013-08-16 18:24:17 -0500

I am using SimpleBlobDetector from OpenCV 2.45 (32-bit) with VS 2010 under windows 7.

When I compile and run my code in VS's debug configuration everything works fine.

When I compile and run my code in VS's release configuration the call to detect crashes with the following error:

image description

Here is the relevant code:

cv::SimpleBlobDetector::Params params;
params.thresholdStep = 60;
params.minThreshold = 60;
params.maxThreshold = 255;
params.minDistBetweenBlobs = 4.5;

params.filterByColor = true;
params.blobColor = 255;

params.filterByArea = true;
params.minArea = 4;
params.maxArea = 100;

params.filterByCircularity = false;

params.filterByInertia = false;

params.filterByConvexity=false;

blobDetector = new cv::SimpleBlobDetector(params);

and then

   cv::Mat myImage
   ... some image processing here ...
   std::vector<cv::KeyPoint> keypoints;
   blobDetector->detect(myImage, keypoints);

and boom. The call to detect crashes (only .

Any ideas or suggestions (beyond always compiling with debug)?

Thanks in advance!

edit retag flag offensive close merge delete

Comments

please check, if you got the right libraries (without "d" at the end) in release mode

berak gravatar imageberak ( 2013-08-17 04:33:16 -0500 )edit

That was it! The solution was generated by CMake so I didn't think to check the libs (but obviously I the CMake file setup incorrectly). Thank you. (If you want, post this as an answer, I can mark it as accepted so you can get the Karma).

redfood gravatar imageredfood ( 2013-08-17 15:30:10 -0500 )edit