diff options
Diffstat (limited to 'tracker-points/module')
-rw-r--r-- | tracker-points/module/point_extractor.cpp | 3 | ||||
-rw-r--r-- | tracker-points/module/point_extractor.h | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tracker-points/module/point_extractor.cpp b/tracker-points/module/point_extractor.cpp index 1a75a3e3..d1975317 100644 --- a/tracker-points/module/point_extractor.cpp +++ b/tracker-points/module/point_extractor.cpp @@ -239,7 +239,7 @@ static void draw_blobs(cv::Mat& preview_frame, const blob* blobs, unsigned nblob } } -void PointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_frame_, std::vector<vec2>& points) +void PointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_frame_, std::vector<vec2>& points, std::vector<vec2>& imagePoints) { const cv::Mat& frame = frame_.as_const<Frame>()->mat; @@ -375,6 +375,7 @@ end: vec2 p; std::tie(p[0], p[1]) = to_screen_pos(b.pos[0], b.pos[1], W, H); points.push_back(p); + imagePoints.push_back(vec2(b.pos[0], b.pos[1])); } } diff --git a/tracker-points/module/point_extractor.h b/tracker-points/module/point_extractor.h index a6103667..2af5c131 100644 --- a/tracker-points/module/point_extractor.h +++ b/tracker-points/module/point_extractor.h @@ -33,16 +33,19 @@ class PointExtractor final : public pt_point_extractor public: // extracts points from frame and draws some processing info into frame, if draw_output is set // dt: time since last call in seconds - void extract_points(const pt_frame& frame, pt_preview& preview_frame, std::vector<vec2>& points) override; + void extract_points(const pt_frame& frame, pt_preview& preview_frame, std::vector<vec2>& points, std::vector<vec2>& imagePoints) override; PointExtractor(const QString& module_name); + +public: + std::vector<blob> blobs; + private: static constexpr int max_blobs = 16; pt_settings s; cv::Mat1b frame_gray_unmasked, frame_bin, frame_gray; - cv::Mat1f hist; - std::vector<blob> blobs; + cv::Mat1f hist; cv::Mat1b ch[3]; void ensure_channel_buffers(const cv::Mat& orig_frame); |