summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/point_tracker.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-18 09:32:46 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-18 09:32:46 +0200
commitc89a1d04630cf7e334fa36b01c9240f0bc0b82c6 (patch)
tree062baf4ef7756ea3fd862908d0b0a3b1fed5ddf7 /ftnoir_tracker_pt/point_tracker.h
parentde79ef90a6a16854709ecf7bfe8b713c4b5d382a (diff)
pt: use previous pose on NaN result from POSIT
This will reset dynamic pose resolution if the error persists.
Diffstat (limited to 'ftnoir_tracker_pt/point_tracker.h')
-rw-r--r--ftnoir_tracker_pt/point_tracker.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h
index cdcf2998..fd002948 100644
--- a/ftnoir_tracker_pt/point_tracker.h
+++ b/ftnoir_tracker_pt/point_tracker.h
@@ -118,6 +118,10 @@ public:
void track(const std::vector<cv::Vec2f>& projected_points, const PointModel& model, float f, bool dynamic_pose, int init_phase_timeout);
Affine pose() const { return X_CM; }
cv::Vec2f project(const cv::Vec3f& v_M, float f);
+ void reset(const Affine& pose)
+ {
+ X_CM = pose;
+ }
private:
// the points in model order
struct PointOrder