diff --git a/modules/features2d/src/bagofwords.cpp b/modules/features2d/src/bagofwords.cpp index 11f8c4ba37..8416ebd93f 100644 --- a/modules/features2d/src/bagofwords.cpp +++ b/modules/features2d/src/bagofwords.cpp @@ -153,10 +153,10 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector dextractor->compute( image, keypoints, descriptors ); compute( descriptors, imgDescriptor, pointIdxsOfClusters ); - + // Add the descriptors of image keypoints if (_descriptors) { - *_descriptors = descriptors.clone(); + *_descriptors = descriptors.clone(); } }