summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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 };