-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[keypoints] Prefer lambdas over bind. #3171
[keypoints] Prefer lambdas over bind. #3171
Conversation
@@ -242,8 +242,7 @@ pcl::HarrisKeypoint2D<PointInT, PointOutT, IntensityT>::detectKeypoints (PointCl | |||
} | |||
else | |||
{ | |||
std::sort (indices_->begin (), indices_->end (), | |||
boost::bind (&HarrisKeypoint2D::greaterIntensityAtIndices, this, _1, _2)); | |||
std::sort (indices_->begin (), indices_->end (), [this] (int p1, int p2) { return greaterIntensityAtIndices (p1, p2); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pcl/keypoints/include/pcl/keypoints/harris_2d.h
Lines 172 to 177 in 187c9a5
/// comparator for responses intensity | |
bool | |
greaterIntensityAtIndices (int a, int b) const | |
{ | |
return (response_->at (a).intensity > response_->at (b).intensity); | |
} |
@@ -207,8 +207,7 @@ pcl::TrajkovicKeypoint2D<PointInT, PointOutT, IntensityT>::detectKeypoints (Poin | |||
|
|||
// Non maximas suppression | |||
std::vector<int> indices = *indices_; | |||
std::sort (indices.begin (), indices.end (), | |||
boost::bind (&TrajkovicKeypoint2D::greaterCornernessAtIndices, this, _1, _2)); | |||
std::sort (indices.begin (), indices.end (), [this] (int p1, int p2) { return greaterCornernessAtIndices (p1, p2); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pcl/keypoints/include/pcl/keypoints/trajkovic_2d.h
Lines 147 to 152 in 187c9a5
/// comparator for responses intensity | |
inline bool | |
greaterCornernessAtIndices (int a, int b) const | |
{ | |
return (response_->points [a] > response_->points [b]); | |
} |
@@ -221,8 +221,7 @@ pcl::TrajkovicKeypoint3D<PointInT, PointOutT, NormalT>::detectKeypoints (PointCl | |||
} | |||
// Non maximas suppression | |||
std::vector<int> indices = *indices_; | |||
std::sort (indices.begin (), indices.end (), | |||
boost::bind (&TrajkovicKeypoint3D::greaterCornernessAtIndices, this, _1, _2)); | |||
std::sort (indices.begin (), indices.end (), [this] (int p1, int p2) { return greaterCornernessAtIndices (p1, p2); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pcl/keypoints/include/pcl/keypoints/trajkovic_3d.h
Lines 188 to 195 in 187c9a5
/** Comparator for responses intensity | |
* \return true if \a response_ at index \aa is greater than response at index \ab | |
*/ | |
inline bool | |
greaterCornernessAtIndices (int a, int b) const | |
{ | |
return (response_->points [a] > response_->points [b]); | |
} |
No description provided.