MATLAB File Help: cv.BOWKMeansTrainer Index
cv.BOWKMeansTrainer

kmeans-based class to train visual vocabulary using the bag of visual words approach

kmeans-based class for training the bag of visual words vocabulary from a set of descriptors.

Example

% create bag of visual words
trainer = cv.BOWKMeansTrainer(K);
dictionary = trainer.cluster(train_descs);

% Compute histogram of visual word occurrences of an image
extractor = cv.BOWImgDescriptorExtractor('SIFT','BruteForce');
extractor.setVocabulary(dictionary);
descs = extractor.compute(im, keypoints);

References

"Visual Categorization with Bags of Keypoints" by Gabriella Csurka, Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004.

See also
Class Details
Superclasses handle
Sealed false
Construct on load false
Constructor Summary
BOWKMeansTrainer The constructor 
Property Summary
id Object ID 
Method Summary
  add Adds descriptors to a training set 
  addlistener Add listener for event. 
  clear Clear training descriptors 
  cluster Clusters train descriptors 
  delete Destructor 
  descriptorsCount Returns the count of all descriptors stored in the training set 
  eq == (EQ) Test handle equality. 
  findobj Find objects matching specified conditions. 
  findprop Find property of MATLAB handle object. 
  ge >= (GE) Greater than or equal relation for handles. 
  getDescriptors Returns a training set of descriptors 
  gt > (GT) Greater than relation for handles. 
Sealed   isvalid Test handle validity. 
  le <= (LE) Less than or equal relation for handles. 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event.