face recognition using pca-principal component analysis using matlab
DESCRIPTION
It describes about a biometric technique to recognize people at a particular environment using MATLAB. It simply forms EIGENFACES and compares Principal components instead of each and every pixel of an image.TRANSCRIPT
R.SINDHI MADHURI
A.ANURAG REDDY
G.USHASWI
ROHIT UPADHYAY
Face recognition using PCA
• IDEA
• OPERATIONS
• MERITS
• DEMERITS
• APPLICATIONS
CONTENTS
PCA
Eigenfaces: the idea
Eigenvectors and Eigenvalues
Learning Eigenfaces from training sets of faces
Co-variance
Recognition and reconstruction
IDEA
PCA means Principle Component Analysis.
PCA was invented in 1901 by Karl Pearson
PCA involves the calculation of the eigenvalue decomposition of a data covariance matrix or singular value decomposition of a data matrix, usually after mean centering the data for each attribute.
PCA
Three basic steps involved in PCA are:Identification{by eigen faces}Recognition{matching eigen faces}Categorization{by grouping}
Algorithm
In Digital Image Processing, we convert 2-D images into matrix form for clear analysis.Every matrix can be represented with the help of its eigen vectors.An eigenvector is a vector that obeys the following rule:
Where A is a matrix , is a scalar (called the eigenvalue)
e.g. one eigenvector of is since
so for this eigenvector of this matrix the eigenvalue is 4
v vA
2 3
2 1
A3
2
2 3 3 12 34
2 1 2 8 2
EIGEN VECTORS
EIGEN FACESThink of a face as being a weighted combination of some “component” or “basis” faces
These basis faces are called eigen faces.
-8029 2900 1751 1445 4238 6193
2
1
2
N
a
a
a
2
1
2
N
b
b
b
2
1
2
N
c
c
c
2
1
2
N
d
d
d
2
1
2
N
e
e
e
2
1
2
N
f
f
f
Eigenfaces: representing faces
We compute the average face
2 2 2
1 1 1
2 2 21, 8
N N N
a b h
a b hm where M
M
a b h
Then subtract it from the training faces
2 2 2 2 2 2 2 2
2 2
1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2
1 1 1 1
2 2
, , , ,
,
m m m m
N N N N N N N N
m m
N N
a m b m c m d m
a m b m c m d ma b c d
a m b m c m d m
e m f m
e m fe f
e m
2 2 2 2 2 2
1 1 1 1
2 2 2 2 2 2, ,m m
N N N N N N
g m h m
m g m h mg h
f m g m h m
Now we build the matrix which is N2 by M
The covariance matrix which is N2 by N2
m m m m m m m mA a b c d e f g h
Cov AA
The covariance matrix has eigenvectors covariance matrix eigenvectors
eigenvalues
Eigenvectors with larger eigenvectors correspond to
directions in which the data varies more
Finding the eigenvectors and eigenvalues of the
covariance matrix for a set of data is termed principle components analysis
.617 .615
.615 .717C
1
.735
.678
2
.678
.735
1 0.049 2 1.284
1 1 2 21
1 2
( )( )cov( , )
1
ni i
i
x x x xx x
n
The covariance of two variables is:
RecognitionA face image can be projected into this face space by
pk = UT(xk – m) where k=1,…,m
To recognize a face
2
1
2
N
r
r
r
2 2
1 1
2 2
m
N N
r m
r mr
r m
Subtract the average face from it
Compute its projection onto the face space U
mU r
Compute the distance in the face space between the face and all known faces
22 1..i i for i M
Compute the threshold 1max , 1..
2 i j for i j M
Distinguish between• If then it’s not a face; the
distance between the face and its reconstruction is larger than threshold
• If then it’s a new face
• If then it’s a known face because the distance in the face space between the face and all known faces is larger than threshold
min iand , ( 1.. )iand i M
RECONSTRUCTIONImage is reconstructed in the 3rd case, if , ( 1.. )iand i M
Using the MATLAB code, original image and reconstructed image are shown.
Ex:
MERITS
Relatively simpleFastRobustExpression
- Change in feature location and shape.
DEMERITSVariations in lighting conditions
Different lighting conditions for enrolment and query. Bright light causing image saturation.
APPLICATIONS:Various potential applications, such as
• Person identification. • Human-computer
interaction.• Security systems.
Thank You