tags:

views:

166

answers:

1

I am trying to do simple image processing with OpenCV and the cvBlobsLib in Visual C++ 2008, and I get an error message when I try to create a CBlobResult object

IplImage* original = cvLoadImage("pic6.png",0);
cvThreshold(original, original, 100, 255, CV_THRESH_BINARY);
CBlobResult blobs = CBlobResult(original, NULL, 255);

The message is the following:

Run-Time Check Failure #2 - Stack around the variable blobs was corrupted

Why does this happen? How should I create this object? Thank you very much for your help.

A: 

Sorry. Actually it was my fault. I was trying to compile the debug version of my project with the release version of the cvBlobsLib library. As soon as I linked the debug version it worked.

jpromvi