summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-06-30 11:46:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-06-30 11:48:46 +0200
commite59a5e62c38aad8ec66df1b05cc13d213e76e865 (patch)
tree5a30efdabad5d064789b4490f4bf8e581514b27f
parent800b9c7a2914c59b1b42192708f6c555eb180b43 (diff)
tracker/pt: reformat lightly
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp10
-rw-r--r--tracker-pt/point_extractor.cpp2
2 files changed, 7 insertions, 5 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index c49f7668..f4e60bba 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -15,9 +15,6 @@
#include <QCoreApplication>
#include <functional>
-//#define PT_PERF_LOG //log performance
-
-//-----------------------------------------------------------------------------
Tracker_PT::Tracker_PT() :
point_count(0),
commands(0),
@@ -75,7 +72,9 @@ void Tracker_PT::run()
if (new_frame)
{
- cv::resize(frame, preview_frame, cv::Size(preview_size.width(), preview_size.height()), 0, 0, cv::INTER_NEAREST);
+ cv::resize(frame, preview_frame,
+ cv::Size(preview_size.width(), preview_size.height()),
+ 0, 0, cv::INTER_NEAREST);
point_extractor.extract_points(frame, preview_frame, points);
point_count = points.size();
@@ -103,7 +102,8 @@ void Tracker_PT::run()
X_CM = point_tracker.pose();
}
- Affine X_MH(mat33::eye(), vec3(s.t_MH_x, s.t_MH_y, s.t_MH_z)); // just copy pasted these lines from below
+ // just copy pasted these lines from below
+ Affine X_MH(mat33::eye(), vec3(s.t_MH_x, s.t_MH_y, s.t_MH_z));
Affine X_GH = X_CM * X_MH;
vec3 p = X_GH.t; // head (center?) position in global space
vec2 p_((p[0] * fx) / p[2], (p[1] * fx) / p[2]); // projected to screen
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index a67a72df..a23d1cdf 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -226,7 +226,9 @@ void PointExtractor::extract_points(const cv::Mat& frame, cv::Mat& preview_frame
const f kernel_radius = b.radius * radius_c;
cv::Vec2d pos(b.pos[0] - rect.x, b.pos[1] - rect.y); // position relative to ROI.
+#if defined DEBUG_MEANSHIFT
cv::Vec2d pos_(pos);
+#endif
for (int iter = 0; iter < 10; ++iter)
{