From 3d095ccc825b305d08e77284c2d4eae6e3dc202a Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 1 Apr 2013 11:53:43 +0400 Subject: [PATCH] fixed condition in KeyPointsFilter::retainBest --- modules/features2d/src/keypoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/features2d/src/keypoint.cpp b/modules/features2d/src/keypoint.cpp index 9b85fd39c0..b19cfbfd37 100644 --- a/modules/features2d/src/keypoint.cpp +++ b/modules/features2d/src/keypoint.cpp @@ -192,7 +192,7 @@ struct KeypointResponseGreater void KeyPointsFilter::retainBest(vector& 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) {