new user here and fairly new to programming using OpenCV.
I am using Visual Studio 2012, and have installed all OpenCV modules as per instructions have no problem running code to capture video stream and filter/ etc.
I am trying to reproduce code for optical flow example produced by stanford U here: http://robots.stanford.edu/cs223b05/notes/CS%20223-B%20T1%20stavens_opencv_optical_flow.pdf
but seem to be getting an access violation error with cvQueryFrame, so I've written a simple function to test the issue:
int get_flow(){
CvCapture *input_video = cvCaptureFromFile("C:\\test.avi");
cvQueryFrame(input_video);
while(1){
if( cvWaitKey( 15 )==32 ) //wait until space key pressed
{
break;
}
}
return 0;
}
I've checked the the test.avi is in the correct location, but am getting the following error whenever any code (this or the example code) runs the cvQueryFrame command as follows:
First-chance exception at 0x75E6A048 (msvcrt.dll) in Win32Project3.exe: 0xC0000005: Access violation reading location 0x011908C0.
Unhandled exception at 0x75E6A048 (msvcrt.dll) in Win32Project3.exe: 0xC0000005: Access violation reading location 0x011908C0.
which from my understanding means that msvcrt.dll is issuing an error regarding accessing certain memory point, but I can't figure out what the problem is.
I have used cvGrabFrame by itself without an issue, but using cvGrabFrame and cvRetrieveFrame together or just cvRetrieveFrame by itself also throws a msvcrt.dll access error.
I am not too sure where to look for the error, or the problem all together. I could not find any particular solutions to dealing with this. any ideas? (PS - I am running VS2012 in debug mode and have all the opencv libraries working in x86 on a x64 machine, and chrome is open also)
thanks!