summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_extractor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-09 18:31:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-09 18:31:23 +0100
commitaa6b0e3841991272668ea02b1a7166c03e59e84a (patch)
tree952c93b028d94ecf17a18ab7f0ff5e07812f7cbb /tracker-pt/point_extractor.cpp
parentb6d5f1708e7a5f27d2ac46a817ac5a45c1f692c3 (diff)
tracker/pt: use the right delta for iteration stop
Diffstat (limited to 'tracker-pt/point_extractor.cpp')
-rw-r--r--tracker-pt/point_extractor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index 2cabf3a6..272e73c0 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -233,14 +233,16 @@ end:
for (int iter = 0; iter < 10; ++iter)
{
cv::Vec2d com_new = MeanShiftIteration(frame_roi, pos, kernel_radius);
- cv::Vec2d delta = com_new - b.pos;
+ cv::Vec2d delta = com_new - pos;
pos = com_new;
- if (delta.dot(delta) < 1.0e-2) break;
+ if (delta.dot(delta) < 1e-3)
+ break;
}
b.pos[0] = pos[0] + rect.x;
b.pos[1] = pos[1] + rect.y;
}
+
// End of mean shift code. At this point, blob positions are updated which hopefully less noisy less biased values.
points.reserve(max_blobs);
points.clear();