1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #1290 from mbarnach:bow_desc

This commit is contained in:
Andrey Pavlenko
2014-01-21 19:22:46 +04:00
committed by OpenCV Buildbot
3 changed files with 43 additions and 22 deletions
@@ -124,6 +124,7 @@ The class declaration is the following: ::
public:
BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor,
const Ptr<DescriptorMatcher>& dmatcher );
BOWImgDescriptorExtractor( const Ptr<DescriptorMatcher>& dmatcher );
virtual ~BOWImgDescriptorExtractor(){}
void setVocabulary( const Mat& vocabulary );
@@ -132,6 +133,8 @@ The class declaration is the following: ::
Mat& imgDescriptor,
vector<vector<int> >* pointIdxsOfClusters=0,
Mat* descriptors=0 );
void compute( const Mat& descriptors, Mat& imgDescriptor,
std::vector<std::vector<int> >* pointIdxsOfClusters=0 );
int descriptorSize() const;
int descriptorType() const;
@@ -147,6 +150,7 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
The constructor.
.. ocv:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor, const Ptr<DescriptorMatcher>& dmatcher )
.. ocv:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorMatcher>& dmatcher )
:param dextractor: Descriptor extractor that is used to compute descriptors for an input image and its keypoints.
@@ -177,11 +181,14 @@ BOWImgDescriptorExtractor::compute
Computes an image descriptor using the set visual vocabulary.
.. ocv:function:: void BOWImgDescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& imgDescriptor, vector<vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 )
.. ocv:function:: void BOWImgDescriptorExtractor::compute( const Mat& keypointDescriptors, Mat& imgDescriptor, std::vector<std::vector<int> >* pointIdxsOfClusters=0 )
:param image: Image, for which the descriptor is computed.
:param keypoints: Keypoints detected in the input image.
:param keypointDescriptors: Computed descriptors to match with vocabulary.
:param imgDescriptor: Computed output image descriptor.
:param pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that ``pointIdxsOfClusters[i]`` are keypoint indices that belong to the ``i`` -th cluster (word of vocabulary) returned if it is non-zero.