cv.BOWKMeansTrainer - MATLAB File Help Go to online doc for cv.BOWKMeansTrainer
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.Vocabulary = 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. 
  listener Add listener for event without binding the listener to the source object. 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event. 
Event Summary
ObjectBeingDestroyed Notifies listeners that a particular object has been destroyed.