提交 039795b4 编写于 作者: M Mark Shachkov

Change naming of keypoints comparator

上级 716450ce
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
namespace cv namespace cv
{ {
struct KeypointResponseGreaterThanThreshold struct KeypointResponseGreaterThanOrEqualToThreshold
{ {
KeypointResponseGreaterThanThreshold(float _value) : KeypointResponseGreaterThanOrEqualToThreshold(float _value) :
value(_value) value(_value)
{ {
} }
...@@ -83,7 +83,7 @@ void KeyPointsFilter::retainBest(std::vector<KeyPoint>& keypoints, int n_points) ...@@ -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. //use std::partition to grab all of the keypoints with the boundary response.
std::vector<KeyPoint>::const_iterator new_end = std::vector<KeyPoint>::const_iterator new_end =
std::partition(keypoints.begin() + n_points, keypoints.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 //resize the keypoints, given this new end point. nth_element and partition reordered the points inplace
keypoints.resize(new_end - keypoints.begin()); keypoints.resize(new_end - keypoints.begin());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册