summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/camera.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp
index 1c393c12..e5901da1 100644
--- a/tracker-pt/camera.cpp
+++ b/tracker-pt/camera.cpp
@@ -67,12 +67,12 @@ bool Camera::get_frame(float dt, cv::Mat* frame)
{
bool new_frame = _get_frame(frame);
// measure fps of valid frames
- constexpr float dt_smoothing_const = 0.95;
+ constexpr float dt_smoothing_const = 0.95f;
dt_valid += dt;
if (new_frame)
{
dt_mean = dt_smoothing_const * dt_mean + (1 - dt_smoothing_const) * dt_valid;
- cam_info.fps = dt_mean > 1e-3f ? 1 / dt_mean : 0;
+ cam_info.fps = int(std::round(dt_mean > 1e-3f ? 1 / dt_mean : 0));
dt_valid = 0;
}
else