diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-28 10:38:42 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-28 10:40:14 +0200 |
commit | dacec3441a491c132443b9c8bb066ca514cb3335 (patch) | |
tree | ae1e430bb8fd04b65b7db106b0530364232f9434 | |
parent | ca6db48feea3e5ebc401102ceb7235a7675fd800 (diff) |
tracker/pt: merge 2 variables used exactly the same way
-rw-r--r-- | tracker-pt/point_extractor.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp index f4034b28..5e72c3be 100644 --- a/tracker-pt/point_extractor.cpp +++ b/tracker-pt/point_extractor.cpp @@ -112,7 +112,6 @@ void PointExtractor::extract_points(cv::Mat& frame, std::vector<PointExtractor:: int m10 = 0; int m01 = 0; int cnt = 0; - int vals = 0; for (int i=rect.y; i < (rect.y+rect.height); i++) { @@ -126,7 +125,6 @@ void PointExtractor::extract_points(cv::Mat& frame, std::vector<PointExtractor:: m00 += val; m01 += i * val; m10 += j * val; - vals += val; cnt++; } } @@ -136,7 +134,7 @@ void PointExtractor::extract_points(cv::Mat& frame, std::vector<PointExtractor:: if (radius > region_size_max || radius < region_size_min) continue; const double norm = double(m00); - blob b(radius, cv::Vec2d(m10 / norm, m01 / norm), vals/sqrt(double(cnt))); + blob b(radius, cv::Vec2d(m10 / norm, m01 / norm), m00/sqrt(double(cnt))); blobs.push_back(b); { char buf[64]; |