1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2020-11-05 18:59:10 +00:00
6 changed files with 309 additions and 116 deletions
+3 -3
View File
@@ -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());
}