visitor11 0 Newbie Poster

i m using dev c++ for opencv i got problems in displaying image
here is the code

#include "cv.h"
#include “highgui.h”
int main( int argc, char** argv ) {

IplImage* img = cvLoadImage( "M.jpg");
cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE );
cvShowImage( “Example1”, img );
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( “Example1” );
}

and the errors are

2:10 C:\Dev-Cpp\main.cpp #include expects "FILENAME" or <FILENAME>
C:\Dev-Cpp\main.cpp In function `int main(int, char**)':
5 C:\Dev-Cpp\main.cpp `cvLoadImage' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
6 C:\Dev-Cpp\main.cpp stray '\147' in program
6 C:\Dev-Cpp\main.cpp stray '\148' in program
6 C:\Dev-Cpp\main.cpp `Example1' undeclared (first use this function)
6 C:\Dev-Cpp\main.cpp `CV_WINDOW_AUTOSIZE' undeclared (first use this function)
6 C:\Dev-Cpp\main.cpp `cvNamedWindow' undeclared (first use this function)
7 C:\Dev-Cpp\main.cpp `cvShowImage' undeclared (first use this function)
8 C:\Dev-Cpp\main.cpp `cvWaitKey' undeclared (first use this function)
10 C:\Dev-Cpp\main.cpp `cvDestroyWindow' undeclared (first use this function)
C:\Dev-Cpp\Makefile.win [Build Error] [main.o] Error 1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.