diff --git a/modules/features2d/doc/object_categorization.rst b/modules/features2d/doc/object_categorization.rst index 9ec1bf8454..f387866c5b 100644 --- a/modules/features2d/doc/object_categorization.rst +++ b/modules/features2d/doc/object_categorization.rst @@ -130,10 +130,10 @@ The class declaration is the following: :: void setVocabulary( const Mat& vocabulary ); const Mat& getVocabulary() const; void compute( InputArray image, vector& keypoints, - InputOutputArray imgDescriptor, + OutputArray imgDescriptor, vector >* pointIdxsOfClusters=0, Mat* descriptors=0 ); - void compute( InputArray descriptors, InputOutputArray imgDescriptor, + void compute( InputArray descriptors, OutputArray imgDescriptor, std::vector >* pointIdxsOfClusters=0 ); int descriptorSize() const; int descriptorType() const; @@ -180,8 +180,8 @@ BOWImgDescriptorExtractor::compute -------------------------------------- Computes an image descriptor using the set visual vocabulary. -.. ocv:function:: void BOWImgDescriptorExtractor::compute( InputArray image, vector& keypoints, InputOutputArray imgDescriptor, vector >* pointIdxsOfClusters=0, Mat* descriptors=0 ) -.. ocv:function:: void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, InputOutputArray imgDescriptor, std::vector >* pointIdxsOfClusters=0 ) +.. ocv:function:: void BOWImgDescriptorExtractor::compute( InputArray image, vector& keypoints, OutputArray imgDescriptor, vector >* pointIdxsOfClusters=0, Mat* descriptors=0 ) +.. ocv:function:: void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, OutputArray imgDescriptor, std::vector >* pointIdxsOfClusters=0 ) :param image: Image, for which the descriptor is computed. diff --git a/modules/features2d/include/opencv2/features2d.hpp b/modules/features2d/include/opencv2/features2d.hpp index eb380ceb46..98e6e04bea 100644 --- a/modules/features2d/include/opencv2/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d.hpp @@ -1518,9 +1518,9 @@ public: void setVocabulary( const Mat& vocabulary ); const Mat& getVocabulary() const; - void compute( InputArray image, std::vector& keypoints, InputOutputArray imgDescriptor, + void compute( InputArray image, std::vector& keypoints, OutputArray imgDescriptor, std::vector >* pointIdxsOfClusters=0, Mat* descriptors=0 ); - void compute( InputArray keypointDescriptors, InputOutputArray imgDescriptor, + void compute( InputArray keypointDescriptors, OutputArray imgDescriptor, std::vector >* pointIdxsOfClusters=0 ); // compute() is not constant because DescriptorMatcher::match is not constant diff --git a/modules/features2d/src/bagofwords.cpp b/modules/features2d/src/bagofwords.cpp index c7cc5decf2..1bb345e284 100644 --- a/modules/features2d/src/bagofwords.cpp +++ b/modules/features2d/src/bagofwords.cpp @@ -140,7 +140,7 @@ const Mat& BOWImgDescriptorExtractor::getVocabulary() const return vocabulary; } -void BOWImgDescriptorExtractor::compute( InputArray image, std::vector& keypoints, InputOutputArray imgDescriptor, +void BOWImgDescriptorExtractor::compute( InputArray image, std::vector& keypoints, OutputArray imgDescriptor, std::vector >* pointIdxsOfClusters, Mat* descriptors ) { imgDescriptor.release(); @@ -170,7 +170,7 @@ int BOWImgDescriptorExtractor::descriptorType() const return CV_32FC1; } -void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, InputOutputArray _imgDescriptor, std::vector >* pointIdxsOfClusters ) +void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, OutputArray _imgDescriptor, std::vector >* pointIdxsOfClusters ) { CV_Assert( vocabulary.empty() != false ); diff --git a/modules/features2d/src/descriptors.cpp b/modules/features2d/src/descriptors.cpp index 964c38e94b..c453190624 100644 --- a/modules/features2d/src/descriptors.cpp +++ b/modules/features2d/src/descriptors.cpp @@ -109,7 +109,7 @@ Ptr DescriptorExtractor::create(const String& descriptorExt } -CV_WRAP void Feature2D::compute( InputArray image, CV_OUT CV_IN_OUT std::vector& keypoints, CV_OUT OutputArray descriptors ) const +CV_WRAP void Feature2D::compute( InputArray image, CV_OUT CV_IN_OUT std::vector& keypoints, OutputArray descriptors ) const { DescriptorExtractor::compute(image, keypoints, descriptors); }