summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-03-25 15:38:18 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-03-25 15:38:18 +0100
commit105069bb20284abb3ded7a50ac317cea2c758fe9 (patch)
treec77d5aa1e61a701b65114e8231580cdaef35e9bc /ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
parentd53ef58b1f043a8f356a1ed1d8c713d202e92cae (diff)
pt: don't return zeros when last frame had no result
Diffstat (limited to 'ftnoir_tracker_pt/ftnoir_tracker_pt.cpp')
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index 8b5bb328..acf4daa0 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -23,7 +23,7 @@ Tracker::Tracker()
commands(0),
video_widget(NULL),
video_frame(NULL),
- success(false)
+ ever_success(false)
{
connect(s.b.get(), SIGNAL(saving()), this, SLOT(apply_settings()));
}
@@ -77,7 +77,9 @@ void Tracker::run()
std::vector<cv::Vec2f> points = point_extractor.extract_points(frame);
- success = points.size() == PointModel::N_POINTS;
+ bool success = points.size() == PointModel::N_POINTS;
+
+ ever_success |= success;
if (success)
point_tracker.track(points, PointModel(s), get_focal_length(), s.dynamic_pose);
@@ -162,7 +164,7 @@ void Tracker::StopTracker(bool exit)
void Tracker::data(THeadPoseData *data)
{
- if (success)
+ if (ever_success)
{
Affine X_CM = pose();