Package org.opencv.features2d
Class BOWKMeansTrainer
java.lang.Object
org.opencv.features2d.BOWTrainer
org.opencv.features2d.BOWKMeansTrainer
kmeans -based class to train visual vocabulary using the *bag of visual words* approach. :
-
Field Summary
Fields inherited from class org.opencv.features2d.BOWTrainer
nativeObj
-
Constructor Summary
ConstructorsModifierConstructorDescriptionBOWKMeansTrainer
(int clusterCount) The constructor.BOWKMeansTrainer
(int clusterCount, TermCriteria termcrit) The constructor.BOWKMeansTrainer
(int clusterCount, TermCriteria termcrit, int attempts) The constructor.BOWKMeansTrainer
(int clusterCount, TermCriteria termcrit, int attempts, int flags) The constructor.protected
BOWKMeansTrainer
(long addr) -
Method Summary
Modifier and TypeMethodDescriptionstatic BOWKMeansTrainer
__fromPtr__
(long addr) cluster()
Clusters train descriptors.protected void
finalize()
Methods inherited from class org.opencv.features2d.BOWTrainer
add, clear, descriptorsCount, getDescriptors, getNativeObjAddr
-
Constructor Details
-
BOWKMeansTrainer
protected BOWKMeansTrainer(long addr) -
BOWKMeansTrainer
The constructor. SEE: cv::kmeans- Parameters:
clusterCount
- automatically generatedtermcrit
- automatically generatedattempts
- automatically generatedflags
- automatically generated
-
BOWKMeansTrainer
The constructor. SEE: cv::kmeans- Parameters:
clusterCount
- automatically generatedtermcrit
- automatically generatedattempts
- automatically generated
-
BOWKMeansTrainer
The constructor. SEE: cv::kmeans- Parameters:
clusterCount
- automatically generatedtermcrit
- automatically generated
-
BOWKMeansTrainer
public BOWKMeansTrainer(int clusterCount) The constructor. SEE: cv::kmeans- Parameters:
clusterCount
- automatically generated
-
-
Method Details
-
__fromPtr__
-
cluster
- Overrides:
cluster
in classBOWTrainer
-
cluster
Description copied from class:BOWTrainer
Clusters train descriptors.- Overrides:
cluster
in classBOWTrainer
- Parameters:
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:
- automatically generated
-
finalize
- Overrides:
finalize
in classBOWTrainer
- Throws:
Throwable
-