summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/camera.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-12 19:40:22 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-12 19:40:22 +0100
commit537a88e522314753149e1ea7921489e58043b40c (patch)
treea62ac59a546c8b0ee8adeee3bd2aa255d7e4570e /tracker-pt/camera.h
parent11d8e48e4370c9201f8258b418aadc7a4290dba1 (diff)
tracker/pt: isolate point extractor and image type
Issue: #718
Diffstat (limited to 'tracker-pt/camera.h')
-rw-r--r--tracker-pt/camera.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/tracker-pt/camera.h b/tracker-pt/camera.h
index f5fd8f81..35e887ad 100644
--- a/tracker-pt/camera.h
+++ b/tracker-pt/camera.h
@@ -13,13 +13,17 @@
#include "compat/util.hpp"
#include "compat/timer.hpp"
+#include <functional>
+#include <memory>
+#include <tuple>
+
#include <opencv2/core.hpp>
#include <opencv2/videoio.hpp>
-#include <memory>
-#include <tuple>
#include <QString>
+namespace pt_module {
+
struct Camera final : pt_camera
{
Camera(const QString& module_name);
@@ -27,7 +31,7 @@ struct Camera final : pt_camera
pt_camera_open_status start(int idx, int fps, int res_x, int res_y) override;
void stop() override;
- result get_frame(cv::Mat& frame) override;
+ result get_frame(pt_frame& Frame) override;
result get_info() const override;
pt_camera_info get_desired() const override { return cam_desired; }
@@ -37,11 +41,10 @@ struct Camera final : pt_camera
operator bool() const override { return cap && cap->isOpened(); }
void set_fov(double value) override { fov = value; }
-
void show_camera_settings() override;
private:
- warn_result_unused bool _get_frame(cv::Mat& frame);
+ warn_result_unused bool _get_frame(cv::Mat& Frame);
double dt_mean, fov;
@@ -62,5 +65,7 @@ private:
pt_settings s;
- static constexpr double dt_eps = 1./384;
+ static constexpr inline double dt_eps = 1./384;
};
+
+} // ns pt_module