Guest User

Untitled

a guest
May 24th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <opencv2/core/core.hpp>
  2. #include <opencv2/highgui/highgui.hpp>
  3. #include <stdio.h>
  4. #include <cv.h>
  5. #include <highgui.h>
  6.  
  7. int main(int argc, char* argv[])
  8. {
  9.     int x;
  10.     cin>>x;
  11.  
  12.     const char* myImagePath = "C:\\Users\\ИМЯ_ПОЛЬЗОВАТЕЛЯ\\Pictures\\ИМЯ_ФАЙЛА.png";
  13.  
  14.     IplImage* img = cvLoadImage(myImagePath, CV_LOAD_IMAGE_UNCHANGED);
  15.     if (!img)
  16.     {
  17.         return -1;
  18.     }
  19.  
  20.     cvNamedWindow("display", CV_WINDOW_AUTOSIZE);
  21.     cvShowImage("display", img );
  22.  
  23.     cvWaitKey(0);        
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment