In such cases it is good to run this in a debugger, and step through until the crashing line.
Then you know exactly which line is crashing.
Next, you have to examine all the parameters in the call that is crashing.
If you have a debug build of your OpenCV you can drill with the debugger in to it, if the crash is in the lib, and not your code.
Knowing exactly which line crashed helps a lot to solve the problem.
Bookmarks