Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To get an fps you should divide the so called tick-frequency (how many ticks processor makes at a second) on the task tick-count (how many ticks processor has spended to mske a particualr task).

In C++ API it will be:

 unsigned long tickmark = cv::getTickCount(); // update current tick count 
   while(true) {
      // DO SOME PROCESSING HERE
      fps = cv::getTickFrequency()/(cv::getTickCount() - tickmark); // fps in Hz (1/s)
      tickmark = cv::getTickFrequency(); 
    }