diff options
-rw-r--r-- | tracker-pt/point_extractor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp index 6eb255a5..6118f3d2 100644 --- a/tracker-pt/point_extractor.cpp +++ b/tracker-pt/point_extractor.cpp @@ -74,9 +74,10 @@ std::vector<cv::Vec2f> PointExtractor::extract_points(cv::Mat& frame) int cnt = 0; constexpr int min_pixels = 250; const auto pixels_to_include = std::max<int>(0, min_pixels * s.threshold/100.); + auto ptr = reinterpret_cast<const float*>(hist.ptr(0)); for (int i = sz-1; i >= 0; i--) { - cnt += hist.at<float>(i); + cnt += ptr[i]; if (cnt >= pixels_to_include) { val = i; |