diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-12-14 23:29:53 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-12-14 23:29:53 +0100 |
commit | 2294a2866cf6ee48b8f4557c0fd47ad2fe112a4a (patch) | |
tree | 28bcc5a015f7a702ef22221c70aec0f958d20125 /ftnoir_tracker_pt/ftnoir_tracker_pt.h | |
parent | 800f5872ba8d67284016e3b7b61b1c955fa9b1eb (diff) |
pt: use settings framework
Issue: #96
Model values are recomputed every frame. This shouldn't matter, as
there's very little to compute.
With this change, sliders and other options are applied immediately, and
the "Apply" button is gone.
Diffstat (limited to 'ftnoir_tracker_pt/ftnoir_tracker_pt.h')
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h index 3dd15618..8e4d58ee 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h @@ -33,20 +33,20 @@ //----------------------------------------------------------------------------- // Constantly processes the tracking chain in a separate thread -class Tracker : public ITracker, protected QThread +class Tracker : public QThread, public ITracker { + Q_OBJECT public: Tracker(); ~Tracker() override; void start_tracker(QFrame* parent_window) override; void data(double* data) override; - void apply(settings& s); - void apply_inner(); - void pose(Affine* X_CM) { QMutexLocker lock(&mutex); *X_CM = point_tracker.pose(); } int get_n_points() { QMutexLocker lock(&mutex); return point_extractor.get_points().size(); } void get_cam_info(CamInfo* info) { QMutexLocker lock(&mutex); *info = camera.get_info(); } +public slots: + void apply_settings(); protected: void run() override; private: @@ -66,19 +66,14 @@ private: PointExtractor point_extractor; PointTracker point_tracker; - cv::Vec3f t_MH; // translation from model frame to head frame - PTVideoWidget* video_widget; QFrame* video_frame; settings s; - std::atomic<settings*> new_settings; Timer time; static constexpr double rad2deg = 180.0/3.14159265; static constexpr double deg2rad = 3.14159265/180.0; - - PointModel model; }; #undef VideoWidget |