Problem Description: Recently done the project, found that called the OpenCV Library of C + + program in VS2010 up the test run completely no problem, but once the debug file under the EXE file will show debug error, specific error as shown:
Although in the call to the OPENCV library has encountered this problem, but the basic parameters are error, pointer problem, but this time when debug debugging is completely no problem, but run EXE on the wrong,
has been baffled, in the back of the run another small program when suddenly jumped out of a bug, I suddenly found, incredibly because of the path of the problem.
My project program needs to load a model file, but my path started with a relative path, which is placed directly under the engineering directory.
When I was debugging, I saw that the file was loaded, so I didn't consider the problem of file loading.
After the elimination of one by one note to find incredibly because the path is not set to absolute path, resulting in the OPENCV function in the reading file can not find the file, read in the model is empty.
Then I used the empty model to predict, so I reported the debug error errors.
Then it's no problem to change the file path to an absolute path.
Therefore, write the program later or as much as possible with the absolute path, or really wrong when even the problem is nowhere to be found.
Here's a summary of the common reasons for this error: OPENCV
1. Pointer problem, pointer out of bounds, memory leak and so on.
2. Parameter problems, many times the OPENCV function call is inaccurate, the parameters and functions do not match.
3. The path problem, if there is read the file and so on the focus of attention.