diff options
author | Stéphane Lenclud <github@lenclud.com> | 2019-04-16 12:23:22 +0200 |
---|---|---|
committer | Stéphane Lenclud <github@lenclud.com> | 2019-04-24 18:46:12 +0200 |
commit | 1fb6122dce1a5bc117e925006d87828a52cfecb6 (patch) | |
tree | 0c6250bc59b93cdc92a4df75ab77d0e88690e8b2 /tracker-easy/tracker-easy.h | |
parent | 5e2f6182f41d7c027f58b110bc8c6e539a50ac2c (diff) |
Easy Tracker: Cheap way to dramatically improve CPU usage. Now displaying FPS info on frame preview.
Diffstat (limited to 'tracker-easy/tracker-easy.h')
-rw-r--r-- | tracker-easy/tracker-easy.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tracker-easy/tracker-easy.h b/tracker-easy/tracker-easy.h index 00e24811..257dd6ca 100644 --- a/tracker-easy/tracker-easy.h +++ b/tracker-easy/tracker-easy.h @@ -12,6 +12,8 @@ #include "cv/numeric.hpp" #include "video/video-widget.hpp" #include "video/camera.hpp" +#include "compat/timer.hpp" + #include "preview.h" #include "settings.h" #include "point-extractor.h" @@ -78,6 +80,14 @@ namespace EasyTracker std::atomic<bool> ever_success = false; mutable QMutex center_lock, data_lock; + // + Timer iTimer; + Timer iFpsTimer; + int iFrameCount = 0; + int iSkippedFrameCount = 0; + int iFps = 0; + int iSkippedFps = 0; + // Vertices defining the model we are tracking std::vector<cv::Point3f> iModel; // Bitmap points corresponding to model vertices |