Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts: modules/core/include/opencv2/core/types_c.h modules/gpu/src/cuda/imgproc.cu modules/gpu/src/cuda/safe_call.hpp modules/gpu/src/error.cpp modules/gpu/src/imgproc.cpp modules/imgproc/src/distransform.cpp modules/imgproc/src/shapedescr.cpp modules/python/src2/cv2.cpp modules/python/src2/cv2.cv.hpp
This commit is contained in:
@@ -147,7 +147,7 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector<KeyPoint>
|
||||
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)
|
||||
@@ -176,6 +176,11 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector<KeyPoint>
|
||||
|
||||
// Normalize image descriptor.
|
||||
imgDescriptor /= descriptors.rows;
|
||||
|
||||
// Add the descriptors of image keypoints
|
||||
if (_descriptors) {
|
||||
*_descriptors = descriptors.clone();
|
||||
}
|
||||
}
|
||||
|
||||
int BOWImgDescriptorExtractor::descriptorSize() const
|
||||
|
Reference in New Issue
Block a user