diff --git a/modules/features2d/src/agast.cpp b/modules/features2d/src/agast.cpp index b8db008c46..44f08384c2 100644 --- a/modules/features2d/src/agast.cpp +++ b/modules/features2d/src/agast.cpp @@ -7961,6 +7961,7 @@ public: cvtColor( _image, ogray, COLOR_BGR2GRAY ); gray = ogray; } + keypoints.clear(); AGAST( gray, keypoints, threshold, nonmaxSuppression, type ); KeyPointsFilter::runByPixelsMask( keypoints, mask ); }