Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #include <cv.h>
  2. #include <highgui.h>
  3. #include <iostream>
  4.  
  5. #include <vector>
  6.  
  7. using namespace std;
  8. using namespace cv;
  9. int main()
  10. {
  11. VideoCapture capture("/home/P1030.MOV");
  12.  
  13. int totalFrameNumber = capture.get(CV_CAP_PROP_FRAME_COUNT);
  14.  
  15. vector<Mat> frame;
  16. namedWindow("Display", WINDOW_AUTOSIZE);
  17.  
  18. for(int i=0; i < totalFrameNumber; i++)
  19. {
  20. frame.push_back(Mat());
  21. imshow("Display", frame);
  22. }
  23. return 0;
  24. }
  25.  
  26. int main()
  27. {
  28. VideoCapture capture("/home/P1030.MOV");
  29.  
  30. int totalFrameNumber = capture.get(CV_CAP_PROP_FRAME_COUNT);
  31.  
  32. Mat currentFrame;
  33. vector<Mat> frames;
  34. namedWindow("Display", WINDOW_AUTOSIZE);
  35.  
  36. for(int i=0; i < totalFrameNumber; i++)
  37. {
  38. capture>>currentFrame;
  39. frames.push_back(currentFrame.clone());
  40. imshow("Display", currentFrame);
  41. waitKey(10);
  42. }
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement