public class BOWTrainer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static BOWTrainer |
__fromPtr__(long addr) |
void |
add(Mat descriptors)
Adds descriptors to a training set.
|
void |
clear() |
Mat |
cluster() |
Mat |
cluster(Mat descriptors)
Clusters train descriptors.
|
int |
descriptorsCount()
Returns the count of all descriptors stored in the training set.
|
java.util.List<Mat> |
getDescriptors()
Returns a training set of descriptors.
|
long |
getNativeObjAddr() |
public static BOWTrainer __fromPtr__(long addr)
public void add(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.public void clear()
public Mat cluster()
public Mat cluster(Mat descriptors)
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.public int descriptorsCount()
public java.util.List<Mat> getDescriptors()
public long getNativeObjAddr()
Generated on 2019-12-20 14:24:32 / OpenCV 4.2.0