# 0.3 Obtaining the eigenface basis

 Page 1 / 1
This page explains how to set up our face recognition system for detection. It is centered around the creation of the "eigenface" basis for "face space." It also discusses simplifying the eigenface basis to a level that is both managable and accurate.

## Introduction to eigenface system

The eigenface face recognition system can be divided into two main segments: creation of the eigenface basis and recognition, or detection, of a new face. The system follows the following general flow:

## Deriving the eigenface basis

The eigenface technique is a powerful yet simple solution to the face recognition dilemma. In fact, it is really the most intuitive way to classify a face. As we have shown, old techniques focused on particular features of the face. The eigenface technique uses much more information by classifying faces based on general facial patterns. These patterns include, but are not limited to, the specific features of the face. By using more information, eigenface analysis is naturally more effective than feature-based face recognition.

Eigenfaces are fundamentally nothing more than basis vectors for real faces. This can be related directly to one of the most fundamental concepts in electrical engineering: Fourier analysis. Fourier analysis reveals that a sum of weighted sinusoids at differing frequencies can recompose a signal perfectly! In the same way, a sum of weighted eigenfaces can seamlessly reconstruct a specific person’s face.

Determining what these eigenfaces are is the crux of this technique.

Before finding the eigenfaces, we first need to collect a set of face images. These face images become our database of known faces. We will later determine whether or not an unknown face matches any of these known faces. All face images must be the same size (in pixels), and for our purposes, they must be grayscale, with values ranging from 0 to 255. Each face image is converted into a vector ${\Gamma }_{n}$ of length N (N=imagewidth*imageheight). The most useful face sets have multiple images per person. This sharply increases accuracy, due to the increased information available on each known individual. We will call our collection of faces“face space.”This space is of dimension N.

Next we need to calculate the average face in face space. Here M is the number of faces in our set:

$\Psi =\frac{1}{M}\sum _{n=1}^{M}{\Gamma }_{n}$

We then compute each face’s difference from the average:

${\Phi }_{i}={\Gamma }_{i}-\Psi$

We use these differences to compute a covariance matrix (C) for our dataset. The covariance between two sets of data reveals how much the sets correlate.

$C=\frac{1}{M}\sum _{n=1}^{M}{\Phi }_{n}{\Phi }_{n}^{T}=\frac{1}{M}\sum _{n=1}^{M}{\left(\begin{array}{ccc}\mathrm{var}\left({p}_{1}\right)& \dots & \mathrm{cov}\left({p}_{1},{p}_{N}\right)\\ ⋮& \ddots & ⋮\\ \mathrm{cov}\left({p}_{N},{p}_{1}\right)& \cdots & \mathrm{var}\left({p}_{N}\right)\end{array}\right)}_{n}=A{A}^{T}$

Where $A=\left[{\Phi }_{1}{\Phi }_{2}...{\Phi }_{M}\right]$ and ${p}_{i}$ = pixel i of face n.

The eigenfaces that we are looking for are simply the eigenvectors of C. However, since C is of dimension N (the number of pixels in our images), solving for the eigenfaces gets ugly very quickly. Eigenface face recognition would not be possible if we had to do this. This is where the magic behind the eigenface system happens.

## Simplifying the initial eigenface basis

Based on a statistical technique known as Principal Component Analysis (PCA), we can reduce the number of eigenvectors for our covariance matrix from N (the number of pixels in our image) to M (the number of images in our dataset). This is huge! In general, PCA is used to describe a large dimensional space with a relative small set of vectors. It is a popular technique for finding patterns in data of high dimension, and is used commonly in both face recognition and image compression.* PCA is applicable to face recognition because face images usually are very similar to each other (relative to images of non-faces) and clearly share the same general pattern and structure.

PCA tells us that since we have only M images, we have only M non-trivial eigenvectors. We can solve for these eigenvectors by taking the eigenvectors of a new M x M matrix:

$L={A}^{T}A$

Because of the following math trick:

$\begin{array}{l}{A}^{T}A{v}_{i}={\mu }_{i}{v}_{i}\\ A{A}^{T}A{v}_{i}={\mu }_{i}A{v}_{i}\end{array}$

Where ${v}_{i}$ is an eigenvector of L. From this simple proof we can see that $A{v}_{i}$ is an eigenvector of C.

The M eigenvectors of L are finally used to form the M eigenvectors ${u}_{l}$ of C that form our eigenface basis:

${u}_{l}=\sum _{k=1}^{M}{v}_{lk}{\Phi }_{k}$

It turns out that only M-k eigenfaces are actually needed to produce a complete basis for the face space, where k is the number of unique individuals in the set of known faces.

In the end, one can get a decent reconstruction of the image using only a few eigenfaces (M’), where M’usually ranges anywhere from .1M to .2M. These correspond to the vectors with the highest eigenvalues and represent the most variance within face space.

These eigenfaces provide a small yet powerful basis for face space. Using only a weighted sum of these eigenfaces, it is possible to reconstruct each face in the dataset. Yet the main application of eigenfaces, face recognition, takes this one step further.

what is math number
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
Need help solving this problem (2/7)^-2
x+2y-z=7
Sidiki
what is the coefficient of -4×
-1
Shedrak
the operation * is x * y =x + y/ 1+(x × y) show if the operation is commutative if x × y is not equal to -1
An investment account was opened with an initial deposit of \$9,600 and earns 7.4% interest, compounded continuously. How much will the account be worth after 15 years?
lim x to infinity e^1-e^-1/log(1+x)
given eccentricity and a point find the equiation
12, 17, 22.... 25th term
12, 17, 22.... 25th term
Akash
College algebra is really hard?
Absolutely, for me. My problems with math started in First grade...involving a nun Sister Anastasia, bad vision, talking & getting expelled from Catholic school. When it comes to math I just can't focus and all I can hear is our family silverware banging and clanging on the pink Formica table.
Carole
I'm 13 and I understand it great
AJ
I am 1 year old but I can do it! 1+1=2 proof very hard for me though.
Atone
hi
Not really they are just easy concepts which can be understood if you have great basics. I am 14 I understood them easily.
Vedant
find the 15th term of the geometric sequince whose first is 18 and last term of 387
I know this work
salma
The given of f(x=x-2. then what is the value of this f(3) 5f(x+1)
hmm well what is the answer
Abhi
If f(x) = x-2 then, f(3) when 5f(x+1) 5((3-2)+1) 5(1+1) 5(2) 10
Augustine
how do they get the third part x = (32)5/4
make 5/4 into a mixed number, make that a decimal, and then multiply 32 by the decimal 5/4 turns out to be
AJ
how
Sheref
can someone help me with some logarithmic and exponential equations.
20/(×-6^2)
Salomon
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
Salomon
I'm not sure why it wrote it the other way
Salomon
I got X =-6
Salomon
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
hmm
Abhi
is it a question of log
Abhi
🤔.
Abhi
I rally confuse this number And equations too I need exactly help
salma
But this is not salma it's Faiza live in lousvile Ky I garbage this so I am going collage with JCTC that the of the collage thank you my friends
salma
Commplementary angles
hello
Sherica
im all ears I need to learn
Sherica
right! what he said ⤴⤴⤴
Tamia
hii
Uday
hi
salma
hi
Ayuba
Hello
opoku
hi
Ali
greetings from Iran
Ali
salut. from Algeria
Bach
hi
Nharnhar
Got questions? Join the online conversation and get instant answers!