summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp3
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.h2
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp3
3 files changed, 3 insertions, 5 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index f6017ee0..26550bad 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -80,9 +80,8 @@ void Tracker::run()
point_tracker.track(points, PointModel(s), get_focal_length());
{
- Affine CM;
- pose(&CM);
cv::Vec3f MH(s.t_MH_x, s.t_MH_y, s.t_MH_z);
+ Affine CM = pose();
cv::Vec3f p = CM.t - MH;
float fx = get_focal_length();
cv::Vec2f p_(p[0] / p[2] * fx, p[1] / p[2] * fx);
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
index 8e4d58ee..14be5c7f 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
@@ -42,7 +42,7 @@ public:
void start_tracker(QFrame* parent_window) override;
void data(double* data) override;
- void pose(Affine* X_CM) { QMutexLocker lock(&mutex); *X_CM = point_tracker.pose(); }
+ Affine pose() { QMutexLocker lock(&mutex); return point_tracker.pose(); }
int get_n_points() { QMutexLocker lock(&mutex); return point_extractor.get_points().size(); }
void get_cam_info(CamInfo* info) { QMutexLocker lock(&mutex); *info = camera.get_info(); }
public slots:
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
index 635e21c5..8c896203 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
@@ -136,8 +136,7 @@ void TrackerDialog::trans_calib_step()
{
if (tracker)
{
- Affine X_CM;
- tracker->pose(&X_CM);
+ Affine X_CM = tracker->pose();
trans_calib.update(X_CM.R, X_CM.t);
}
}