diff --git a/modules/features2d/src/matchers.cpp b/modules/features2d/src/matchers.cpp index e363c710fa..27f52a4748 100755 --- a/modules/features2d/src/matchers.cpp +++ b/modules/features2d/src/matchers.cpp @@ -264,7 +264,7 @@ void DescriptorMatcher::checkMasks( const vector& masks, int queryDescripto void DescriptorMatcher::knnMatch( const Mat& queryDescriptors, vector >& matches, int knn, const vector& masks, bool compactResult ) { - matches.empty(); + matches.clear(); if( empty() || queryDescriptors.empty() ) return;