Face Recognition Assignment #3

posted May 12, 2004

target date: May 19, 2004 (you do not need to submit this part of the project on the target date: this is just to help you in allocating the time for this project. This assignment will be a section of your final report due on or before June 3, 2004)

What You Have to Do.

In this assignment your goal is to write two Matlab functions: the first one to compute the feature vector associated to a given face and the second one to reconstruct a face given its feature vector (and, of course, the face eigenspace basis). Let's first introduce some notation:

Notation

Meaning

The matrix that contains the first K basis elements of the face eigenspace (eigenfaces)

The vector that contains the column scan of the face image

Zero mean version of the vector that contains the column scan of the face image

The feature vector containing the components of the face projected on the face eigenspace generated by the first K eigenfaces.


  1. Write a function to compute the features associated to a given face. The help for such function should look like:

    Omega = project_face(Gamma, U, K)

    DESC:
    project the face Gamma on the eigenspace

    INPUT:
    Gamma = input face
    U = face eigenspace basis
    K = number of features produced

    OUTPUT:
    Omega = face feature vector (K-dimensional)

  2. Write a function to reconstruct the zero-mean version of a given face starting form its feature vector Omega. The help for such function should look like:

    I_zm = reconstruct_face(Omega, U, s)

    DESC:
    reconstruct the face given the feature vector Omega and the eigenfaces U

    INPUT:
    Omega = face feature vector
    U = face eigenspace basis
    s = image size [height, width]

    OUTPUT:
    I_zm = reconstructed image

  3. Using the data in:

    View_1.mat - normal II
    View_2.mat - happy
    View_3.mat - angry
    View_4.mat - surprised
    View_5.mat - disgusted

    and the functions that you developed before, compute the projection and reconstruction of your face using the first 20, 40 and 60 eigenfaces and display the results. For which class of expressions the reconstruction is better? Explain why.

Warning.

  1. The function examples in1) and 2) should serve only to give you an idea to start with: feel free to code those functions the way you want, as long as they return the desired (and possibly correct) outputs.
  2. You may find useful the following Matlab commands
    imagesc - scales automatically the dynamic range of the image (useful to visualize the reconstruction results)
    truesize - sets the correct aspect ratio of the image
    colormap - sets the proper colormap (Example: colormap gray)

Example.

The following image shows an example of the projection/reconstruction process:


Reading:

 
M. Turk and A. Pentland, "Eigenfaces for recognition," Journal of Cognitive Neuroscience, Vol. 3, No. 1, pp. 71-86, Winter 1991.
download from: http://www.cs.ucsb.edu/~mturk/research.htm
 
M. Turk and A. Pentland, "Face recognition using eigenfaces," Proc. IEEE Conference on Computer Vision and Pattern Recognition, Maui, Hawaii, 1991.
download from: http://www.cs.ucsb.edu/~mturk/research.htm