Class BOWTrainer
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.
Implements
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public abstract class BOWTrainer : DisposableCvObject, ICvPtrHolder
Methods
| Improve this Doc View SourceAdd(Mat)
Adds descriptors to a training set.
Declaration
public void Add(Mat descriptors)
Parameters
Type | Name | Description |
---|---|---|
Mat | descriptors | 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. |
Clear()
Declaration
public virtual void Clear()
Cluster()
Clusters train descriptors.
Declaration
public abstract Mat Cluster()
Returns
Type | Description |
---|---|
Mat |
Cluster(Mat)
Clusters train descriptors.
Declaration
public abstract Mat Cluster(Mat descriptors)
Parameters
Type | Name | Description |
---|---|---|
Mat | 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. |
Returns
Type | Description |
---|---|
Mat |
DescriptorsCount()
Returns the count of all descriptors stored in the training set.
Declaration
public int DescriptorsCount()
Returns
Type | Description |
---|---|
System.Int32 |
GetDescriptors()
Returns a training set of descriptors.
Declaration
public Mat[] GetDescriptors()
Returns
Type | Description |
---|---|
Mat[] |