diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-26 07:10:49 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-26 07:10:49 +0100 |
commit | 20f83ad3149237087d2d0a81a27e6d511a5e7973 (patch) | |
tree | 3aaf2bc964a026292451efaa553744165d3e1c93 /ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | |
parent | a815d8dfe1b452e0cab9b588a9d4ec4650a5bdda (diff) | |
parent | 8f7e5c0441237a9c8c187f24a424f6c77c5e397e (diff) |
Merge branch 'unstable' into trackhat
* unstable:
main: use camera-based centering by default
settings: clarify center method usage
accela: fix typo
win32: try win_key with modifier first
shortcuts: remove obsolete code on win32
shortcuts: allow for numpad on win32
qfc: drop nan check
pt: drop nan check
shortcuts: allow for numlock on win32
accela: remove too many nan checks
timer: guard against overflow on win32
accela: remove "done" logic
timer: sprinkle some const
shortcuts: allow for binding same key to multiple functions
qfc: guard against unlikely division by zero
cmake: update toolchain file
Diffstat (limited to 'ftnoir_tracker_pt/ftnoir_tracker_pt.cpp')
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 9a5f11c4..956f639e 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -79,11 +79,6 @@ bool Tracker_PT::get_focal_length(float& ret) return false; } -static inline bool nanp(double value) -{ - return std::isnan(value) || std::isinf(value); -} - void Tracker_PT::run() { #ifdef PT_PERF_LOG @@ -122,8 +117,6 @@ void Tracker_PT::run() if (!get_focal_length(fx)) continue; - Affine X_CM_ = pose(); - if (success) { point_tracker.track(points, PointModel(s), fx, s.dynamic_pose, s.init_phase_timeout); @@ -131,28 +124,7 @@ void Tracker_PT::run() Affine X_CM = pose(); - { - int j = 0; - - for (int i = 0; i < 3; i++) - { - if (nanp(X_CM.t(i))) - goto nannan; - for (; j < 3; j++) - if (nanp(X_CM.R(i, j))) - { -nannan: success = false; - X_CM = X_CM_; - { - QMutexLocker lock(&mutex); - point_tracker.reset(X_CM_); - } - goto nannannan; - } - } - } - -nannannan: ever_success |= success; + ever_success |= success; { Affine X_MH(cv::Matx33f::eye(), cv::Vec3f(s.t_MH_x, s.t_MH_y, s.t_MH_z)); // just copy pasted these lines from below |