From 039795b4051456ee4f84f4b2359bdbcf491fba3f Mon Sep 17 00:00:00 2001 From: Mark Shachkov Date: Tue, 3 Nov 2020 21:54:56 +0300 Subject: [PATCH] Change naming of keypoints comparator --- modules/features2d/src/keypoint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/features2d/src/keypoint.cpp b/modules/features2d/src/keypoint.cpp index 219634e5b4..bab1e22b45 100644 --- a/modules/features2d/src/keypoint.cpp +++ b/modules/features2d/src/keypoint.cpp @@ -44,9 +44,9 @@ namespace cv { -struct KeypointResponseGreaterThanThreshold +struct KeypointResponseGreaterThanOrEqualToThreshold { - KeypointResponseGreaterThanThreshold(float _value) : + KeypointResponseGreaterThanOrEqualToThreshold(float _value) : value(_value) { } @@ -83,7 +83,7 @@ void KeyPointsFilter::retainBest(std::vector& keypoints, int n_points) //use std::partition to grab all of the keypoints with the boundary response. std::vector::const_iterator new_end = std::partition(keypoints.begin() + n_points, keypoints.end(), - KeypointResponseGreaterThanThreshold(ambiguous_response)); + KeypointResponseGreaterThanOrEqualToThreshold(ambiguous_response)); //resize the keypoints, given this new end point. nth_element and partition reordered the points inplace keypoints.resize(new_end - keypoints.begin()); }