University of Wisconsin - MadisonCS 540 Lecture NotesC. R. Dyer

Computer Vision (Chapter 24.1, 24.5)


What is Computer Vision?

Applications

Example: Vehicle Navigation using Neural Networks

The ALVINN system by D. Pomerleau is an example of a 2-layer, feedforward neural network for "vision-based lane keeping" that was described earlier in the section on Neural Networks.

Example: Face Recognition using an Eigenspace Representation

Eigenspace Representation of Images

Face Recognition Algorithm

The entire face recognition algorithm can now be given:

  1. Given a training set of face images, compute the M' largest eigenvectors, E1, E2, ..., EM'. M' = 10 or 20 is a typical value used. Notice that this step is done once "offline."

  2. For each different person in the training set, compute the point associated with that person in eigenspace. That is, use the formula given above to compute W = [w1, ..., wM']. Note that this step is also done once offline.

  3. Given a test image, Itest, project it to the M'-dimensional eigenspace by computing the point Wtest, again using the formula given above.

  4. Find the closest training face to the given test face:

    d = min || Wtest - Wk ||
         k
    

    where Wk is the point in eigenspace associated with the kth person in the training set, and || X || denotes the Euclidean norm defined as (x12 + x22 + ... + xn2)1/2 where X is the vector [x1, x2, ..., xn].

  5. Find the distance of the test image from eigenspace (that is, compute the projection distance so that we can estimate the likelihood that the image contains a face):

    dffs = || Y - Yf ||
    

    where Y = Itest - A, and Yf = sum_i_from_1_to_M' (wtest,i * Ei).

  6. If dffs < Threshold1
    	; Test image is "close enough" to the eigenspace
    	; associated with all of the training faces to
    	; believe that this test image is likely to be some
    	; face (and not a house or a tree or something
    	; other than a face)
    then if d < Threshold2
         then classify Itest as containing the face of person k,
    	     where k is the closest face in the eigenspace to
    	     Wtest, the projection of Itest to eigenspace
         else classify Itest as an unknown person
    else classify Itest as not containing a face
    

Example

Say we have two 3 x 3 training images, so N=3 and M=2, defined as follows:

Image I1
000
101010
000
Image I2
0100
0100
0100

We represent these two images as column vectors of length 3*3=9, so we have

I1 = [0 0 0 10 10 10 0 0 0]T
I2 = [0 10 0 0 10 0 0 10 0]T

Now assume that we use a subspace of dimension 1, i.e., M'=1, and the eigenvector computed from the two training images is:

E1 = [5 0 5 10 5 10 5 0 5]T

(Note: This is not the true eigenvector but is used here to keep the example simple.)

The average image, A, is computed from I1 and I2 by computing for each pixel, the average gray level from the two images' corresponding pixels. Thus, the second pixel in A is (0+10)/2 = 5. Hence,

A = [0 5 0 5 10 5 0 5 0]T

We can now compute how the first training image, I1, is projected into the one-dimensional eigenspace by computing W1 = [w1,1], where w1,1 = E1T * (I1 - A). So, here we have

I1' = I1 - A = [0 -5 0 5 0 5 0 -5 0]T
w1,1 = 5*0 + 0*-5 + 5*0 + 10*5 + ... + 5*0 = 0
W1 =[0]

In other words, image I1 projects to the origin in this one-dimensional subspace defined by basis image E1.

Similarly, for I2 we get W2 = [w2,1], where

w2,1 = E1T * (I2 - A)
    = [5 0 5 10 5 10 5 0 5] * [0 5 0 -5 0 -5 0 5 0]T
    = -100

So, W2 = [-100].

Now, say we are given the following test image

Image Itest
073
01010
0100

Projecting Itest into face space we get Wtest = [wtest,1], where

wtest,1 = E1T * (Itest - A)
    = [5 0 5 10 5 10 5 0 5] * [0 2 3 -5 0 5 0 5 0]T
    = 15

So, Wtest = [15], which means that Wtest is more similar to image I1 than to image I2. Therefore, we would classify Itest as the same class as I1.

Face Recognition Accuracy and Extensions to Eigenspace Approach

Applications of Eigenfaces

There are a variety of commercial products that are now available based on the eigenface method. See, for example, TrueFace PC, which does computer logins by face recognition, and Viisage and Identix for face recognition products for various biometric applications.


Copyright © 1996-2003 by Charles R. Dyer. All rights reserved.