Ask Your Question

Revision history [back]

drawMatches function is only for display the association between two set of features points. If you want to use these features (SIFT/SURF/ORB/...) to recognize objects, you need a training phase. For example, the bag of words approach (BoW) is commonly used. You create a limited dictionary of word (usually an histograms of features). You use this vector (histogram) to train a classifier (SVM/...) For each new image, you compute the feature, create the histogram with respect to the dictionary, and use this vector as input for predicting the class (object learn). OpenCV can do almost everything for you in a first stage. See: * tutorial on features detection: http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html#table-of-content-feature2d * tutorial on machine learning (with SVM): http://docs.opencv.org/doc/tutorials/ml/table_of_content_ml/table_of_content_ml.html#table-of-content-ml * Bag Of Word in OpenCV: http://docs.opencv.org/modules/features2d/doc/object_categorization.html?highlight=bow#BOWTrainer * Bag Of Word principles: Visual Categorization with Bags of Keypoints by Gabriella Csurka, Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. (you should probably start with this reference as suggested in OpenCV doc. * Try, enjoy, optimize, and read the lot of research papers available on this topic... (try "bag of visual word" in google scolar)