I've recently installed OpenCV2.0 under Visual Studio 2008 professional edition, built the libraries, dll-s and got everything working but when I run the first example program:
#include “highgui.h”
int main( int argc, char** argv ) {
IplImage* img = cvLoadImage( argv[1] );
cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE );
cvShowImage( “Example1”, img );
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( “Example1” );
}
It goes straight into Debug mode with the following exception : Unhandled exception at 0x7855b9f0 in HelloOpenCV.exe: 0xC0000005: Access violation reading location 0x00000000.
It also switches to a "loadsave.cpp" file and it points to the line:
return (IplImage*)cv::imread_(filename, iscolor, cv::LOAD_IMAGE );
At the stack point : > highgui200.dll!cvLoadImage(const char * filename=0x00000000, int iscolor=1) Line 474 + 0x13 bytes C++
I also made a printscreen with the visual studio debugging window link text
I presume it has something to do with misplaced dependencies , problems with the dll-s. If anyone has an idea of what I could do to fix this please answer and I will be forever grateful.
Thanks, Alex