![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
opencv on mbed
BOWTrainer Class Reference
[Object Categorization]
Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors. More...
#include <features2d.hpp>
Inherited by BOWKMeansTrainer.
Public Member Functions | |
CV_WRAP void | add (const Mat &descriptors) |
Adds descriptors to a training set. | |
CV_WRAP const std::vector< Mat > & | getDescriptors () const |
Returns a training set of descriptors. | |
CV_WRAP int | descriptorsCount () const |
Returns the count of all descriptors stored in the training set. | |
virtual CV_WRAP Mat | cluster () const =0 |
virtual CV_WRAP Mat | cluster (const Mat &descriptors) const =0 |
Clusters train descriptors. |
Detailed Description
Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors.
For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka, Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :
Definition at line 1173 of file features2d.hpp.
Member Function Documentation
CV_WRAP void add | ( | const Mat & | descriptors ) |
Adds descriptors to a training set.
- Parameters:
-
descriptors Descriptors to add to a training set. Each row of the descriptors matrix is a descriptor.
The training set is clustered using clustermethod to construct the vocabulary.
virtual CV_WRAP Mat cluster | ( | ) | const [pure virtual] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in BOWKMeansTrainer.
Clusters train descriptors.
- Parameters:
-
descriptors Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered.
Implemented in BOWKMeansTrainer.
CV_WRAP int descriptorsCount | ( | ) | const |
Returns the count of all descriptors stored in the training set.
CV_WRAP const std::vector<Mat>& getDescriptors | ( | ) | const |
Returns a training set of descriptors.
Generated on Tue Jul 12 2022 16:42:44 by
![doxygen](doxygen.png)