I am writing an OpenCV application and the FPS is very important. How do I time the processing time of the main loop to get the current and Average FPS? This way, I can know how fast my application can operate. By the way, I'm using imread off an SSD so the processor is the bottleneck here!
相关问题
- How to get the background from multiple images by
- Try to load image with Highgui.imread (OpenCV + An
- CV2 Image Error: error: (-215:Assertion failed) !s
- Is it a bug of opencv RotatedRect?
- How do I apply a perspective transform with more t
相关文章
- opencv fails to build with ipp support enabled
- Code completion is not working for OpenCV and Pyth
- Face unlock code in Android open source project?
- How to compile a c++ application using static open
- Why cv2.rectangle sometimes return np.ndarray, whi
- Fastest way to compute image dataset channel wise
- TypeError: unsupported operand type(s) for +: '
- Error installing OpenCV on Ubuntu 16.04
you can do something like this. regarding fps, i find that instead of deriving from average duration, it's slightly better to actually count in 1 second segments and average. you can control the stability of the averaging(or the interval window) by changing the
_avgfps=0.7*_avgfps+0.3*_fps1sec;
. for example_avgfps=0.9*_avgfps+0.1*_fps1sec;
will make the convergence to actual slower but will be more resistant to temporary fluctuations. the ratios must sum to exactly 1.