Package org.opencv.features2d
Class BOWKMeansTrainer
- java.lang.Object
- 
- org.opencv.features2d.BOWTrainer
- 
- org.opencv.features2d.BOWKMeansTrainer
 
 
- 
 public class BOWKMeansTrainer extends BOWTrainer kmeans -based class to train visual vocabulary using the *bag of visual words* approach. :
- 
- 
Field Summary- 
Fields inherited from class org.opencv.features2d.BOWTrainernativeObj
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description BOWKMeansTrainer(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.protectedBOWKMeansTrainer(long addr)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BOWKMeansTrainer__fromPtr__(long addr)Matcluster()Matcluster(Mat descriptors)Clusters train descriptors.protected voidfinalize()- 
Methods inherited from class org.opencv.features2d.BOWTraineradd, clear, descriptorsCount, getDescriptors, getNativeObjAddr
 
- 
 
- 
- 
- 
Constructor Detail- 
BOWKMeansTrainerprotected BOWKMeansTrainer(long addr) 
 - 
BOWKMeansTrainerpublic BOWKMeansTrainer(int clusterCount, TermCriteria termcrit, int attempts, int flags)The constructor. SEE: cv::kmeans- Parameters:
- clusterCount- automatically generated
- termcrit- automatically generated
- attempts- automatically generated
- flags- automatically generated
 
 - 
BOWKMeansTrainerpublic BOWKMeansTrainer(int clusterCount, TermCriteria termcrit, int attempts)The constructor. SEE: cv::kmeans- Parameters:
- clusterCount- automatically generated
- termcrit- automatically generated
- attempts- automatically generated
 
 - 
BOWKMeansTrainerpublic BOWKMeansTrainer(int clusterCount, TermCriteria termcrit)The constructor. SEE: cv::kmeans- Parameters:
- clusterCount- automatically generated
- termcrit- automatically generated
 
 - 
BOWKMeansTrainerpublic BOWKMeansTrainer(int clusterCount) The constructor. SEE: cv::kmeans- Parameters:
- clusterCount- automatically generated
 
 
- 
 - 
Method Detail- 
__fromPtr__public static BOWKMeansTrainer __fromPtr__(long addr) 
 - 
clusterpublic Mat cluster() - Overrides:
- clusterin class- BOWTrainer
 
 - 
clusterpublic Mat cluster(Mat descriptors) Description copied from class:BOWTrainerClusters train descriptors.- Overrides:
- clusterin class- BOWTrainer
- 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
 
 - 
finalizeprotected void finalize() throws java.lang.Throwable- Overrides:
- finalizein class- BOWTrainer
- Throws:
- java.lang.Throwable
 
 
- 
 
-