fork(1) download
  1. #include <iostream>
  2. #include "opencv2\opencv.hpp"
  3.  
  4. using namespace cv;
  5. using namespace std;
  6.  
  7. int main(void)
  8. {
  9. VideoCapture capture("aaa.avi");
  10. Mat frame;
  11.  
  12. if(! capture.isOpened())
  13. {
  14. cout << "Not Open" << endl;
  15. return 1;
  16. }
  17.  
  18. namedWindow("Original Camera");
  19. cout<<"<ESC> - quit the program"<<endl;
  20.  
  21. while(capture.grab())
  22. {
  23. capture >> frame;
  24. if( (waitKey(33) & 255) == 27 )
  25. {
  26. capture.release();
  27. break;
  28. }
  29. imshow("Original Camera",frame);
  30. // waitKey(0);
  31. }
  32.  
  33. return 0;
  34. }
  35.  
  36.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty