summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-10 06:26:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-10 06:26:43 +0100
commit714a665e6f1c92a02d817b2f2f41254ce03280bc (patch)
tree8cad41511ede78c9455775a0a3a1cd95989aa134 /tracker-pt/ftnoir_tracker_pt.cpp
parenta26f0a51ccc21067dbacf6f9f5bcd8d4fe6dd15e (diff)
tracker/pt: make overlay look more of the same on 320x240 as 640x480
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index d0f65e7b..31d3cb14 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -139,8 +139,8 @@ void Tracker_PT::run()
using std::max;
static constexpr int frame_size = 400;
- const int size = max(1, iround(sqrt(frame.rows*frame.rows + frame.cols*frame.cols) / frame_size));
- const int len = size * 10;
+ const double size = max(1., 1.5*sqrt(frame.rows*frame.rows + frame.cols*frame.cols) / frame_size);
+ const int len = std::max(1, iround(size * 7.5));
cv::Point p2(int(round(p[0] * frame_.cols + frame_.cols/2)),
int(round(-p[1] * frame_.cols + frame_.rows/2)));
@@ -148,12 +148,12 @@ void Tracker_PT::run()
cv::Point(p2.x - len, p2.y),
cv::Point(p2.x + len, p2.y),
color,
- 2);
+ iround(size/2));
cv::line(frame_,
cv::Point(p2.x, p2.y - len),
cv::Point(p2.x, p2.y + len),
color,
- 2);
+ iround(size/2));
};
for (unsigned i = 0; i < points.size(); i++)