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");
}
sorry for the downvote, please don't take that all too personal, but you should not use the outdated c-api in 2014 anymore
I am referring to "Learning OpenCV: Computer Vision in C++ with the OpenCV Library" - O'Reily. And I am a starter. Any other options? I will be appreciated with any advice from you. Thank you.
yea, still, a nice book, but you should prefer the code from opencv/samples/cpp
please have a look here as well.