Face Recognition Library for OpenCV.
C++ Python JavaScript
Pull request Compare This branch is 1 commit ahead, 82 commits behind bytefish:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



libfacerec is a library for face recognition in OpenCV. There are no additional dependencies to build the library. The Eigenfaces, Fisherfaces method and Local Binary Patterns Histograms (LBPH) are implemented and most parts of the library are covered by unit tests.

Issues and Feature Requests

This project is now open for bug reports and feature requests.


The documentation of the library comes with an extensive API description and carefully designed tutorials. It is available in the doc/build folder coming with this project. If you want to compile the documentation yourself, then switch to the folder doc and run make <target>. For the html version you would make html and for the PDF version make latexpdf. You'll need Sphinx for this.

Building the library with Microsoft Visual Studio 2008/2010

If you have problems with building libfacerec with Microsoft Visual Studio 2008/2010, then please read my blog post at:


  • Eigenfaces (Turk, M., and Pentland, A. "Eigenfaces for recognition.". Journal of Cognitive Neuroscience 3 (1991), 71–86.)
  • Fisherfaces (Belhumeur, P. N., Hespanha, J., and Kriegman, D. "Eigenfaces vs. Fisherfaces: Recognition using class specific linear projection.". IEEE Transactions on Pattern Analysis and Machine Intelligence 19, 7 (1997), 711–720.)
  • Local Binary Patterns Histograms (Ahonen, T., Hadid, A., and Pietikainen, M. "Face Recognition with Local Binary Patterns.". Computer Vision - ECCV 2004 (2004), 469–481.)