mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
Merge pull request #18724 from S-o-T:fix_confusing_naming_for_keypoints_comparator
This commit is contained in:
commit
24d60da553
@ -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<KeyPoint>& keypoints, int n_points)
|
||||
//use std::partition to grab all of the keypoints with the boundary response.
|
||||
std::vector<KeyPoint>::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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user