Wednesday, January 12, 2011

Eigenfaces based Face Recognition


So after more than a month, this is an implementation of Eigenfaces based face Recognition in Matlab. And the delay was mainly because of the GUI implementation for which I had to scrape code off a few forums. But all's well that ends well.

The first face recognition algorithm which was written in 1991 by Turk and Pentland was based on a very fundamental principle of Eigen Vectors. The process involved was a statistical approach called Principal Component Analysis. Basically, the eigen vectors of the covariance matrix of the images (the images are preprocessed and normalized beforehand) are called eigen faces. Eigenfaces based face recognition is an information based technique in which as the size of the database increases, the time for recognition increases (unlike some other techniques like neural networks). But overall it is quite popular due to the fact that its easy to implement, fast and requires less memory.



Any image recognition algorithm has to deal with 2 major problems -
  1. Data compression - Images generally contain a lot of redundant pixels that need to be removed in order to speed up recognition processes. Even a small 100x100 pixel thumbnail contains 10000 pixels. But the image pattern can be defined uniquely by just a fraction of that.
  2. Quality of compressed data - This is the accuracy with which a particular image can be mapped to its own compressed data in a relatively large database.
Eigenfaces are the vectors which are used to represent any face as a linear combination of some of them. Their advantages are - speed and memory used. But their biggest drawback is their accuracy for faces with varied lighting and orientation of face


In the source code, the threshold on the distance from face space has not been set since it will be different for different face databases that are used. The ORL face database has been linked at the bottom as a test model, but any database will work fine as long as the threshold is set right.



DOWNLOAD (source code)
DOWNLOAD (ORL face Database)

Many more biometric algos such as iris recognition,fingerprint recognition and speech recognition will be posted shortly with the next one being DCT and  Advanced Neural Network based Face Recognition. The algorithms implementation is done for most of them, but making the GUI and linking it properly is what takes time. So if anyone is interested they can mail me for the algorithms if they want.

No comments:

Post a Comment