summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-14 12:34:26 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-14 12:34:26 +0200
commit2d7e8f1467a37b66a87c949ad266dc9b41c9a1b1 (patch)
treea4ff5c39551e234516750e4fb23e72b799a42db9 /tracker-pt/camera.cpp
parentaec9206cec43feb5fa6dd54bee81c1dd185bf2e6 (diff)
tracker/pt: all callers are double, so float -> double
Diffstat (limited to 'tracker-pt/camera.cpp')
-rw-r--r--tracker-pt/camera.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp
index c15bb2be..94a9d314 100644
--- a/tracker-pt/camera.cpp
+++ b/tracker-pt/camera.cpp
@@ -63,16 +63,16 @@ bool Camera::get_info(CamInfo& ret)
return true;
}
-bool Camera::get_frame(float dt, cv::Mat* frame)
+bool Camera::get_frame(double dt, cv::Mat* frame)
{
bool new_frame = _get_frame(frame);
// measure fps of valid frames
- constexpr float dt_smoothing_const = 0.95f;
+ static constexpr double dt_smoothing_const = 0.95;
dt_valid += dt;
if (new_frame)
{
dt_mean = dt_smoothing_const * dt_mean + (1 - dt_smoothing_const) * dt_valid;
- cam_info.fps = int(std::round(dt_mean > 1e-3f ? 1 / dt_mean : 0));
+ cam_info.fps = int(std::round(dt_mean > 1e-3 ? 1 / dt_mean : 0));
dt_valid = 0;
}
else