Find Contours: Crash with no error

asked 2016-02-01 13:56:16 -0600

Hello,

I have started using OpenCV 3.0, using Microsoft Visual Studio 2015, on an x86 machine. After following the instructions in the documentation, I have experimented with a number of different functions such as blur, filtering, canny edge detection, harris corner detection with no problems.

However I am now attempting to run the findContours for shapre detection as described here:

https://github.com/Itseez/opencv/blob...

I have copied the example code exactly has listed in the demo and not made any changes to it, other than adding cout<< statements, (after the colour conversion, after bluring, after opening the window, after canny thresholding, and prior to the findcontours statement). From the cout statements, the code passes the other lines without exception and crashes on the findcontours line:

findContours( canny_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );

No assert error message appears, the programme just crashes, without any error message in the console window.

Do you have any suggestions as to how I could diagnose this problem? Do you have any suggestions as to why the code would crash on this function, and yet work perfectly on all the others I have tried?

Thank you for your help

James

edit retag flag offensive close merge delete