help me out on opencv

Discussion in 'C' started by visitor11, Aug 30, 2010.

  1. visitor11

    visitor11 New Member

    Joined:
    Aug 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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
    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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice