When I compile my Windows application in Visual C ++ 2005, including OpenCV 1.1, a computer vision library, I do not. Get any compilation or link errors, but when I'm playing it, it becomes a point and freeze, and Windows says the following:
"In crosslines at 0x7c915223. Write your: 0xC0000005: access violation space 0x00030ffc. "
This program is a Windows application with two lines of normal C ++ OpenCV code:
IplImage * img = cvCreateImage (cvSize (1024, 768), IPL_DPTP_8U, 1); CvReleaseImage (& amp; img);
Strange behavior is now, if I include OpenCV lines, the program throws an exception - OpenCV draws out lines, the program works properly.
OpenCV library, in particular, I created a C ++ project for GUI and a C ++ project compiled in the background as DLL in any other project without any problem I used. If I create such a solution for the above lines, then I have no problem during execution.
Is there any one idea, what could be the reason for this error?
Thanks for any help, Stephen
Thanks for this comment.
Meanwhile, I use a minimum project for testing.
I still do not understand the problem completely, but in the meantime, I have come to know that when I am involved with the Third Party Library (UEEE).
If I use OpenCV and a function from the UEE Library in the project, then the exception is one. If I use the same function from OpenCV or from UIE, then no exception is thrown. Therefore, these seem to be inconsistent for libraries, or there is another problem, however, I do not know how to find out.
Not at this point. The work in the minimum example is unrelated. Initiates a function camera and another function is to integrate an image structure.
But this error may be anywhere ...
I created C + + Windows Forms Application in Visual Studio. I added the form to the same function in the form1.h file along with a button:
Private: System :: Zero Form 1_Click (System :: Object Sender, System :: EventArgs ^ e) { open the camera(); IplImage * img = cvCreateImageHeader (cvSize (1024, 768), IPL_DEPT_8U, 1); CvReleaseImage (& amp; img); CloseCamera (); }
And I added headers to the beginning of Form1.h:
# "camera control HK" #include "cv.h" / code> < / Pre> Then, I had to close the precompiled header option and I had to clean it with / clr: to integrate the pure / / clr option successfully and link to the project.
But, then I run the program, the above exception is thrown ...
I am thinking, if I misuse the C ++ Windows Forms application and I Your pure C ++ code should not be included, or if the problem with a OpenCV or UIE library is actually in fact.