From ccdf021f5d1a8daed729369cc078c5756a3a5bee Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 24 Dec 2015 19:24:59 +0100 Subject: tracker/pt: limit max amount of extracted blobs --- tracker-pt/point_extractor.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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& 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; -- cgit v1.2.3