Ask Your Question
0

Classification methods used in OpenCV

asked 2013-03-05 23:25:32 -0500

Jimmy gravatar image

Hi there, I’m experiencing the Open CV face classification algorithms, one of the available methods for classification is createLBPHRecognizer(); But the background implementation of this method has not been mentioned in the document, Although the process of training and feature extraction has been mentioned in Open CV documents but the classification method has not been mentioned, by classification method I mean SVM or Adaboost and etc. is there any document or reference about the classification methods that have been used in Facerecognize classes? My second question is that is it possible to change the classification method used for one of the recongnizer classes as parameter? For example is it possible to use Naive Bayes classifier in LBPH recognizer? If yes, then how it is possible, I would be so much grateful if someone could send me some references and documents about those issues.

edit retag flag offensive close merge delete

Comments

OpenCV is open source, you could just look at/modify the source code!

awknaust gravatar imageawknaust ( 2013-03-05 23:36:20 -0500 )edit

1 answer

Sort by » oldest newest most voted
5

answered 2013-03-06 02:48:30 -0500

updated 2013-03-06 03:10:36 -0500

The documentation notes, that the implementation is based on the paper:

  • Ahonen, T., Hadid, A., and Pietikainen, M. "Face Recognition with Local Binary Patterns". Computer Vision - ECCV 2004 (2004), 469–481.

In this paper a 1-Nearest Neighbor classifier with a Chi-Square Distance is used and so does the implementation. You can easily implement a different classifier, by for example wrapping the LBPHFaceRecognizer to get the histograms out. If you want to implement it and not rely on the given classes, you'll find the implementation in:

Do I think using a SVM is going to give you much better recognition rates? I don't think so and none of my experiments showed significantly improved recognition rates by simply employing a SVM. I have used all the kernel functions libsvm has, did the normalization for the RBF Kernel of course and optimized the parameters with a Grid Search. I didn't employ something like a Chi-Square Kernel, which might work better for histograms.

I wrote a Python framework once, where you could easily combine feature extraction methods with different classifiers (yeah, yeah basically I rewrote everything scikit-learn already has). It also has a Python implementation of Local Binary Pattern Histograms:

This has always been a fast way for me to validate the performance of feature extraction and classifier combinations. If I would do it now, I would use scikit-learn for almost all of the stuff. And this is what I recommend, simply because with Python it is much faster to prototype. Once you are confident the algorithm works as expected, then I would go ahead and implement it with OpenCV.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-03-05 23:25:32 -0500

Seen: 944 times

Last updated: Mar 06 '13