diff options
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 2 | ||||
-rw-r--r-- | tracker-pt/module/frame.cpp | 2 | ||||
-rw-r--r-- | tracker-pt/module/frame.hpp | 2 | ||||
-rw-r--r-- | tracker-pt/pt-api.hpp | 6 | ||||
-rw-r--r-- | tracker-wii/wii_frame.cpp | 7 | ||||
-rw-r--r-- | tracker-wii/wii_frame.hpp | 2 |
6 files changed, 10 insertions, 11 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 570d76c4..64fd6fd5 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -72,7 +72,7 @@ void Tracker_PT::run() const bool preview_visible = check_is_visible(); if (preview_visible) - *preview_frame = *frame; + preview_frame->set_last_frame(*frame); point_extractor->extract_points(*frame, *preview_frame, preview_visible, points); point_count.store(points.size(), std::memory_order_relaxed); diff --git a/tracker-pt/module/frame.cpp b/tracker-pt/module/frame.cpp index b8f2b7cb..798706b8 100644 --- a/tracker-pt/module/frame.cpp +++ b/tracker-pt/module/frame.cpp @@ -6,7 +6,7 @@ namespace pt_module { -Preview& Preview::operator=(const pt_frame& frame_) +void Preview::set_last_frame(const pt_frame& frame_) { const cv::Mat& frame2 = frame_.as_const<const Frame>()->mat; const cv::Mat* frame; diff --git a/tracker-pt/module/frame.hpp b/tracker-pt/module/frame.hpp index ae0a0cbc..1e7c82b6 100644 --- a/tracker-pt/module/frame.hpp +++ b/tracker-pt/module/frame.hpp @@ -24,7 +24,7 @@ struct Preview final : pt_preview { Preview(int w, int h); - Preview& operator=(const pt_frame& frame) override; + void set_last_frame(const pt_frame& frame) override; QImage get_bitmap() override; void draw_head_center(f x, f y) override; diff --git a/tracker-pt/pt-api.hpp b/tracker-pt/pt-api.hpp index b87e7d65..75e880d4 100644 --- a/tracker-pt/pt-api.hpp +++ b/tracker-pt/pt-api.hpp @@ -69,7 +69,11 @@ protected: struct pt_preview : pt_frame { - virtual pt_preview& operator=(const pt_frame&) = 0; + pt_preview() = default; + + OTR_DISABLE_MOVE_COPY(pt_preview); + + virtual void set_last_frame(const pt_frame&) = 0; virtual QImage get_bitmap() = 0; virtual void draw_head_center(f x, f y) = 0; }; diff --git a/tracker-wii/wii_frame.cpp b/tracker-wii/wii_frame.cpp index 8f18f4b8..fcde5235 100644 --- a/tracker-wii/wii_frame.cpp +++ b/tracker-wii/wii_frame.cpp @@ -17,7 +17,7 @@ using namespace pt_module; -WIIPreview& WIIPreview::operator=(const pt_frame& frame_) +void WIIPreview::set_last_frame(const pt_frame& frame_) { const struct wii_info& wii = frame_.as_const<WIIFrame>()->wii; const cv::Mat& frame = frame_.as_const<const WIIFrame>()->mat; @@ -25,18 +25,13 @@ WIIPreview& WIIPreview::operator=(const pt_frame& frame_) status = wii.status; if (frame.channels() != 3) - { eval_once(qDebug() << "tracker/pt: camera frame depth: 3 !=" << frame.channels()); - return *this; - } const bool need_resize = frame.cols != frame_out.cols || frame.rows != frame_out.rows; if (need_resize) cv::resize(frame, frame_copy, cv::Size(frame_out.cols, frame_out.rows), 0, 0, cv::INTER_NEAREST); else frame.copyTo(frame_copy); - - return *this; } WIIPreview::WIIPreview(int w, int h) diff --git a/tracker-wii/wii_frame.hpp b/tracker-wii/wii_frame.hpp index 5d6dd199..a7688b80 100644 --- a/tracker-wii/wii_frame.hpp +++ b/tracker-wii/wii_frame.hpp @@ -47,7 +47,7 @@ struct WIIPreview final : pt_preview { WIIPreview(int w, int h); - WIIPreview& operator=(const pt_frame& frame) override; + void set_last_frame(const pt_frame& frame) override; QImage get_bitmap() override; void draw_head_center(f x, f y) override; |