Class cv::xfeatures2d::BOWKMeansTrainer#
kmeans -based class to train visual vocabulary using the bag of visual words approach. :
#include <opencv2/xfeatures2d.hpp>Collaboration diagram for cv::xfeatures2d::BOWKMeansTrainer:
Public Member Functions#
Public Member Functions inherited from cv::xfeatures2d::BOWTrainer
Return |
Name |
Description |
|---|---|---|
|
Adds descriptors to a training set. |
|
|
||
Clusters train descriptors. |
||
|
Returns the count of all descriptors stored in the training set. |
|
|
Returns a training set of descriptors. |
Additional Inherited Members#
Protected Attributes inherited from cv::xfeatures2d::BOWTrainer
Return |
Name |
Description |
|---|---|---|
|
||
|
Detailed Description#
kmeans -based class to train visual vocabulary using the bag of visual words approach. :
Constructor & Destructor Documentation#
BOWKMeansTrainer()#
cv::xfeatures2d::BOWKMeansTrainer::BOWKMeansTrainer(
int clusterCount,
const TermCriteria & termcrit = TermCriteria(),
int attempts = 3,
int flags = KMEANS_PP_CENTERS )
The constructor.
See also
~BOWKMeansTrainer()#
cv::xfeatures2d::BOWKMeansTrainer::~BOWKMeansTrainer()
Member Function Documentation#
cluster()#
Mat cv::xfeatures2d::BOWKMeansTrainer::cluster()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
cluster()#
Mat cv::xfeatures2d::BOWKMeansTrainer::cluster(const Mat & descriptors)
Clusters train descriptors.
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.
Parameters
descriptors— Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
Member Data Documentation#
attempts#
int cv::xfeatures2d::BOWKMeansTrainer::attempts
clusterCount#
int cv::xfeatures2d::BOWKMeansTrainer::clusterCount
flags#
int cv::xfeatures2d::BOWKMeansTrainer::flags
termcrit#
TermCriteria cv::xfeatures2d::BOWKMeansTrainer::termcrit
Source file#
The documentation for this class was generated from the following file:
opencv2/xfeatures2d.hpp