Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First Example Code - Runs well but Failed IMG

I am a newbie for CV. Mostly I wanted to try FAQ,

but it might be not an easy matter happening, just specific for me.

The code below should be too famous and you will be reading briefly.

I have attached the result IMG output.


For the first time, I was successful with Webcam runner,

but with the secondary IMG View Example, the ouput is just in grey,

which is just can't be figured out.


There seems not to be any problems in the code.

Have any idea?



 #include < opencv\cv.h > 

 #include < opencv\highgui.h >


using namespace cv;


int main(int argc, char** argv){


IplImage* img = cvLoadImage(argv[1]);


cvNamedWindow ("Example1", 0);

cvResizeWindow ("Example1", 1024, 768);


cvShowImage("Example1", img);

cvWaitKey(0);


cvReleaseImage(&img);

cvDestroyWindow("Example1");

}

First Example Code - Runs well but Failed IMG

image description

I am a newbie for CV. Mostly I wanted to try FAQ,

but it might be not an easy matter happening, just specific for me.

The code below should be too famous and you will be reading briefly.

I have attached the result IMG output.


For the first time, I was successful with Webcam runner,

but with the secondary IMG View Example, the ouput is just in grey,

which is just can't be figured out.


There seems not to be any problems in the code.

Have any idea?



 #include < opencv\cv.h > 

 #include < opencv\highgui.h >


using namespace cv;


int main(int argc, char** char* argv){


IplImage*


IplImage img = cvLoadImage(argv[1]);


cvNamedWindow ("Example1", 0);

cvResizeWindow ("Example1", 1024, 768);


cvShowImage("Example1", img);

cvWaitKey(0);


cvReleaseImage(&img);

cvDestroyWindow("Example1");

}

First Example Code - Runs well but Failed IMG

C:\fakepath\2.JPGimage description

I am a newbie for CV. Mostly I wanted to try FAQ,

but it might be not an easy matter happening, just specific for me.

The code below should be too famous and you will be reading briefly.

I have attached the result IMG output.


For the first time, I was successful with Webcam runner,

but with the secondary IMG View Example, the ouput is just in grey,

which is just can't be figured out.


There seems not to be any problems in the code.

Have any idea?



 #include < opencv\cv.h > 

 #include < opencv\highgui.h >


using namespace cv;


int main(int argc, char* argv){


IplImage img = cvLoadImage(argv[1]);


cvNamedWindow ("Example1", 0);

cvResizeWindow ("Example1", 1024, 768);


cvShowImage("Example1", img);

cvWaitKey(0);


cvReleaseImage(&img);

cvDestroyWindow("Example1");

}