fixed condition in KeyPointsFilter::retainBest
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Mon, 1 Apr 2013 07:53:43 +0000 (11:53 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Mon, 1 Apr 2013 07:53:43 +0000 (11:53 +0400)
modules/features2d/src/keypoint.cpp

index 9b85fd3..b19cfbf 100644 (file)
@@ -192,7 +192,7 @@ struct KeypointResponseGreater
 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.
-    if( n_points > 0 && keypoints.size() > (size_t)n_points )
+    if( n_points >= 0 && keypoints.size() > (size_t)n_points )
     {
         if (n_points==0)
         {