summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-12-24 19:24:59 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-12-24 19:24:59 +0100
commitccdf021f5d1a8daed729369cc078c5756a3a5bee (patch)
treeeaf4a24159c10193b6237e19e39655ad8c0305fe
parent057fe1752477bdaafd2c9ec15f88b750083aff38 (diff)
tracker/pt: limit max amount of extracted blobs
-rw-r--r--tracker-pt/point_extractor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index 655e1412..0208b11d 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -148,6 +148,11 @@ const std::vector<cv::Vec2f>& PointExtractor::extract_points(cv::Mat& frame)
}
blobs.push_back(blob(radius, pos, confid, area));
+
+ enum { max_blobs = 16 };
+
+ if (blobs.size() == max_blobs)
+ break;
}
using b = const blob;