Face Recognition Technology Using Fast
Fourier Transform (F.F.T) &
Discriminator Power (Dp)
Nada Abdul Karim
AL-Mansour University College
23
24
Face Recognition Technology using F.F.T & D.P. Nada Abdul Karim
Keywords: grayscale, Fast Fourier Transform (FFT), Calculate mean value and
variance.
اﻟﺨﻼﺼﺔ
ﺒﻌد ﺘطﺒﻴق.ﺘﺤوﻻت ﻓورﻴر اﻟﺴرﻴﻌﺔ ﻫﻲ طرﻴﻘﺔ ﻗوﻴﺔ ﻟﻠﺘﺤوﻴﻝ ﻻﺴﺘﺨراج ﺨﺼﺎﺌص ﻤﻨﺎﺴﺒﺔ ﻟﺘﻤﻴﻴز اﻟوﺠوﻩ
ﻓﻲ.( ﻋﻠﻰ ﺼورة اﻟوﺠﻪ اﻟﻛﻠﻴﺔ ﺒﻌض اﻟﻤﻌﺎﻤﻼت ﻴﺘم اﺨﺘﻴﺎرﻫﺎ ﻟﺒﻨﺎء ﺨﺼﺎﺌص ﻤﻌﻴﻨﺔFFT) ﻤﺘﺤوﻻت ﻓورﻴر اﻟﺴرﻴﻌﺔ
اﻟﻤﻌﺎﻤﻼت ذات اﻟﺘردد اﻟواطﺊ ﺴوف ﺘﻬﻤﻝ ﻟﻤوازﻨﺔ او ﻟﻤﻌﺎدﻟﺔ اﻟﺘﺒﺎﻴن اﻟواﻀﺢ ﺤﻴث ان ﻤﻌﺎﻤﻝ اﻟﻘوة،ﺒﻌض اﻟﺤﺎﻻت
،ﻟﻛﻝ اﻟﻤﻌﺎﻤﻼت ﻫﻲ ﻏﻴر ﻤﺘﺸﺎﺒﻬﺔ او ﻤﺘﺴﺎوﻴﺔ وﺒﻌض ﻫذﻩ اﻟﻤﻌﺎﻤﻼ ت ﻴﻤﻛن ﺘﻤﻴﻴزﻫﺎ ﻋن ﻏﻴرﻫﺎ ﻤن اﻟﻤﻌﺎﻤﻼت
.ﺤﻴث ﻴﻤﻛﻨﻨﺎ ﺘﺤﻘﻴق ﻤﻌدﻝ ﺘﻤﻴﻴز ﻋﺎﻟﻲ وﺼﺤﻴﺢ ﺒواﺴطﺔ اﺴﺘﺨدام ﻤﻌﺎﻤﻼت اﻟﻘوة
ﺘم اﻴﺠﺎد ﻤﻌﺎﻤﻝ اﻟﻘوة ﻟﻠﺼورة ﺒﺤﻴث ﺘؤﺨذ اﻟﺼﻔﺎت اﻟﻤؤﺜرة ﻓﻲ اﻟﺼورة وﺘﺨزن ﻫذﻩ اﻟﻘﻴم،ﻓﻲ ﻫذا اﻟﺒﺤث
، ﻗﻴﻤﺔ( ﺘؤﻛد ﻤن ﻨﺠﺎح اﻟطرﻴﻘﺔ اﻟﻤﻘﺘرﺤﺔ50 او)اﻟﺼﻔﺎت( ﻓﻲ ﻗﺎﻋدة ﺒﻴﺎﻨﺎت ﻋﻤﻠﻴﺔ اﺨﺘﻴﺎر ﻤﻌﺎﻤﻝ ﻗوة ﻤﺨﺘﻠﻔﺔ )اﻋﻠﻰ
.وﺘﺴﺘﺨدم ﻫذﻩ اﻟﻘﻴم او )اﻟﺼﻔﺎت( ﻛﺎﺴﺎس ﻟﻠﻤﻘﺎرﻨﺔ ﻤﻊ ﻗﻴم او )ﺼﻔﺎت( اﺨرى ﺠدﻴدة ﻤراد ﺨزﻨﻬﺎ ﻓﻲ ﻗﺎﻋدة اﻟﺒﻴﺎﻨﺎت
Abstract
Fast Fourier Transform (F.F.T) is a powerful transform to extract proper features
for face recognition. After applying FFT to the entire face images, some of the
coefficients are selected to construct feature. In some cases, the low-frequency
coefficients are discarded in order to compensate variations. Since the discrimination
power of all the coefficients is not the same and some of them are discriminant than
other. So we can achieve a higher recognition rate by using discriminant coefficients
(DCs).The proposed approach is data-dependent and is able to find discriminator
power (Dp) for each image, (the higher 50 value) and store these values in database.
The selection of various coefficients confirm the success of the proposed approach.
These coefficients are used as a basis for comparison with other attributes store in
database.
1- Introduction
As one of the most successful applications of image analysis and understanding,
face recognition. Face recognition has recently received significant attention, especially
during last few years [1]. Activities in this field come from its applications in different
areas such as security and surveillance, commercial and law enforcement. Ability for
implementation in real time has intensified the attention to this field. Although research
in the field of face recognition is active over 30 years and considerable successes in face
recognition system have been achieved, still there are unsolved problem in it.
Illumination variation, rotation and facial expression are the basic existing challenges in
this area [2]. However, frequency domain analysis methods such as Fast Fourier
transform (FFT), have been adopted in face recognition. Frequency domain analysis
methods transform the image signals from spatial domain to frequency domain and
analyze the features in frequency domain. Only limited low-frequency components
which contain high energy are selected to represent the image [3].
25
2012 ﺍﻟﺜﺎﻧﻲ ﻭﺍﻟﺜﻼﺛﻮﻥ ﻣﺠﻠﺔ ﻛﻠﻴﺔ ﺑﻐﺪﺍﺩ ﻟﻠﻌﻠﻮﻡ ﺍﻻﻗﺘﺼﺎﺩﻳﺔ ﺍﻟﺠﺎﻣﻌﺔ ﺍﻟﻌﺪﺩ
In this paper, the high value of discriminator power (Dp) means high discrimination
ability of the corresponding coefficient. In other words, it is expected to gain the
maximum recognition rate by using the coefficient that has the maximum discriminator
coefficients. This method has been tested on a database of facial image and achieves a
good performance.
2- Grayscale Image
Grayscale digital image s are referred to as monochrome, or one-color, images. They
U U
contain brightness information only, no color information. The number of bits used for
each pixel determine the number of different brightness levels available. The typical
image contains 8 bits/pixel data, which allows us to have 256 (0 255) different
brightness (gray) levels. This representation provides more than adequate brightness
resolution, in term of the human visual system’s requirements, and provides a “noise
margin” by allowing for approximately twice as many gray levels as required. This
noise margin is useful in real-world applications because of the many different types of
noise (false information in the signal) inherent in real system. Additionally, the 8-bit
representation is typical due to the fact that the byte, which corresponds to 8-bits of
data, is the standard small unit in the world of digital computers [4].
3-Fast Fourier Transform (FFT)
The Fourier Transform is an important image processing tool which is used to
decompose an image into its sine and cosine components. The output of the
transformation represents the image in the Fourier or frequency domain, while the input
U U
image is the spatial domain equivalent. In the Fourier domain image, each point
U U
represents a particular frequency contained in the spatial domain image [5].
The Fourier transform has found numerous uses, including vibration analysis in
mechanical engineering, circuit analysis in electrical engineering, and here in computer
imaging. This transform allows for the decomposition of an image into a weighted sum
of two-dimension sinusoidal terms. Assuming an NxN image, the equation for two-
dimension Fourier transform is [4]:
1 N −1 N −1 − j 2π (ur +uc )
F (u , v ) =
N
∑ ∑ I ( r , c )e
r =0 c =0
N (1)
The base of the natural logarithmic function e is about 2.71828; j the imaginary
coordinate for complex number, equals − 1 the basis functions are sinusoidal in
nature, as can be seen by Euler's identity [4]:
e jx = cos x + j sin x (2)
So we can also write the Fourier transform equation as:
2π
1 N −1 N −1
F (u , v) = ∑∑ I (r , c) cos (ur + vc ) + j sin 2π (ur + vc ) (3)
N r =0 c =0 N N
26
Face Recognition Technology using F.F.T & D.P. Nada Abdul Karim
(u,v) is also complex, with the real part corresponding to the cosine terms and the
imaginary part corresponding to the sine terms. So a complex spectral component is
represented by:
F (u,v) = R(u,v) + jI(u,v) (4)
Where R(u,v) is the real part and I(u,v) is the imaginary part, then we can define the
magnitude and phase of a complex spectral component as [4]:
2 2
MAGNITUDE = [R(u, v )] + [I (u , v )] = F (u , v) (5)
−1 I (u , v )
PHASE = Φ (u , v) = tan (6)
R (u , v)
After perform the transform, to get our original image back, the inverse transform is
applied. So, the inverse Fourier transform is given by [4]:
N −1 N −1 j 2π (ur + vc )
F [F (u , v )] = I (r , c ) =
1
∑ ∑ F (u, v)
−1 e N
(7)
N u =0 v =0
The F-1[ ] Notation represents the inverse transform. This equation illustrates that
the function I(r,c) is represented by a weight sum of the basis functions and that the
transform coefficients F(u,v) are weights. With the inverse Fourier transform, the sign
on the basis functions exponent is changed from -1 to +1. However, this corresponds
only to the phase and not the frequency and magnitude of the basis functions [5].
4- Calculate mean value and variance
The mean is a measure of average gray level in an image and the variance (standard
deviation), which is a measure of average contrast [6]. So instead of using the image
histogram directly for enhancement. We can use instead some statistical parameters
obtainable directly from the histogram. Let r denote a discrete random variable
representing discrete gray-levels in the range [0, L-1], and let p(ri) denote the
normalized histogram component corresponding to the i th value of r. P(ri) as an
estimate of the probability of occurrence of gray level ri. The nth moment of r about its
mean is defined as [6]:
L −1
µn(r) = ∑ ( ri − m ) n p ( ri ) (8)
i =0
27
2012 ﺍﻟﺜﺎﻧﻲ ﻭﺍﻟﺜﻼﺛﻮﻥ ﻣﺠﻠﺔ ﻛﻠﻴﺔ ﺑﻐﺪﺍﺩ ﻟﻠﻌﻠﻮﻡ ﺍﻻﻗﺘﺼﺎﺩﻳﺔ ﺍﻟﺠﺎﻣﻌﺔ ﺍﻟﻌﺪﺩ
Where m is the mean value of r (its average gray level):
L −1
m= ∑ ri p (ri ) (9)
i =0
It follows from Equation (8) and (9) that µ0 = 1 and µ1 = 0. The second moment is
given by [6]:
L −1
µ2(r) = ∑ (ri − m) n p (ri ) (10)
i =0
This expression is considered as the variance of r, which is denoted conventially by
σ (r). The standard deviation is defined simply as the square root of the variance [6].
The global mean and variance are measured over an entire image and are useful
primarily for gross adjustments of overall intensity and contrast. A much more powerful
use of these two measures is in local enhancement, where the local mean and variance are
used as the basis for making changes that depend on characteristics in a predefined region
about each pixel in the image [7].
Let (x,y) be the coordinates of a pixel in an image, and let Sxy denote a
neighbourhood (subimage) of specified size, centered at (x,y). From Eq.(9) the mean
value mSxy of the pixels in Sxy can be compared using the expression
mSxy = ∑ rs, t p(rs, t ) (11)
( s,t )∈Sxy
Where rs,t is the gray level at coordinates (s,t) in the neighbourhood, and p(rs,t) is
the neighbourhood normalized histogram component corresponding to that value of
gray level. Similarly, from Eq.(10), the gray-level variance of the pixels in region Sxy
is given by:
σ Sxy = ∑ [rs, t − mSxy ] p(rs , t )
2 2
(12)
( s,t )∈Sxy
The local mean is a measure of average gray level in neighbourhood Sxy, and the
variance (or standard deviation) is a measure of contrast in that neighbourhood [6]. An
important aspect of image processing using the local mean and variance is the
flexibility they afford in developing simple, yet powerful enhancement techniques
based on statistical measures that have a close, predicable correspondence with image
appearance [8].
28
Face Recognition Technology using F.F.T & D.P. Nada Abdul Karim
29
2012 ﺍﻟﺜﺎﻧﻲ ﻭﺍﻟﺜﻼﺛﻮﻥ ﻣﺠﻠﺔ ﻛﻠﻴﺔ ﺑﻐﺪﺍﺩ ﻟﻠﻌﻠﻮﻡ ﺍﻻﻗﺘﺼﺎﺩﻳﺔ ﺍﻟﺠﺎﻣﻌﺔ ﺍﻟﻌﺪﺩ
7- The algorithm
Step 1: Read two-dimensions bit map images (256) colors and put these images in
two dimensions array. Each value in the matrix represent pixel in the image.
Step 2: read 8 bit Gray scale image.
Step 3: Implement the set matrix, Aij, by choosing the Fast Fourier (FFT)
coefficients of the position i and j for all classes and all images:
xij (1,1) xij (1,2) .... xij (1, c)
xij (2,1) xij (2,2) .... xij (2, c)
.
Aij =
. . .
. . . .
. . . .
xij ( s,1) xij ( s,2) .... xij ( s, c) sxc
Step 4: Calculate the mean value of each class according to the following:-
s
Micj = 1 ∑ Aij ( s, c), c =1,2,….,C (13)
s s =1
Micj: is the mean value of each class.
Step 5: Calculate variance of each class:
Vicj = ∑ (A (s, c ) − Mi c j ) ,
s 2
c = 1,2,…,C (14)
ij
S =1
Vicj: is the variance of each class.
Step 6: Average the variance of all the classes:
1 c
w
Vi j =
C
∑ Vi c j
c =1 (15)
w
Vi j: is the average variance of all class.
Step 7: Calculate the mean of all samples:
1 c s
Mij = ∑ ∑ Aij (s, c)
s × c c =1s =1
(16)
Mij: is the mean of all sample images.
s×c: is the image dimension (width X height)
Step 8: Calculate the variance of all the samples:
2
∑ ∑ (Aij (s, c ) − Mij )
C S
B
Vi j = (17)
c =1s =1
ViBj : is the variance of all sample images.
30
Face Recognition Technology using F.F.T & D.P. Nada Abdul Karim
Step 9: From Eq.(5) and (7) ,we can estimate the discriminator power for location (i,j)
according to the following equation:
V
iB j
D(i,j) = 1 ≤ i ≤ m, 1≤j≤n (18)
VW
i j
ViBj : is the variance of all sample images.
Viwj: is the average variance of all class.
(m,n) : is the image dimensions.
Step 10: Transform two dimensions matrix into one dimension matrix.
So, to transform two dimensions matrix into one dimension, we should apply the
following equation:-
Location (Z) = Y × width + X
Since, location (Z): mean the location in one dimension array.
X: mean the X-axis.
Y: mean the Y-axis.
Z: mean location in one dimension matrix.
Example: Transform two dimensions matrix to one dimension
X-axis
1 2 3 3
(1,1) (1,2) (1,3) (1,4)
1 1 2 3 4
Y-axis (2,1) 2 (2,2) (2,3) (2,4)
5 6 7 8
(3,1) (3,2) (3,3) (3,4)
9 3 10 11 12
Figure (2): show the two dimensions matrix.
From the previous matrix, location (7) is calculated as follows:
Location (Z) = (Y-1) × width + X
Location (7) = (2-1) × 4 + 3
= 1× 4 + 3
=4+3=7
Location (10) is calculated as follows:
Location (Z) = (Y-1) × width + X
Location (10) = (3-1) × 4 + 2
= 2×4+2
= 8 + 2 =10 and so on.
31
2012 ﺍﻟﺜﺎﻧﻲ ﻭﺍﻟﺜﻼﺛﻮﻥ ﻣﺠﻠﺔ ﻛﻠﻴﺔ ﺑﻐﺪﺍﺩ ﻟﻠﻌﻠﻮﻡ ﺍﻻﻗﺘﺼﺎﺩﻳﺔ ﺍﻟﺠﺎﻣﻌﺔ ﺍﻟﻌﺪﺩ
8 - Experimental Results
In this paper, all computers programming works were done by using C++ language
under window. The discriminator power (Dp) of several image tested will be taken as
shown in figure (3), (4) and figure (5) apply the previously described methods as in the
followings tests:-
For the following figure, the discriminator power (Dp) will shown in table (1)
Figure (3): face (1).
For the following figure, the discriminator power will shown in table (2)
Figure (4): face (2).
For the following figure, the discriminator power will shown in table (3)
Figure (5): face (3).
32
Face Recognition Technology using F.F.T & D.P. Nada Abdul Karim
The discriminator power (Dp) of figure (3) is shown below:
location Location Discriminator Location Location Discriminator power
x y power (Dp) x y (Dp)
08 49 4.498 57 48 4.449
39 00 4.495 51 46 4.448
23 43 4.495 17 51 4.446
14 16 4.495 70 57 4.446
31 50 4.493 24 51 4.444
61 27 4.493 12 44 4.434
28 22 4.487 01 29 4.433
38 22 4.484 62 42 4.431
15 43 4.484 12 11 4.424
60 38 4.483 48 53 4.423
02 56 4.482 39 59 4.419
73 14 4.482 41 46 4.418
79 19 4.479 49 30 4.418
51 56 4.476 70 56 4.417
63 08 4.476 15 16 4.417
65 33 4.475 79 29 4.416
40 14 4.471 41 00 4.416
38 11 4.466 46 09 4.413
16 55 4.465 02 58 4.410
57 42 4.465 30 40 4.408
55 41 4.455 12 48 4.409
76 20 4.454 22 19 4.404
54 07 4.454 11 08 4.394
14 28 4.452 35 59 4.394
00 12 4.451
Table (1): show the discriminator power of figure (3)
33
2012 ﺍﻟﺜﺎﻧﻲ ﻭﺍﻟﺜﻼﺛﻮﻥ ﻣﺠﻠﺔ ﻛﻠﻴﺔ ﺑﻐﺪﺍﺩ ﻟﻠﻌﻠﻮﻡ ﺍﻻﻗﺘﺼﺎﺩﻳﺔ ﺍﻟﺠﺎﻣﻌﺔ ﺍﻟﻌﺪﺩ
The discriminator power (Dp) of figure (4) is shown below:
Location Location Discriminator Location Location Discriminator
x y power (Dp) x y power (Dp)
37 49 14.252 01 58 8.079
65 10 12.321 48 44 8.049
77 55 10.575 55 48 8.016
53 46 10.510 41 46 8.014
28 22 10.310 31 28 7.990
20 40 10.031 65 08 7.984
64 57 9.590 68 27 7.914
09 11 9.498 46 03 7.900
36 28 9.066 08 40 7.897
37 35 9.062 58 14 7.872
24 04 8.915 43 24 7.862
25 23 8.850 58 58 7.784
32 50 8.761 27 55 7.779
75 38 8.584 68 06 7.756
32 39 8.526 30 37 7.615
04 36 8.451 66 41 7.712
46 09 8.345 03 30 7.641
53 30 8.333 18 13 7.617
16 06 8.261 10 17 7.607
41 14 8.212 10 25 7.587
79 24 8.212 11 43 7.584
10 05 8.170 76 02 7.563
22 41 8.152 33 52 7.554
51 39 8.138 11 04 7.536
05 07 8.102
Table (2): show the discriminator power of figure (4).
34
Face Recognition Technology using F.F.T & D.P. Nada Abdul Karim
The discriminator power (Dp) of figure (5) is shown below:
Location Location Discriminator Location Location Discriminator
x y power (Dp) x y power (Dp)
05 46 33.628 49 36 13.820
29 32 23.200 03 23 13.789
66 54 21.264 45 45 13.640
66 13 19.931 06 07 13.313
28 20 19.291 17 51 13.274
43 24 19.237 21 37 13.262
68 42 18.429 14 33 13.014
03 24 17.524 63 02 12.755
68 27 17.194 77 19 12.646
26 15 17.168 71 39 12.373
05 33 17.008 42 30 12.305
51 39 16.569 36 35 11.976
00 11 16.176 04 17 11.905
75 17 16.130 68 00 11.809
32 39 15.434 06 31 11.737
02 58 14.961 17 22 11.711
09 22 14.948 14 19 11.688
39 23 14.580 16 42 11.504
66 17 14.369 12 48 11.503
42 01 14.355 78 54 11.472
68 13 14.281 73 12 11.430
15 44 14.238 01 29 11.220
43 44 14.230 08 53 11.185
64 18 14.208 02 45 11.174
66 37 14.166
Table (3): show the discriminator power of figure (5).
35
2012 ﺍﻟﺜﺎﻧﻲ ﻭﺍﻟﺜﻼﺛﻮﻥ ﻣﺠﻠﺔ ﻛﻠﻴﺔ ﺑﻐﺪﺍﺩ ﻟﻠﻌﻠﻮﻡ ﺍﻻﻗﺘﺼﺎﺩﻳﺔ ﺍﻟﺠﺎﻣﻌﺔ ﺍﻟﻌﺪﺩ
9- Conclusions
A summary of some important conclusions is presented as below:
1- Take the most effective attributes in the image (maximum 50 values), store these
values in database and compare these values with other attributes. This will reduce
storage space, quick the search time, decrease computational cost.
2- The purpose of several tested images to determine the locations of each attributes in
the image to take the final results, hence each image take the same locations.
3- In this paper, decrease or increase the attributes in the image according to the nature of
person’s information. So, we can deduce or combine other statistical rules in
mathematical computations.
4- Using (FFT) as an excellent tool for face pattern recognition using personal computer.
FFT function could be easily applied with less time consuming, and is quite simple in
application. So, the parameters obtained for face recognition directly fit to the FFT
function.
11-Refrences
[1] L. Zhao and C. Zou, ” Face recognition using common faces method, Pattern
Recognition”,(2006)
, Vol. 39, No. 11, pp.2218-2222.
[2] [Link],[Link],“Pattern Recognition”, (2010) available at:
http:// [Link] /locate/pr.
[3] E.O., Brigham, (2006), “A New Principle for Fast Fourier Transformation”, New
York: prentice- Hall.
[4] Unbaugh, S. E., “Computer Vision and Image Processing: A practical approach
using CVIP tools”, Prentice-Hall PTR, 1998.
[5] A. Walker and E. Wolfart, “Fast Fourier Transform”, September/27/2010 available
at: http:/ /[Link]/ rd/ HIPR2/ [Link].
U U
[6] Gonzalez, R.C., and Woods, R.E., “Digital Image Processing”, Prentice-Hall. Inc.,
2002.
[7] S. Ben Bernake, “Arithmetic mean”, July/23/2010 available at: http://
[Link]/y/apps/bv0wM F30/?yap_intl=us&yap_js=US.
[8] Darrell,” Standard Deviation & variance”, available at:
[Link]
U U
36