| cv.BOWKMeansTrainer - MATLAB File Help | Go to online doc for 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.
% 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);
"Visual Categorization with Bags of Keypoints" by Gabriella Csurka, Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004.
| Superclasses | handle |
| Sealed | false |
| Construct on load | false |
| BOWKMeansTrainer | The constructor |
| id | Object ID |
| 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. |
| ObjectBeingDestroyed | Notifies listeners that a particular object has been destroyed. |