j2d.face
Class EigenFaceComputation

java.lang.Object
  extended by j2d.face.EigenFaceComputation

public class EigenFaceComputation
extends java.lang.Object

Computes an "face space" used for face recognition. This idea/algorhitm was derieved from Matthew A. Turn and Alex P. Pentland paper, titled: "Face Recognition using Eigenfaces" (http://www.cs.ucsb.edu/~mturk/Papers/mturk-CVPR91.pdf">http://www.cs.ucsb.edu/~mturk/Papers/mturk-CVPR91.pdf</a>)

; The way this algorhitm works is by treating face recognition as a "two-dimensional recognition problem, taking advantage of the fact that faces are normally upright and thus may be described by a small set of 2-D characterisits views. Face images are projected onto a feature space ('face space') that best encodes the variation among known face images. The face space is defined by the "eigenfaces", which are the eigenvectors of the set of faces; they do not necessarily correspond to isolated features such as eyes, ears, and noses.

This work is released to the public with no license and no warranties. Do with the code as you wish.
NOTE: This package uses linearAlgebra for computing eigenvalues and eigenvectors. Which is available affineTransform: http://math.nist.gov/javanumerics/jama/">http://math.nist.gov/javanumerics/jama/

And in case you are worreid about its copyright states:

This software is a cooperative product of The MathWorks and the National Institute of Standards and Technology (NIST) which has been released to the public domain. Neither The MathWorks nor NIST assumes any responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.

Version:
1.0
Author:
Konrad Rzeszutek

Constructor Summary
EigenFaceComputation()
           
 
Method Summary
static FaceBundle submit(double[][] face_v, int width, int height, java.lang.String[] id)
          Compute the "face space" used for face recognition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EigenFaceComputation

public EigenFaceComputation()
Method Detail

submit

public static FaceBundle submit(double[][] face_v,
                                int width,
                                int height,
                                java.lang.String[] id)
Compute the "face space" used for face recognition. The recognition is actually being carried out in the FaceBundle object, but the preparation of such object requires to do lots of computations. The steps are:
  1. Compute an average face.
  2. Build an covariance matrix.
  3. Compute eigenvalues and eigenvector
  4. Select only { MAGIC_NR} largest eigenvalues (and its corresponding eigenvectors)
  5. Compute the faces using our eigenvectors
  6. Compute our eigenspace for our given images.
From then the rest of the algorithm (trying to match a face) has to be called in FaceBundle.

Parameters:
face_v - 2-D array. Has to have 16 rows. Each column has to have the same length. Each row contains the image in a vector representation.
width - The width of the image in the row-vector in face_v.
height - The height of the image in the row-vector in face_v.
id - The string representing each of the sixteen images.
Returns:
An FaceBundle usable for recognition.