Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: RZ_A2M_Mbed_samples
BOWKMeansTrainer Class Reference
[Object Categorization]
kmeans -based class to train visual vocabulary using the *bag of visual words* approach. More...
#include <features2d.hpp>
Inherits cv::BOWTrainer.
Public Member Functions | |
| CV_WRAP | BOWKMeansTrainer (int clusterCount, const TermCriteria &termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS) |
| The constructor. | |
| virtual CV_WRAP Mat | cluster () const |
| virtual CV_WRAP Mat | cluster (const Mat &descriptors) const |
| Clusters train descriptors. | |
| 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. | |
Detailed Description
kmeans -based class to train visual vocabulary using the *bag of visual words* approach.
:
Definition at line 1259 of file features2d.hpp.
Constructor & Destructor Documentation
| CV_WRAP BOWKMeansTrainer | ( | int | clusterCount, |
| const TermCriteria & | termcrit = TermCriteria(), |
||
| int | attempts = 3, |
||
| int | flags = KMEANS_PP_CENTERS |
||
| ) |
The constructor.
- See also:
- cv::kmeans
Member Function Documentation
| CV_WRAP void 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.
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 BOWTrainer.
| virtual CV_WRAP Mat 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 BOWTrainer.
| CV_WRAP int descriptorsCount | ( | ) | const [inherited] |
Returns the count of all descriptors stored in the training set.
| CV_WRAP const std::vector<Mat>& getDescriptors | ( | ) | const [inherited] |
Returns a training set of descriptors.
Generated on Tue Jul 12 2022 18:20:23 by
1.7.2