Table of Contents

Class BOWKMeansTrainer

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one.

public class BOWKMeansTrainer : BOWTrainer, IDisposable, ICvPtrHolder
Inheritance
BOWKMeansTrainer
Implements
Inherited Members

Constructors

BOWKMeansTrainer(int, TermCriteria?, int, KMeansFlags)

The constructor.

public BOWKMeansTrainer(int clusterCount, TermCriteria? termcrit = null, int attempts = 3, KMeansFlags flags = KMeansFlags.PpCenters)

Parameters

clusterCount int
termcrit TermCriteria?
attempts int
flags KMeansFlags

Methods

Cluster()

Clusters train descriptors.

public override Mat Cluster()

Returns

Mat

Cluster(Mat)

Clusters train descriptors.

public override Mat Cluster(Mat descriptors)

Parameters

descriptors Mat

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.

Returns

Mat

DisposeUnmanaged()

Releases unmanaged resources

protected override void DisposeUnmanaged()