EstervQrCode 1.1.1
Library for qr code manipulation
Public Member Functions | Protected Attributes | List of all members
cv::BOWKMeansTrainer Class Reference

kmeans -based class to train visual vocabulary using the bag of visual words approach. : More...

#include <features2d.hpp>

Inheritance diagram for cv::BOWKMeansTrainer:
cv::BOWTrainer

Public Member Functions

CV_WRAP BOWKMeansTrainer (int clusterCount, const TermCriteria &termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS)
 The constructor. More...
 
virtual ~BOWKMeansTrainer ()
 
virtual CV_WRAP Mat cluster () const CV_OVERRIDE
 
virtual CV_WRAP Mat cluster (const Mat &descriptors) const CV_OVERRIDE
 Clusters train descriptors. More...
 
- Public Member Functions inherited from cv::BOWTrainer
 BOWTrainer ()
 
virtual ~BOWTrainer ()
 
CV_WRAP void add (const Mat &descriptors)
 Adds descriptors to a training set. More...
 
CV_WRAP const std::vector< Mat > & getDescriptors () const
 Returns a training set of descriptors. More...
 
CV_WRAP int descriptorsCount () const
 Returns the count of all descriptors stored in the training set. More...
 
virtual CV_WRAP void clear ()
 

Protected Attributes

int clusterCount
 
TermCriteria termcrit
 
int attempts
 
int flags
 
- Protected Attributes inherited from cv::BOWTrainer
std::vector< Matdescriptors
 
int size
 

Detailed Description

kmeans -based class to train visual vocabulary using the bag of visual words approach. :

Constructor & Destructor Documentation

◆ BOWKMeansTrainer()

CV_WRAP cv::BOWKMeansTrainer::BOWKMeansTrainer ( int  clusterCount,
const TermCriteria termcrit = TermCriteria(),
int  attempts = 3,
int  flags = KMEANS_PP_CENTERS 
)

The constructor.

See also
cv::kmeans

◆ ~BOWKMeansTrainer()

virtual cv::BOWKMeansTrainer::~BOWKMeansTrainer ( )
virtual

Member Function Documentation

◆ cluster() [1/2]

virtual CV_WRAP 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 CV_WRAP Mat cv::BOWKMeansTrainer::cluster ( const Mat descriptors) const
virtual

Clusters train descriptors.

Parameters
descriptorsDescriptors 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.

Member Data Documentation

◆ attempts

int cv::BOWKMeansTrainer::attempts
protected

◆ clusterCount

int cv::BOWKMeansTrainer::clusterCount
protected

◆ flags

int cv::BOWKMeansTrainer::flags
protected

◆ termcrit

TermCriteria cv::BOWKMeansTrainer::termcrit
protected

The documentation for this class was generated from the following file: