summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-pt/camera.cpp')
-rw-r--r--tracker-pt/camera.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp
index bbc37cb1..20acf27a 100644
--- a/tracker-pt/camera.cpp
+++ b/tracker-pt/camera.cpp
@@ -6,13 +6,17 @@
*/
#include "camera.h"
+#include "frame.hpp"
+
#include "compat/sleep.hpp"
#include "compat/camera-names.hpp"
#include "compat/math-imports.hpp"
+#include <opencv2/imgproc.hpp>
+
#include "cv/video-property-page.hpp"
-constexpr double Camera::dt_eps;
+using namespace pt_module;
Camera::Camera(const QString& module_name) : dt_mean(0), fov(0), s(module_name) {}
@@ -45,8 +49,10 @@ Camera::result Camera::get_info() const
return result(true, cam_info);
}
-Camera::result Camera::get_frame(cv::Mat& frame)
+Camera::result Camera::get_frame(pt_frame& frame_)
{
+ cv::Mat& frame = frame_.as<Frame>()->mat;
+
const bool new_frame = _get_frame(frame);
if (new_frame)
@@ -160,3 +166,4 @@ void Camera::camera_deleter::operator()(cv::VideoCapture* cap)
delete cap;
}
}
+