summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-17 13:02:26 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-17 13:02:26 +0200
commitf0800fee0d40b7375d3c7e7b7a7a99314c5fb251 (patch)
tree9a0ffcf3899897af20057b445839bafaf9adc50f /ftnoir_tracker_pt
parentf2607137b744b66b84be799fe56db08595c38867 (diff)
pt: rename ill-chosen name
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r--ftnoir_tracker_pt/point_extractor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/ftnoir_tracker_pt/point_extractor.cpp b/ftnoir_tracker_pt/point_extractor.cpp
index 77f2473c..f9be259a 100644
--- a/ftnoir_tracker_pt/point_extractor.cpp
+++ b/ftnoir_tracker_pt/point_extractor.cpp
@@ -31,18 +31,18 @@ std::vector<cv::Vec2f> PointExtractor::extract_points(cv::Mat& frame)
const double region_size_min = s.min_point_size;
const double region_size_max = s.max_point_size;
- struct simple_blob
+ struct blob
{
double radius;
cv::Vec2d pos;
double confid;
bool taken;
double area;
- simple_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, double area) : radius(radius), pos(pos), confid(confid), taken(false), area(area)
{
//qDebug() << "radius" << radius << "pos" << pos[0] << pos[1] << "confid" << confid;
}
- bool inside(const simple_blob& other)
+ bool inside(const blob& other)
{
cv::Vec2d tmp = pos - other.pos;
return sqrt(tmp.dot(tmp)) < radius;
@@ -52,7 +52,7 @@ std::vector<cv::Vec2f> PointExtractor::extract_points(cv::Mat& frame)
// mask for everything that passes the threshold (or: the upper threshold of the hysteresis)
cv::Mat frame_bin = cv::Mat::zeros(H, W, CV_8U);
- std::vector<simple_blob> blobs;
+ std::vector<blob> blobs;
std::vector<std::vector<cv::Point>> contours;
const int thres = s.threshold;
@@ -148,13 +148,13 @@ 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(simple_blob(radius, pos, confid, area));
+ blobs.push_back(blob(radius, pos, confid, area));
}
// clear old points
points.clear();
- using b = const simple_blob;
+ using b = const blob;
std::sort(blobs.begin(), blobs.end(), [](b& b1, b& b2) {return b1.confid > b2.confid;});
for (auto& b : blobs)