Guest User

Untitled

a guest
May 19th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1.  
  2. #include "stdafx.h"
  3.  
  4.  
  5.  
  6. #include <opencv2\opencv.hpp>;
  7. #include <opencv2\imgcodecs.hpp>;
  8.  
  9. using namespace cv;
  10.  
  11.  
  12.  
  13. int _tmain(int argc, _TCHAR* argv[])
  14. {
  15. Mat img;
  16.  
  17. VideoCapture cam(0);
  18.  
  19. namedWindow("camera");
  20. while (1)
  21. {
  22. cam >> img;
  23. imshow("camera", img);
  24.  
  25. if (waitKey(1) == 27)
  26. break;
  27. }
  28.  
  29. return 0;
  30. }
Add Comment
Please, Sign In to add comment