title: qtimer and opencv running slow
body: <p>I'm writing a code that uses QTimer to trigger calls to opencv videoCapture to read video frames. I usually read large chunks of videos so, wondering is there any other way to accelerate the process.</p>
  
  <p>here a snapshot of my code that uses QTimer :</p>
  
  <pre><code>timer = new  QTimer();
  timer-&gt;setTimerType(Qt::PreciseTimer);
  connect(timer, SIGNAL(timeout()), this, SLOT(read_shape_params()));
  
  //in a loop stop timer and setup the next video stream then start
  
  void next(){
  
    timer-&gt;stop();
  
     stream = new video_stream_reader();
     stream-&gt;setColorGray(grayImage);
     stream-&gt;set_begin_end(begin_at,end_at);
     stream-&gt;open(video_base_path+video_path);
  
     timer-&gt;start(0);
  }
  
  void shape_param_finder::read_shape_params(){
     Mat frame;
     frame = stream-&gt;read_frame();
  }
  
  Mat video_stream_reader::read_frame(){
     Mat frame;
     bool bSuccess = capture-&gt;read(frame);
     return frame;
  
  }
  </code></pre>