Debug Assertion Failed When Using Example in OpenCV Sample Code

asked 2014-01-26 23:15:18 -0600

Edgar gravatar image

updated 2014-01-26 23:21:26 -0600

I have used the sample code (below website) in OpenCV, but I got a "Debug Assertion Failed" when I tried to tune the trackbar.

http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html#find-contours

http://imgur.com/NTmHSVm

It occurs when the function returns.

It will be OK when I change the declaration of vectors to global domain.

However it will still pop out the "Debug Assertion Failed" when the program ends.

I think the problem is the destructor of vector, but I don't know how to solve it. Please help me to solve this problem.

By the way, I work in VC 2013 and OpenCV 2.4.8.

Edgar

edit retag flag offensive close merge delete