diff options
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 7 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.h | 1 | ||||
-rw-r--r-- | ftnoir_tracker_pt/point_tracker.cpp | 10 | ||||
-rw-r--r-- | ftnoir_tracker_pt/point_tracker.h | 2 |
4 files changed, 2 insertions, 18 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 6248b225..3afb7fa7 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -109,7 +109,6 @@ void Tracker::apply_inner() settings* tmp = new_settings.exchange(nullptr); if (tmp == nullptr) return; - reset(); auto& s = *tmp; qDebug()<<"Tracker:: Applying settings"; @@ -130,12 +129,6 @@ void Tracker::apply_inner() qDebug()<<"Tracker::apply ends"; } -void Tracker::reset() -{ - QMutexLocker lock(&mutex); - point_tracker.reset(); -} - void Tracker::start_tracker(QFrame *parent_window) { this->video_frame = parent_window; diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h index f7520c45..4161bd48 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h @@ -43,7 +43,6 @@ public: void apply(settings& s); void apply_inner(); - void reset(); // reset the trackers internal state variables void pose(FrameTrafo* X_CM) { QMutexLocker lock(&mutex); *X_CM = point_tracker.pose(); } int get_n_points() { QMutexLocker lock(&mutex); return point_extractor.get_points().size(); } diff --git a/ftnoir_tracker_pt/point_tracker.cpp b/ftnoir_tracker_pt/point_tracker.cpp index 4780136d..125064bf 100644 --- a/ftnoir_tracker_pt/point_tracker.cpp +++ b/ftnoir_tracker_pt/point_tracker.cpp @@ -95,12 +95,6 @@ PointTracker::PointTracker() X_CM.t[2] = 1000; // default position: 1 m away from cam; } -void PointTracker::reset() -{ - // enter init phase - X_CM = FrameTrafo(); -} - void PointTracker::track(const vector<Vec2f>& points, const PointModel& model) { const PointOrder& order = find_correspondences(points, model); @@ -134,8 +128,8 @@ int PointTracker::POSIT(const PointModel& model, const PointOrder& order_) // initial pose = last (predicted) pose Vec3f k; - get_row(R_expected, 2, k); - float Z0 = std::abs(X_CM.t[2]) < 1e-3 ? 1e3 : X_CM.t[2]; + get_row(R_expected, 2, k); + float Z0 = 1000.f; float old_epsilon_1 = 0; float old_epsilon_2 = 0; diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h index 9489659e..be9e83ad 100644 --- a/ftnoir_tracker_pt/point_tracker.h +++ b/ftnoir_tracker_pt/point_tracker.h @@ -88,8 +88,6 @@ public: // dt : time since last call void track(const std::vector<cv::Vec2f>& projected_points, const PointModel& model); FrameTrafo pose() const { return X_CM; } - void reset(); - private: // the points in model order typedef struct { cv::Vec2f points[PointModel::N_POINTS]; } PointOrder; |