kmeans -based class to train visual vocabulary using the bag of visual words approach.
More...
#include <opencv2/features2d.hpp>
kmeans -based class to train visual vocabulary using the bag of visual words approach.
:
◆ BOWKMeansTrainer()
◆ ~BOWKMeansTrainer()
virtual cv::BOWKMeansTrainer::~BOWKMeansTrainer |
( |
| ) |
|
|
virtual |
◆ add()
void cv::BOWTrainer::add |
( |
const Mat & |
descriptors | ) |
|
|
inherited |
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.
◆ clear()
virtual void cv::BOWTrainer::clear |
( |
| ) |
|
|
virtualinherited |
◆ cluster() [1/2]
virtual Mat cv::BOWKMeansTrainer::cluster |
( |
| ) |
const |
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements cv::BOWTrainer.
◆ cluster() [2/2]
virtual Mat cv::BOWKMeansTrainer::cluster |
( |
const Mat & |
descriptors | ) |
const |
|
virtual |
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.
Implements cv::BOWTrainer.
◆ descriptorsCount()
int cv::BOWTrainer::descriptorsCount |
( |
| ) |
const |
|
inherited |
Returns the count of all descriptors stored in the training set.
◆ getDescriptors()
const std::vector<Mat>& cv::BOWTrainer::getDescriptors |
( |
| ) |
const |
|
inherited |
Returns a training set of descriptors.
◆ attempts
int cv::BOWKMeansTrainer::attempts |
|
protected |
◆ clusterCount
int cv::BOWKMeansTrainer::clusterCount |
|
protected |
◆ descriptors
std::vector<Mat> cv::BOWTrainer::descriptors |
|
protectedinherited |
◆ flags
int cv::BOWKMeansTrainer::flags |
|
protected |
◆ size
◆ termcrit
The documentation for this class was generated from the following file: