summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp8
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.h2
2 files changed, 6 insertions, 4 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();
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
index 7fce812d..349cf2c8 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
@@ -72,7 +72,7 @@ private:
settings s;
Timer time;
- volatile bool success;
+ volatile bool ever_success;
static constexpr double rad2deg = 180.0/3.14159265;
static constexpr double deg2rad = 3.14159265/180.0;