Ask Your Question

How face recognition algorithms works

asked 2014-04-23 10:46:35 -0600

UncleSam gravatar image

updated 2014-04-23 10:47:20 -0600

Hi everybody!

Does somebody now where I can find an exaustive explanation of how the face recognition algorithms of opencv work? I'm developing a face recognizer and I would like to know which kind of features extractor and classifier the library use for all its methods. I've seen in the docs that the eigen method use a knn classifier, but for the fisher and lbp ones I didn't find anything.

Also does anybody know a good example for using a SVM as classifier in face recognition?

Thanks for the help!

edit retag flag offensive close merge delete


for classification, none of them use knn or svm currently. just a plain nearest-neighbour search with L2(fisher,eigen) or CHI-SQR(lbp) distance.

berak gravatar imageberak ( 2014-04-23 13:48:24 -0600 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-04-23 13:01:22 -0600

updated 2014-04-23 13:34:32 -0600

To understand eigenfaces, fisherfaces, lbp, svm for face recognition in detail, you should master eigenfaces first, then you can move to fisherfaces, lbp (with Chi Square distance and k-NN), and SVM. Here are some links that may help:


Enhanced LDA

LBP for Face recognition-

SVM example (Python)

edit flag offensive delete link more


I've already seen many articles and report about them, but they're a dimension reduction often use as a feature extractor (or even as classifier). My question may not be so clear, but what I'm asking for is the specific opencv implementation: the eigenfaces is the PCA reduction, but which classifier are they using? fisherface is an LDA reduction, but the classifier? same thing for HLBP. By the way I'll take a look anyway to your always help. (the first and the third link are broken)

UncleSam gravatar imageUncleSam ( 2014-04-23 13:14:41 -0600 )edit

Eigenfaces uses k-NN with k=1, Fisherfaces can be seen as an extension of Eigenfaces when each subject in training set have more than 1 sample(image), classifier is also k-NN but k depends on how many samples per person you have in the gallery. Eigenfaces and Fisherfaces are holistic approaches. LBP is a facial feature extraction and the classifier is k-NN with Chi Square distance. What I mean is that if you really master Eigenfaces, you will find Fisherfaces, lbp, svm easier to understand.

tuannhtn gravatar imagetuannhtn ( 2014-04-23 13:40:28 -0600 )edit

Thanks! now I understand! So it's always a KNN classifier, good to know. This mean that if I'd like to implement a PCA extractor with other classifier I need to write it down from the beginning I suppose...

UncleSam gravatar imageUncleSam ( 2014-04-23 16:25:49 -0600 )edit

Question Tools

1 follower


Asked: 2014-04-23 10:46:35 -0600

Seen: 12,426 times

Last updated: Apr 23 '14