summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-01-09 02:18:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-01-09 02:18:09 +0100
commitcd7a0ea05cdc8fba78fde89a5c8365f9919b75bd (patch)
tree040ac0273d2315fe23e8d483cd22dbbafdd0d62f /tracker-pt
parent842adaf66dabdcfcea9953ec113eb29407211f66 (diff)
tracker/pt: remove unused blob struct members
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/point_extractor.cpp14
1 files changed, 2 insertions, 12 deletions
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<cv::Vec2f>& 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<cv::Vec2f>& 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<cv::Vec2f>& 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 };