public class BOWTrainer extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
nativeObj |
Modifier | Constructor and Description |
---|---|
protected |
BOWTrainer(long addr) |
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.
|
protected void |
finalize() |
List<Mat> |
getDescriptors()
Returns a training set of descriptors.
|
long |
getNativeObjAddr() |
public long getNativeObjAddr()
public static BOWTrainer __fromPtr__(long addr)
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 Mat cluster()
public int descriptorsCount()
public List<Mat> getDescriptors()
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()
Generated on Wed Oct 9 2019 23:24:43 UTC / OpenCV 4.1.2