Guest User

Untitled

a guest
Jan 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. int n_frame = 0;
  2. Mat previous;
  3. auto start = chrono::high_resolution_clock::now();
  4. while (m_cap.isOpened()) {
  5. if (n_frame % 100 == 1) {
  6. auto end = chrono::high_resolution_clock::now();
  7. auto time = chrono::duration_cast<chrono::seconds>(end - start);
  8. cout << "the fps is: " << 1.0 / (static_cast<double>(time.count()) / n_frame) << endl;
  9. //cin.ignore(1000, 'n');
  10. }
  11. n_frame++;
  12. cout << "frame number: " << n_frame << endl;
  13. Mat frame, original;
  14.  
  15. m_cap >> frame;
  16. if (frame.empty())
  17. break;
  18.  
  19.  
  20. //do some video processing down here eg thresholding
  21. }
Add Comment
Please, Sign In to add comment