From cd7a0ea05cdc8fba78fde89a5c8365f9919b75bd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 9 Jan 2016 02:18:09 +0100 Subject: tracker/pt: remove unused blob struct members --- tracker-pt/point_extractor.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tracker-pt') diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp index 0208b11d..0be600f5 100644 --- a/tracker-pt/point_extractor.cpp +++ b/tracker-pt/point_extractor.cpp @@ -39,17 +39,10 @@ const std::vector& PointExtractor::extract_points(cv::Mat& frame) double radius; cv::Vec2d pos; double confid; - bool taken; - double area; - blob(double radius, const cv::Vec2d& pos, double confid, double area) : radius(radius), pos(pos), confid(confid), taken(false), area(area) + blob(double radius, const cv::Vec2d& pos, double confid) : radius(radius), pos(pos), confid(confid) { //qDebug() << "radius" << radius << "pos" << pos[0] << pos[1] << "confid" << confid; } - bool inside(const blob& other) - { - cv::Vec2d tmp = pos - other.pos; - return sqrt(tmp.dot(tmp)) < radius; - } }; // mask for everything that passes the threshold (or: the upper threshold of the hysteresis) @@ -103,9 +96,6 @@ const std::vector& PointExtractor::extract_points(cv::Mat& frame) break; const auto m = cv::moments(cv::Mat(c)); - const double area = m.m00; - if (area == 0.) - continue; const cv::Vec2d pos(m.m10 / m.m00, m.m01 / m.m00); double radius; @@ -147,7 +137,7 @@ const std::vector& PointExtractor::extract_points(cv::Mat& frame) cv::putText(frame, buf, cv::Point(pos[0]+30, pos[1]+20), cv::FONT_HERSHEY_DUPLEX, 1, cv::Scalar(0, 0, 255), 1); } - blobs.push_back(blob(radius, pos, confid, area)); + blobs.push_back(blob(radius, pos, confid)); enum { max_blobs = 16 }; -- cgit v1.2.3