summaryrefslogtreecommitdiffhomepage
path: root/tracker-easy/point-extractor.cpp
diff options
context:
space:
mode:
authorStéphane Lenclud <github@lenclud.com>2019-04-15 12:22:05 +0200
committerStéphane Lenclud <github@lenclud.com>2019-04-24 18:46:12 +0200
commit6ca96478ea4d8e6ba71ebf41a1f7d904f2c3df5d (patch)
tree85810bc2463bb5786817830cab89cd19c9241325 /tracker-easy/point-extractor.cpp
parent9830011866f0817d08c3e3f0bd26e98e54c523e7 (diff)
Easy Tracker: Removing point extractor interface. Using cv::Point instead of vec2.
Diffstat (limited to 'tracker-easy/point-extractor.cpp')
-rw-r--r--tracker-easy/point-extractor.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tracker-easy/point-extractor.cpp b/tracker-easy/point-extractor.cpp
index abaa0739..c1f525c9 100644
--- a/tracker-easy/point-extractor.cpp
+++ b/tracker-easy/point-extractor.cpp
@@ -31,7 +31,7 @@ namespace EasyTracker
}
- void PointExtractor::extract_points(const cv::Mat& aFrame, cv::Mat* aPreview, std::vector<vec2>& aPoints)
+ void PointExtractor::ExtractPoints(const cv::Mat& aFrame, cv::Mat* aPreview, std::vector<cv::Point>& aPoints)
{
//TODO: Assert if channel size is neither one nor two
// Make sure our frame channel is 8 bit
@@ -99,10 +99,10 @@ namespace EasyTracker
&& bBox.width <= s.max_point_size
&& bBox.height <= s.max_point_size)
{
- vec2 center;
- center[0] = bBox.x + bBox.width / 2;
- center[1] = bBox.y + bBox.height / 2;
- aPoints.push_back(vec2(center));
+ cv::Point center;
+ center.x = bBox.x + bBox.width / 2;
+ center.y = bBox.y + bBox.height / 2;
+ aPoints.push_back(center);
if (aPreview)
{
@@ -124,9 +124,9 @@ namespace EasyTracker
// Search for the point with highest Y coordinate
for (size_t i = 0; i < aPoints.size(); i++)
{
- if (aPoints[i][1] > maxY)
+ if (aPoints[i].y > maxY)
{
- maxY = aPoints[i][1];
+ maxY = aPoints[i].y;
index = i;
}
}