Commit 52bfa7b8 authored by StevenPuttemans's avatar StevenPuttemans

Fixed bug 1873 : return image keypoint descriptors + fix on line 152 pure declaration

parent 886c009d
......@@ -149,7 +149,7 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& key
int clusterCount = descriptorSize(); // = vocabulary.rows
// Compute descriptors for the image.
Mat descriptors = _descriptors ? *_descriptors : Mat();
Mat descriptors;
dextractor->compute( image, keypoints, descriptors );
// Match keypoint descriptors to cluster center (to vocabulary)
......@@ -178,6 +178,11 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& key
// Normalize image descriptor.
imgDescriptor /= descriptors.rows;
// Add the descriptors of image keypoints
if (_descriptors) {
*_descriptors = descriptors.clone();
}
}
int BOWImgDescriptorExtractor::descriptorSize() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment