18
Journal of Signal Processing Theory and Applications (2013) 1: 1-18 doi:10.7726/jspta.2013.1001 Research Article ______________________________________________________________________________________________________________________________ *Corresponding e-mail: [email protected] Professor, Dept. of Instrumentation Technology, Dr. Ambedkar Institute of Technology, Bangalore 560056, India 1 Real-Time Facial Recognition System—Design, Implementation and Validation M. Meenakshi * Received 29 August 2012; Published online November 10, 2012 © The author(s) 2012. Published with open access at uscip.org Abstract This paper presents the design, implementation and validation of a Digital Signal Processor (DSP)-based Prototype facial recognition and verification system. This system is organized to capture an image sequence, find facial features in the images, and recognize and verify a person. The current implementation uses images captured using a WebCam, compares it to a stored database using methods of Principal Component Analysis (PCA) and Discrete Cosine Transform (DCT). In the beginning, real-time validation of the identification of the captured images is done using a PC-based system with algorithms developed in MATLAB. Next, a TMS320C6713DSP-based prototype system is developed and validated in real-time. Several tests were made on different sets of images, and the performance and speed of the proposed system measured in real environment. Finally, the result confirmed that the proposed system can be applied to various applications which are impossible in conventional PC-based systems. Also, better results were observed from DCT analysis than PCA results. Keywords: PCA; DCT; Real-time System; DSP 1. Introduction In recent years, the study of image analysis and its use in facial recognition applications has gained significant attention from the worldwide research community. Facial recognition is a popular research area in pattern recognition and computer vision due to its wide range of commercial and law enforcement applications, including passports, credit cards, drivers’ licenses, biometric authentication, video surveillance, and information security (Zhao et al, 2003; Phillips et al, 1997). These applications demands user-friendly automatic systems that can secure our assets and protect our privacy without losing our identity. Although researchers in various fields like psychology, neural sciences and engineering, image processing and computer vision have investigated a number of issues related to personal identification and machines, it is still difficult to design an

Real-Time Facial Recognition System—Design, Implementation and

Embed Size (px)

Citation preview

Page 1: Real-Time Facial Recognition System—Design, Implementation and

Journal of Signal Processing Theory and Applications

(2013) 1: 1-18

doi:10.7726/jspta.2013.1001

Research Article

______________________________________________________________________________________________________________________________

*Corresponding e-mail: [email protected]

Professor, Dept. of Instrumentation Technology, Dr. Ambedkar Institute of Technology, Bangalore

560056, India

1

Real-Time Facial Recognition System—Design,

Implementation and Validation

M. Meenakshi*

Received 29 August 2012; Published online November 10, 2012

© The author(s) 2012. Published with open access at uscip.org

Abstract This paper presents the design, implementation and validation of a Digital Signal Processor (DSP)-based

Prototype facial recognition and verification system. This system is organized to capture an image sequence,

find facial features in the images, and recognize and verify a person. The current implementation uses images

captured using a WebCam, compares it to a stored database using methods of Principal Component Analysis

(PCA) and Discrete Cosine Transform (DCT). In the beginning, real-time validation of the identification of the

captured images is done using a PC-based system with algorithms developed in MATLAB. Next, a

TMS320C6713DSP-based prototype system is developed and validated in real-time. Several tests were made

on different sets of images, and the performance and speed of the proposed system measured in real

environment. Finally, the result confirmed that the proposed system can be applied to various applications

which are impossible in conventional PC-based systems. Also, better results were observed from DCT analysis

than PCA results.

Keywords: PCA; DCT; Real-time System; DSP

1. Introduction

In recent years, the study of image analysis and its use in facial recognition applications has gained

significant attention from the worldwide research community. Facial recognition is a popular

research area in pattern recognition and computer vision due to its wide range of commercial and

law enforcement applications, including passports, credit cards, drivers’ licenses, biometric

authentication, video surveillance, and information security (Zhao et al, 2003; Phillips et al, 1997).

These applications demands user-friendly automatic systems that can secure our assets and protect

our privacy without losing our identity. Although researchers in various fields like psychology,

neural sciences and engineering, image processing and computer vision have investigated a

number of issues related to personal identification and machines, it is still difficult to design an

Page 2: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

2

automatic system for this task. Although extremely reliable methods of biometric personal

identification exists, e.g., fingerprint analysis and retinal or iris scans, these methods have yet to

gain acceptance from the general population. Thus, facial recognition is a very challenging problem

and, to date, there is no technique that provides a robust solution to all situations and different

applications that facial recognition may encounter. The applications may be very useful for

personal verification and recognition, however, its implementation is always very difficult due to all

of the different situations a human face can be found (Pentland et al., 1994; Rizvi et al., 1998).

Because of the said difficulty of the facial recognition task, the number of techniques is large and

diverse. In addition, the applications involve a huge number of situations.

Although there are many other identification and verification techniques, the main motivation for

facial recognition is because it is considered a passive, nonintrusive system for verifying and

identifying people (De and Aeberhard, 1999). Other types of identification include password, PIN

(personal identification number) or token systems, use of fingerprints and iris as a physiological

identification system. They are very useful when we need an active identification system; where a

person has to expose their body to some device to scan and identify them. For bank transactions

and security areas, a pause-and declare interaction is the best method of identification, where

people feel conscious, comfortable and safe with it. However, sometimes in cases like a store that

wishes to recognize customers or a house that has to identify people that live there, we need not

interact with people for identification purposes. For such applications, facial as well as voice

verification are very desirable. It is also important that an identification technique is closer to the

way human beings recognize each other (De and Aeberhard, 1999; Gao and Leung, 2002)

As mentioned above, there are numerous applications for facial recognition that can be divided into

two groups, those applications that require facial identification and those that require facial

verification. The first group of applications matches a face to one in a database; and the second

group, the verification technique tries to verify a human face from a given sample of that face (Zhao

et al, 2003; Phillips et al, 1997).

The difficulties and limitations of facial recognition are many. To name a few, human faces are not

invariant, i.e., a person’s face can change a lot during short periods of time. One problem of facial

recognition is the fact that different faces can seem very similar; therefore, a discrimination task is

needed. Similarly, when we analyze the same face, at different times many characteristics might

have changed (Phillips et al, 1997; Pentland and Choudhury, 2000; Yuille, et al, 1992). Some of the

most important problems are change in illumination, variability in facial expressions, the presence

of accessories (glasses, beards, etc.). In addition, the rotation of a face may change many facial

characteristics (Yuille et al, 1992; Nefian, 1999)

To address the above problems, we have introduced a digital image processing-based facial

recognition and verification system designed and developed on the TMS320C6713 DSP. The main

advantage of this system is reduced size, increased speed and reduced cost. First we will highlight

the different methodologies and algorithms that can be used for facial recognition applications.

Algorithms based on PCA and DCT were developed and verified on a PC-based real-time system.

Next, a DSP system prototype is developed and validated in real-time. Analysis is also carried out to

compare the accuracy and performance of both algorithms.

Page 3: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

3

Section 2 then gives the definitions involved in image processing/facial recognition techniques, and

summarizes the related literature, Section 3 provides the main principles and methodology of the

image recognition systems based on PCA and DCT methods. The image recognition system for

identification applications is also explained in section 3. Next, Section 4 highlights the results

obtained from the developed algorithm and the corresponding analysis. The hardware

implementation of the TMS 320 C 6713 DSP-based facial recognition system is given in Section 5.

The results of the real-time DSP-based facial recognition system is also given in section 5. Finally

conclusions are drawn in section 6.

2. Background

In this section some of the technologies frequently used for facial recognition are briefly reviewed.

In general, facial recognition systems proceed by capturing the face in an image, with the effect of

estimating and normalizing for translation, scale and in-plane rotation. Given a normalized image,

the features, either global or local, are extracted and compressed in a compact face representation

which can then be stored in an image database and compared with face representations/search

images derived at later times.

The research on face recognition generally falls into two main categories (Chellappa et al., 1995)

i.e:

1. Feature-based approach and

2. Holistic or global approach

Feature-based approaches: Facial recognition based on feature-based approaches relies on the

detection and characterization of individual facial features and their geometrical relationships. Such

features generally include the eyes, nose, and mouth. The detection of faces and their features prior

to performing verification or recognition makes these approaches robust to positional variations of

the faces in the input image.

Holistic or global approaches: Facial recognition based on holistic approaches, on the other hand,

involves encoding the entire facial image and treating the resulting facial “code” as a point in a high-

dimensional space. Here, it is assumed that all faces are constrained to particular positions,

orientations, and scales.

History

Feature-based approaches were more predominant in early attempts at automating the facial

recognition process. Some of the early works involved the use of very simple image processing

techniques, which include edge detection, signatures, and so on for detecting faces and their

features (Kelly, 1970). The first attempt at edge map extraction from an input image and then

matching it to a large oval template, with possible variations in position and size, was done by Sakai

and colleagues (Sakai et al., 1969). The presence of a face was then confirmed by searching for

edges at estimated locations of certain features like the eyes and mouth. An improved edge

detector, involving heuristic planning to extract an accurate outline of a person’s head from various

backgrounds was described by Kelly (1970).

More recently, Govindaraju et al. (1990) proposed a technique for identifying a face in a cluttered

image, which employed a deformable template similar to ones given by Yuille et al. (1989). They

Page 4: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

4

based their template on the outline of the head and allowed it to deform according to certain

spring-based models. This approach, based on the outline of the head and allowing it to deform

according to certain spring-based models, performed quite well when tested on a small dataset, but

sometimes gave rise to errors (Govindaraju et al, 1990). Other recent approaches have used

hierarchical coarse-to-fine searches with template-based matching criteria (Burt, 1989; Craw et al,

1992; Shepherd, 1985).

The next step after a face has been located is computation of its features. Early examples of this

involved work on facial profile features (Kanade, 1973; Harmon and Hunt 1977). An interesting

recent discussion of feature-based methods compared them to holistic approaches (Brunelli and

Poggio, 1993). A successful holistic approach to face recognition uses the Karhunen-Loeve

transform (KLT), which exhibits pattern recognition properties largely overlooked initially because

of the complexity involved in computation. Originally proposed KLT to characterize faces produces

an expansion of an input image in terms of a set of basis images or so-called eigenimages (Kirby and

Sirvoich, 1990). The KLT for face recognition proposed by Turk and Pentland (1991) considered

only a few KLT coefficients to represent faces in what they termed facespace and performed well

for frontal mugshot images. Each set of KLT coefficients representing a face formed a point in this

high-dimensional space. They proved that the KLT does not provide adequate robustness against

variations in facial orientation, position, and illumination. Therefore, Akamatsu et al (1991) added

operations to the KLT method to standardize faces with respect to position and size. The KLT on

particular features of a face used by Pentland and colleagues (1994) used a distance-to-feature-

space (DFFS) metric to locate them in an image. A similar idea of using ‘local’ information was

presented by Lades et al. (1993). Next, for relatively large databases, an artificial neural network

employed so-called dynamic link architecture (DLA) to achieve distortion-invariant recognition.

Gabor-based wavelets are used to obtain local descriptors of the input images in terms of

frequency, position, and orientation information.

Another holistic approach to facial recognition was based on linear discriminant analysis (LDA)

(Swets and Weng, 1996; Belhumeur et al, 1997). Fisher’s linear discriminant (Duda and Hart, 1973)

is used to obtain the most discriminating features of faces rather than the most expressive ones

given by KLT alone (Swets and Weng, 1996). LDA resulted in better classification than in the case

of the KLT applied alone, especially under varying pose and illumination conditions.

Though there are merits to both feature-based and holistic approaches to face recognition, they

may both be necessary to meet the two main objectives of a face recognition system: accuracy and

robustness. Holistic approaches proved to be accurate for simple frontal mug shots, but they must

be accompanied by certain feature-based techniques to make them more robust. Both holistic

information and feature information are essential for human recognition of faces. In order to

incorporate both accuracy and robustness, an alternative holistic method for facial recognition has

been proposed (Ziad, 2001; Lu et al., 2003), where the basic idea is to use the discrete cosine

transform (DCT) as a means of feature extraction for later face classification. Another method of

face recognition, based on the information theory approach that breaks down facial images into a

small set of characteristic feature images called “eigenfaces” was proposed by Sudhanshu et al.

(2009). The following section gives a detailed description of both DCT and PCA methods for facial

recognition.

Page 5: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

5

3. Principles and Methodology of Image Recognition System

Figure 1 gives a pictorial representation of the automatic image recognition system, where the

application is the automatic opening or closing of the door depending on the person who is

reaching the door. If a known person reaches the door, it will automatically open; otherwise it will

close the door. The design is based on recognition of biometric facial properties. Such automatic an

image recognition system provides better assistance for physically challenged people. The said

systems can be used in ATM banking system.

Digital signal processing

Kit (DSK 6713)

DOORDOORDOORDOOR

LOCK

OPENS ON

IMAGE

MATCH

WEBCAM

I

M

A

G

E

Fig 1. Face recognition system

One of the great challenges for computational intelligence and biometrics is to understand how

people process and recognize faces to develop automated and reliable facial recognition systems.

Biometrics has become the major component of complex decision-making processes associated

with security applications. Challenges addressed for facial detection and authentication include

cluttered environments, occlusion and disguise, temporal changes, and last but not least, robust

training and open set testing. Reliable Face Recognition Methods seeks to comprehensively address

the facial recognition problem while drawing inspiration and gaining new insights from

complementary fields of endeavor such as the neurosciences, statistics, signal and image

processing, computer vision, and machine learning and data mining.

As mentioned before, a number of methods is available for face recognition using image processing

techniques. This includes PCA, ICA, Linear Discriminant Analysis (LDA), Evolutionary Pursuit (EP),

EBGM, Kernel Methods, Trace Transform, Active Appearance Model (AAM), 3-D Morphable Model,

3-D Face Recognition Bayesian Framework, SVM, and HMM. This section explains the PCA and DCT

method of face recognition system. Subsequent sections provide experimental results to support

the developed algorithm.

Principal Component Analysis (PCA)

PCA is a common statistical technique using a holistic approach to find patterns in high dimensional

data. The holistic approach uses the whole face region as input data. Dimensionality reduction, also

known as feature extraction, by retaining dataset characteristics is done by PCA. The main principle

Page 6: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

6

of PCA is derived from the information theory approach, which breaks down facial images into

small sets of feature images called Eigenfaces. Eigenfaces in turn are known as principal component

analysis of original training set of face images. Face images are deconstructed by extracting relevant

information. One of the many methods to capture variations from a collection training face images

and use this information to decode and compare individuals is shown in Fig. 2:

Fig 2. PCA for face recognition

OVERVIEW OF THE ALGORITHM

Facial recognition using the PCA method involves mainly two phases, the Training Phase and

Testing Phase, as shown in Fig. 2. PCA implementation is demonstrated in the flowchart given in

Fig. 3.

The steps involved in the Training Phase are:

Step 1:

1. Transform the original images of the training set into a set of eigenfaces E

2. Calculate the weights for each image of the training set and store in the set W

3. Receive unknown image X, calculate the weights for X and store the weights in the vector

WX

Step 2:

Compare the weight WX of the test image X with the weights W of the training image. For this:

1. Calculate the average distance D between the weight vector W and the weight vector WX

of the unknown image.

2. Compare D with some threshold value. If D exceeds the threshold, θ, then indicate that the

weight vector WX of the unknown image lies too “far apart” from the weights of the faces.

Under such case, the unknown image X is not a face. Otherwise, if X is actually a face, store

its weight vector WX for later classification. Note that the optimal threshold value has to be

determined empirically.

Page 7: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

7

Fig 3. Flowchart of PCA

Original faces Training set

Start

E = Eigenfaces (Training Set)

W = Weights (E, Training Set)

Input Unknown Image X

WX = Weights (E, X)

D = ave(distance(W, WX))

D <θ

X is a face X is not a face

Store X and WX

End

Page 8: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

8

Training face :

Training face involves the calculation of eigenfaces with PCA. The steps involved are:

Step-1: Establishment of the training set of images: In this step, the database of faces constituting

the training set (Гi) should be prepared for processing.

Let Γi | i ( i=1, 2,...,n) be a training set where Γ is a face image (N2).

Step-2: Calculation of the mean of all training samples.

Here, the average matrix is calculated, as:

∑=

Γ=n

i

in 1

where μ is the mean of all training samples.

Step-3: Calculation of the difference in images by subtracting the training set vector by the mean

image. Call this matrix as the variation matrix [η1, η2, η3, …….. ηn ]

where, η = Γi – μ

Step-4: Calculate eigenvectors and eigenvalues of covariance matrix (C) = AAT.

In this step, the eigenvectors also known as eigenfaces (Vi) and the corresponding eigenvalues λi

should be calculated. The eigenfaces must be normalized so that they are unit vectors, i.e. of length

one. Covariance matrix is simplified to:

nC

T

nn

TT ηηηηηη +++=

...................2211

Note that the covariance matrix C has dimensions of N2 x N2, and it necessitates calculating N2 Eigen

vectors. As the dimension of the image increases significantly, the computation of its eigenvectors

become tedious. In order to simplify the method of solving for the N2 dimensional eigenvectors,

start by solving the eigenvectors of an n x n matrix, i.e., AAT, as follows:

( )( ) ( )

( ) ( )iii

T

iii

T

iii

T

AVAVAA

VAVAAA

VVAA

λ

λ

λ

=

=

=

where Vi and λi respectively represents eigenvectors and eigenvalues of the smaller (nxn) matrix,

ATA. Then, the eigenvector of the larger AAT matrix can be computed by calculating AVi. Store the

eigenvectors in a descending order of eigenvalues as follows:

Page 9: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

9

[ ] ∑=

=

==n

k

k

i

k

i

n

i

k

i

nii v

v

v

v

AVU1

1

2,1 ......... ηηηη

Step 4: Representation of face image using eigenfaces.

From N eigenvectors Vi, only N0 should be chosen, which have the highest eigenvalues. The higher

the eigenvalue, the more characteristic features of a face does the particular eigenvector describe.

Eigenfaces with low eigenvalues can be omitted, as they explain only a small part of characteristic

features of the faces. Determination of N0 eigenfaces, Vi completes, the training phase of the

algorithm. For this step the following computation is used.

( )nk

UW

i

ii

T

k

i .,.........2,1; =−Γ

µ

where Wi represents the weight vector. Note that W(l , i ) denotes the percent that the first

eigenface represents image i, W(2, i) denotes the percent that the second eigenface represents

image i, and so on.

Testing face:

This step is for the classification of a new (unknown) face ГX to one of the classes (known faces). To

classify an input image the following two steps are performed.

First, the new image is transformed into its eigenface components. The resulting weights form the

weight vector, T

X iW as follows:

( ) 0.,.........2,1; NkUw New

T

kk =−Γ= µ

],,,[ 021 N

T

X wwwW L=

Euclidean distance between the two weight vectors D (Wi, Wj) provides a measure of similarity

between the corresponding images i and j. If the Euclidean distance between ГX and other faces

exceeds on average some threshold value θ, one can assume that ГX is no face at all. Otherwise, ГX is

actually a face. The weights form a feature vector. The feature vectors obtained from the training

set is used to train the neural network and feature vector of test image is used to simulate the

neural network.

The Discrete Cosine Transform (DCT)

The DCT is one of many popular techniques in imaging and video compression. The DCT was first

applied in image compression by Ahmed et al. (1974), with categorization into 4 variations by

Page 10: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

10

Wang (1984). The first international standard for image compression, known as the Joint

Photographic Experts Group (JPEG), was established with the DCT encoder and decoder during

1992. For images, the 2-dimensional DCT is used. The DCT breaks down the input sequence

representing the spatial information into a weighted sum of basic cosine sequences and frequency

information.

The main features of the DCT which make it attractive for facial recognition are:

1. Efficient computation, due to its relationship to the Fourier transforms, and

2. Data compression (energy compaction) property for highly correlated images, commonly used in

image/video compression.

Definition of DCT:

The definition of DCT for an N × N image is (Ma et al, 2004; Chellappa et al, 1995):

( ) ( ) ( ) ( ) ( ) ( )

+

+= ∑∑

=

= N

vy

N

uxyxfvuvuF

N

x

N

y 2

12cos

2

12cos,,

1

0

1

0

ππαα

Where

( ) ( )

=

=

0,2

0,1

,

vuN

vuNvu αα

with u, v, x, y = 0, 2, 3,…, N-1, where x and y are spatial coordinates in the sample domain while u, v are coordinates in the transform domain (Ma et al, 2004). f(x, y) is the pixel intensity in row x and

column y. F(u, v) is the DCT coefficient in row u and column v of the DCT matrix.

The first DCT coefficient, F (0, 0) is the average intensity of all the samples in the input image and is

referred to as the Direct Current (DC) component. The remaining elements in F(u, v) each indicate

the amplitude corresponding to the frequency component of f(x, y), and are defined as Alternate

Current (AC) coefficients. It is well known that the DC coefficient is only dependent to the

brightness of the image and is the most affected by variation in illumination. Consequently, by

removing the DC coefficient, DCT coefficients become DC-free (i.e., zero mean) and invariant against

uniform brightness change

For most images, much of the signal energy lies at low frequencies; these appear in the upper left

corner of the DCT. The lower right values represent higher frequencies, and are often small enough

to be neglected with little visible distortion, which indicates compression is achieved. For example,

consider the labeling of 5x5 DCT coefficients in Fig. 4, where the most visually significant

information being concentrated in the first few DCT coefficients ordered in a zigzag pattern from

the top left corner.

Page 11: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

11

0 1 5 6 14

2 4 7 13 15

3 8 12 16 21

9 11 17 20 22

10 18 19 23 24

Fig 4. Labeling of 5 X 5 DCT coefficients

Information concentration in the top left corner is due to the correlation between image and DCT

properties. For images, the most visually significant frequencies are in the low-mid range, with

higher frequencies giving finer details of the image. For the 2-D DCT, coefficients correspond to

sinusoids of frequencies increasing from left to right and top to bottom. Therefore, those in the

upper corner are the coefficients associated with the lowest frequencies.

Proposed System:

Figure 5 gives the block diagram representation of the proposed face recognition system, which

includes the database image and test image as inputs to the algorithm. To compare the test image

with the database/sample image, the following steps are taken:

Creation of a signature set:

The following steps are carried out to generate the signature set:

1) Magnify the block to the sample image size (128 x 128 pixels)

2) Obtain the DCT of the magnified block

3) Derive the upper triangular block of the DCT matrix corresponding to the first 2080 coefficients.

The first two steps both correspond to matrix multiplications. The magnification is implemented

using bilinear interpolation matrices, My and Mx, and the DCT is implemented using the DCT matrix

DCT128. The third step is done by first truncating the 128 x 128 DCT matrix to a 64 x 64 matrix and

then choosing the upper left triangle. The truncation is also implemented by matrix multiplication

with matrix I64 where I64 is a 128 by 64 matrix with 1's in the first 64 diagonal elements and 0's

elsewhere.

Page 12: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

12

Fig 5. Block diagram representation of DCT analysis

In summary, the procedure is as follows:

Let p = Test image block matrix and

s = length of side of test image block

P= My p Mx where P is the magnified Block,

PDCT = DCT128T P DCT128 where PDCT DCT of Magnified Block

PDCT64 = I64T PDCT I64 where PDCT64 is Truncated DCT

To reduce the calculations, the above process can be simplified using the simplified equations:

PDCT64 = Hleft p Hright

where Hleft = I64T DCT128

TMy and Hright = DCT128 Mx I64

This reduces the six matrix multiplications to a 64 x s matrix multiplication on the left side and an

sx64 matrix multiplication on the right side. After this multiplication, the upper left triangle of the

matrix PDCT64 (including the diagonal) is stored in a signature set vector, V. The processing shown

above represents several maintenance steps that were necessary to ensure that all images were in

the correct format as required by the algorithm.

For the comparison, a squared error comparison of the vector V and the sample images signature

set vectors was taken(S = signature set vector of a sample image), as follows:

Error = Σ (VI - Si) 2

Page 13: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

13

The implementation of the above algorithm in DSP is as represented in Fig. 6

Start

Make Database of Images

Extract DCT coefficients

512x512 input array

Divide into 32 frames each of 16x16

Find DCT of Each frame(2080x32 coefficients)

Extract maximum 100coeficiients Check if match occurs

Maximum value of ACC

Find Autocorrelation coefficient

Comparison

Store this

Extract from Matlab Extract from DSP

Display result

Fig 6. The flow chart of DCT-based comparison

4. Results and Analysis

The experimental results obtained from the proposed algorithms are highlighted in this section.

Experiments are carried out using MATLAB simulations, a PC-based real-time system and DSP-

based Prototype system. Finally, the proposed system is validated in real-time by taking a simple

case study of automatically opening and closing of the doors.

PCA Analysis

The training set, the database image considered and the eigenfaces generated with calculated

eigenvalues that are not zero is given in Figures 7 and 8 respectively.

Page 14: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

14

Fig 7. Training set for Processing Fig 8. Generated Eigenfaces

Figure 9 represents the “input image”, i.e., the image to be tested against database images and its

reconstructed image in accordance with the Eigenface of database images given in Fig. 10.

Fig 9. Input Image Fig 10. Reconstructed Image

The reconstructed image is compared with the mean image of database images. The mathematical

tool used for this purpose is the minimum Euclidean distance. By training the database images we

define a threshold value. If the minimum Euclidean distance of input image is within the given

threshold, it’s a known face or present in the database. If the minimum Euclidean distance of input

image is greater than the threshold value, it’s an unknown face or not in the database.

DCT Analysis

Similar analysis as mentioned above is done in MATLAB using the DCT technique. For this analysis,

a database of images shown in Fig. 11 of size 512x512 is created. For each image in the database its

DCT coefficients are generated in MATLAB. Out of the generated 2080 DCT coefficients, only a

maximum of 32 coefficients were collected.

Page 15: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

15

Fig 11. Database of images (each of 512x512) Fig 12. Search image

Next the image to be tested against the database, known as the search image, shown in Fig. 12, is

obtained. Next, the DCT coefficients of input image are obtained as for the database images.

The coefficients of each image in the database are compared with the coefficients of search image.

For comparison, the autocorrelation comparison method is used. The match occurs when the

autocorrelation value is maximum. The result of the comparison is displayed as shown in Fig. 13.

Fig 13. Comparison result

PC-Based System

The above results demonstrated in MATLAB are again repeated by implementing a PC-based

system using a webcam to capture images in real time. Both PCA and DCT analysis are carried out in

real-time using database images shown in Figures 7 and 11 and test images given in Figures 9 and

12. Excellent matches were obtained in this real-time PC-based system. The experiment is repeated

by changing the search images. Exact classification of the images was obtained using both PCA and

DCT algorithms.

5. Hardware Implementation

The goal of hardware implementation is to develop a prototype DSP-based platform to identify the

individual or multiple faces in a still image and achieve an acceptable successful recognition rate

while performing in real-time. The signal processing sub-system in this proposed technique is

simplified into two main stages, i.e., face detection and recognition. Here, the DSP platform used is

TMS 320 C6713 DSP from Texas Instruments. TMS320C 6713 is a high-speed 32 bit floating point

processor that runs at a frequency of 200 MHz.

Page 16: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

16

This system is organized to capture an image sequence, find the features of face in the images, and

recognize and verify a person. Figure 14 shows the real-time experimental setup integrated around

the developed hardware and a digital camera interfaced to DSP to capture real time images. PCA

and DCT algorithms are coded in DSP and validated in real-time. For this the database images given

in section 4 are used to train the network. Next, the PCA and DCT algorithms are validated in real-

time by inputting the search images through the digital camera.

Fig 14. Prototype facial recognition system and its experimental setup

For PCA analysis, in the real-time system, the database image shown in Fig. 7 and the search image

given in Fig. 9 are used during the training and testing phases, respectively. Excellent identification

is obtained similar to MATLAB-simulated results and the PC-based system.

gain to apply DCT technique, a database of images shown in Fig. 11, of size 512x512 was created.

For each image in the database the DCT coefficients generated in the MATLAB are used as the input

to the DSP processor. Similar to MATLAB analysis, only max 32 DCT coefficients out of 2080

coefficients are collected. Search image shown in Fig. 12 is used for comparison and accurate

matching between the search image and database image was obtained.

Our analysis of the above two techniques and their results found that the PCA-based approach

excels in speed, simplicity and learning capabilities. However, its implementation in DSP requires a

search image as input, which can be obtained only through the daughter cord. This makes the

system quite expensive. In addition, images usually require large memory space for storage. As the

number of images increases in the database, the memory size required also increases. This

necessitates the additional interfacing of external memory to DSP. Therefore the PCA-based

approach is not so effective while implementing in DSP.

The DCT technique is based on pattern recognition for boundary conditions. It involves the

generation of DCT coefficients, which have high energy-packing properties. Since it requires only a

few coefficients, it is easier to extract them using MATLAB. Next, DCT coefficients obtained from

MATLAB programme are stored in DSP and used for recognition procedure. Therefore, the DCT

algorithm can be effectively implemented in DSP. For hardware details of TMS320C6713DSK

processor, refer to the user manual of “DSK C6713” from Texas Instruments.

Page 17: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

17

For both PCA and DCT analysis, user-friendly interaction with the system is developed by using

LEDs and making them glow if a match occurs, i.e., if the image is present in the database (a known

face). Also a beep sound is generated when the match occurs through the audio line output of the

DSP processor.

Finally, for demonstration purposes, a case study of automatic opening and closing of the door is

considered. It is proved that the developed algorithms are capable of recognizing the face

accurately and open/close the door depending on the search image.

6. Conclusion

The design and development of automatic facial recognition system is developed and validated in

real-time. Both PCA and DCT techniques are used for facial recognition and verification. At first, the

MATLAB code was generated and validated. Next, real-time PC-based and DSP-based prototype

systems were designed and developed. Finally the algorithms were validated in real-time using

different test images. Also a case study of automatic opening and closing of the door is considered

and proved that both algorithms are capable of identifying someone reaching the door, and

performing the assigned job based on identification of the image. Finally, the result has confirmed

that the proposed system can be applied to various applications impossible in conventional PC-

based systems.

References Pentland. A, Moghaddam, B., Starner, T., and Turk, M. 1994. Viewbased and modular eigenspaces for

recognition. In Proc. IEEE Computer Soc. Conf. on Computer Vision and Patt. Recog., 84–91.

Akamatsu, S., Sasaki, T., Fukamachi, H., and Suenaga, Y. 1991. A robust face identification scheme—KL

expansion of an invariant feature space. In SPIE Proc.: Intell. Robots and Computer Vision X. Algorithms

and Techn., 1607:71–84.

Belhumeur, P.N., Hespanha, J.P., and Kriegman, D.J., 1997. Eigenfaces vs. fisherfaces: Recognition using class

specific linear projection. IEEETrans. onPatt. Anal. andMach. Intel., 19(7):711– 720.

Brunelli, R. and Poggio, T. 1993. Face recognition: Features versus templates. IEEE Trans. on Patt. Anal. and

Mach. Intel., 15(10):1042–1052.

http://dx.doi.org/10.1109/34.254061

Burt, P. 1989. Multiresolution techniques for image representation, analysis, and 'smart' transmission. In SPIE

Proc.: Visual Comm. and Image Proc. IV., 1199:2–15.

Ma. L, Xiao. Y, Khorasani. K, and Ward. R. K, 2004. A new facial expression recognition technique using 2D

DCT and k-means algorithm, in Proc. International Conference on Image Processing, : 1269- 1272

Chellappa, R.,Wilson, C., and Sirohey, S. 1995. Human and machine recognition of faces: A survey. In Proc.

IEEE, 83(5):705–740.

http://dx.doi.org/10.1109/5.381842

Craw, I., Tock, D., and Bennett, A. 1992. Finding face features. In Proc. 2nd Europe. Conf. on Computer Vision,

pp. 92–96.

De Vel, O. and Aeberhard, S., 1999,"Line-based face recognition under varying poses". Pattern Analysis and

Machine Intelligence, IEEE Transactions on, 21:10, 1081 -1088.

http://dx.doi.org/10.1109/34.799912

Duda, R.O. and Hart, P.E. 1973. Pattern Classification and Scene Analysis. Wiley: New York, NY.

Govindaraju, V., Srihari, S., and Sher, D. 1990. A Computational model for face location. In Proc. 3rd Int. Conf.

on ComputerVision, pp. 718–721.

Page 18: Real-Time Facial Recognition System—Design, Implementation and

Dr. M. Meenakshi / Journal of Signal Processing Theory and Applications (2013) 1: 1-18

18

Harmon, L.D. and Hunt, W.F., 1977. Automatic recognition of human face profiles. Computer Graphics and

Image Proc., 6:135– 156.

http://dx.doi.org/10.1016/S0146-664X(77)80009-9

Kanade, T. 1973. Picture processing system by computer complex and recognition of human faces. Ph.D.

Thesis, Department of Information Science, Kyoto University, Japan.

Kelly,M. 1970.Visual identification of people by computer. Stanford AI Proj., Stanford, CA, Tech. Rep. AI-130.

Kirby,M. and Sirvoich, L. 1990. Application of the Karhunen-Loeve procedure for the characterization of

human faces. IEEE Trans. On Patt. Anal. and Machine Intell., 12:103–108.

http://dx.doi.org/10.1109/34.41390

Lades, M.,Vorbruggen, J., Buhmann, J., Lange, J., von der Malsburg, C., and Wurtz, R. 1993. Distortion invariant

object recognition in the dynamic link architecture. IEEE Trans. on Computers, 42:300– 311.

http://dx.doi.org/10.1109/12.210173

Lu, K. Plataniotis N., and Venetsanopoulos A. N., 2003. Face recognition using LDA-Based algorithms", IEEE

Transactions on Neural Networks, 14:195–200.

http://dx.doi.org/10.1109/TNN.2002.806647

PMid:18238001

Nefian A. V., 1999, "A Hidden Markov Model-Based Approach for Face Detection and Recognition", Ph. D.

Thesis, Georgia Institute of Technology. Kelly,M. 1970.Visual identification of people by computer.

Stanford AI Proj., Stanford, CA, Tech. Rep. AI-130.

P. J Phillips, H Moon, P Rauss, and SA Rizvi, 1997. The FERET Evaluation Methodology for Face Recognition

Algorithms, in Proceedings Conference on Computer Vision and Pattern Recognition, 137–143. A

Pentland, A.; Choudhury, T., 2000, "Face recognition for smart environments ". Computer, 33:2, 50 -55.

http://dx.doi.org/10.1109/2.820039

Rizvi. S.A, Phillips. P.J and Moon. H, 1998. The FERET Verification Testing Protocol for Face Recognition

Algorithms, in Proceedings of International Conference on Automatic Face and Gesture Recognition.

Sakai, T., Nagao, M., and Fujibayashi, S. 1969. Line extraction and pattern recognition in a photograph. Patt.

Recog., 1:233–248.

http://dx.doi.org/10.1016/0031-3203(69)90006-5

Sudhanshu Tripathi, Leena Singh and Himakshi Arora, 2009. Face Recognition Machine Vision System Using

Eigenfaces, International Journal of Recent Trends in Engineering, 2:2

Swets, D. and Weng, J. 1996. Using discriminant eigenfeatures for image retrieval. IEEE Trans. on Pattern.

Anal. and Mach. Intell., 18(8):831–836.

http://dx.doi.org/10.1109/34.531802

Riklin. T Raviv and Shashua. A, 1999. The Quotient Image Class Based Re-rendering and Recognition With

Varying Illuminations in Proceedings of Conference on Computer Vision and Pattern Recognition, 566-

571.

Turk, M. and Pentland, A. 1991. Face recognition using eigenfaces. In Proc. Int. Conf. on Comp. Vision and Patt.

Recog. (CVPR'91), pp. 586–591.

.Zhao. W, Chellappa. R., Phillips .P.J., A. Rosenfeld, 2003. Face recognition: a literature survey, ACM Comput.

Surv. 35 (4) 399–459.

http://dx.doi.org/10.1145/954339.954342

Yongsheng Gao and Leung, M.K.H., 2002. "Face recognition using line edge map". Pattern Analysis and

Machine Intelligence, IEEE Transactions on, 24:6, 764 -779.

Yuille A. L., Cohen D. S. and Hallianan P. W., 1992, "Feature Extraction from Faces Using Deformable

Templates", International Journal of Computer Vision, 8(2):99–111.

http://dx.doi.org/10.1007/BF00127169

Yuille, A., Cohen, D., and Hallinan, P. 1989. Feature extraction from faces using deformable templates. In Proc.

IEEE Computer Soc. Conf. on Computer Vision and Patt. Recog., pp. 104–109.

Ziad M, Hafed and Martin D. Levine, 2001. Face Recognition Using the Discrete Cosine Transform,

International Journal of Computer Vision, 43(3):167–188.

http://dx.doi.org/10.1023/A:1011183429707