Class BOWTrainer
- 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 abstract class BOWTrainer : DisposableCvObject, IDisposable, ICvPtrHolder
- Inheritance
-
BOWTrainer
- Implements
- Derived
- Inherited Members
Methods
Add(Mat)
Adds descriptors to a training set.
public void Add(Mat descriptors)
Parameters
descriptorsMatdescriptors 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.
Clear()
public virtual void Clear()
Cluster()
Clusters train descriptors.
public abstract Mat Cluster()
Returns
Cluster(Mat)
Clusters train descriptors.
public abstract Mat Cluster(Mat descriptors)
Parameters
descriptorsMatDescriptors 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
DescriptorsCount()
Returns the count of all descriptors stored in the training set.
public int DescriptorsCount()
Returns
GetDescriptors()
Returns a training set of descriptors.
public Mat[] GetDescriptors()
Returns
- Mat[]