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();
}