fixed condition in KeyPointsFilter::retainBest

pull/726/head
Vladislav Vinogradov 12 years ago
parent d27d091e59
commit 3d095ccc82
  1. 2
      modules/features2d/src/keypoint.cpp

@ -192,7 +192,7 @@ struct KeypointResponseGreater
void KeyPointsFilter::retainBest(vector<KeyPoint>& keypoints, int n_points) void KeyPointsFilter::retainBest(vector<KeyPoint>& keypoints, int n_points)
{ {
//this is only necessary if the keypoints size is greater than the number of desired points. //this is only necessary if the keypoints size is greater than the number of desired points.
if( n_points > 0 && keypoints.size() > (size_t)n_points ) if( n_points >= 0 && keypoints.size() > (size_t)n_points )
{ {
if (n_points==0) if (n_points==0)
{ {

Loading…
Cancel
Save