Top Banner
R.SINDHI MADHURI A.ANURAG REDDY G.USHASWI ROHIT UPADHYAY Face recognition using PCA
20

Face Recognition using PCA-Principal Component Analysis using MATLAB

Dec 01, 2014

Download

Technology

Sindhi Madhuri

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.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Face Recognition using PCA-Principal Component Analysis using MATLAB

R.SINDHI MADHURI

A.ANURAG REDDY

G.USHASWI

ROHIT UPADHYAY

Face recognition using PCA

Page 2: Face Recognition using PCA-Principal Component Analysis using MATLAB

• IDEA

• OPERATIONS

• MERITS

• DEMERITS

• APPLICATIONS

CONTENTS

Page 3: Face Recognition using PCA-Principal Component Analysis using MATLAB

PCA

Eigenfaces: the idea

Eigenvectors and Eigenvalues

Learning Eigenfaces from training sets of faces

Co-variance

Recognition and reconstruction

IDEA

Page 4: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 5: Face Recognition using PCA-Principal Component Analysis using MATLAB

Three basic steps involved in PCA are:Identification{by eigen faces}Recognition{matching eigen faces}Categorization{by grouping}

Algorithm

Page 6: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 7: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 8: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 9: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 10: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 11: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 12: Face Recognition using PCA-Principal Component Analysis using MATLAB

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:

Page 13: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 14: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 15: Face Recognition using PCA-Principal Component Analysis using MATLAB

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

Page 16: Face Recognition using PCA-Principal Component Analysis using MATLAB

RECONSTRUCTIONImage is reconstructed in the 3rd case, if , ( 1.. )iand i M

Using the MATLAB code, original image and reconstructed image are shown.

Ex:

Page 17: Face Recognition using PCA-Principal Component Analysis using MATLAB

MERITS

Relatively simpleFastRobustExpression

- Change in feature location and shape.

Page 18: Face Recognition using PCA-Principal Component Analysis using MATLAB

DEMERITSVariations in lighting conditions

Different lighting conditions for enrolment and query. Bright light causing image saturation.

Page 19: Face Recognition using PCA-Principal Component Analysis using MATLAB

APPLICATIONS:Various potential applications, such as

• Person identification. • Human-computer

interaction.• Security systems.

Page 20: Face Recognition using PCA-Principal Component Analysis using MATLAB

Thank You