fork download
  1. #include <stdio.h>
  2. #include <cv.h>
  3. #include <highgui.h>
  4. #define CV_LOAD_IMAGE_UNCHANGED -1
  5. void * WindowHandle1;
  6. char FileName[]="rain.jpg";
  7. IplImage *Image1;
  8.  
  9.  
  10. int main()
  11. {
  12. Image1 = cvLoadImage(FileName,CV_LOAD_IMAGE_GRAYSCALE);
  13.  
  14. cvNamedWindow("Show Image",0);
  15. cvMoveWindow("Show Image",0,0);
  16. cvResizeWindow("Show Image",300,400);
  17.  
  18. WindowHandle1=cvGetWindowHandle("Show Image");
  19. printf("The Window Handle is : %d\n",WindowHandle1);
  20. printf("The Window Name is : %s\n",cvGetWindowName(WindowHandle1));
  21. cvShowImage("Show Image",Image1);
  22.  
  23. cvWaitKey(0);
  24.  
  25. cvDestroyWindow("Show Image");
  26. cvReleaseImage(&Image1);
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:16: fatal error: cv.h: No such file or directory
compilation terminated.
stdout
Standard output is empty