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()
Python: |
---|
| cv.BOWKMeansTrainer( | clusterCount[, termcrit[, attempts[, flags]]] | ) -> | <BOWKMeansTrainer object> |
◆ ~BOWKMeansTrainer()
virtual cv::BOWKMeansTrainer::~BOWKMeansTrainer |
( |
| ) |
|
|
virtual |
◆ cluster() [1/2]
virtual Mat cv::BOWKMeansTrainer::cluster |
( |
| ) |
const |
|
virtual |
Python: |
---|
| cv.BOWKMeansTrainer.cluster( | | ) -> | retval |
| cv.BOWKMeansTrainer.cluster( | descriptors | ) -> | retval |
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 |
Python: |
---|
| cv.BOWKMeansTrainer.cluster( | | ) -> | retval |
| cv.BOWKMeansTrainer.cluster( | descriptors | ) -> | retval |
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.
◆ attempts
int cv::BOWKMeansTrainer::attempts |
|
protected |
◆ clusterCount
int cv::BOWKMeansTrainer::clusterCount |
|
protected |
◆ flags
int cv::BOWKMeansTrainer::flags |
|
protected |
◆ termcrit
The documentation for this class was generated from the following file: