An Improved Difference of Gaussian Filter in

JOURNAL OF MULTIMEDIA, VOL. 7, NO. 6, DECEMBER 2012
429
An Improved Difference of Gaussian Filter in
Face Recognition
Shoujia Wang
College of Computer Science and Technology, Jilin University, Changchun, China 130012
E-mail: [email protected]
Wenhui Li1, Ying Wang, Yuanyuan Jiang, Shan Jiang, Ruilin Zhao
College of Computer Science and Technology, Jilin University, Changchun, China 130012
1
Corresponding author’s e-mail: [email protected]
Abstract—In this paper, we analyze an improved DOG
filter with different parameters in horizontal and vertical
directions and the improved filter uses oval recognition
domain instead of round recognition domain of classic
DOG filter. The improved filter is used to compare with
major illumination pretreatment methods. The experiment
result shows the improved method has better recognition
and false detection rate.
Index Terms—face recognition, Illumination pretreatment,
Difference of Gaussian filter, PCA, LDA
I. INTRODUCTION
[1]
Since Bledsoe submits his technical report of facial
recognition in 1966, algorithms of face recognition
become a popularity research field of computer science
[2][3]
. In nearly 50 years, many researchers study in this
field and find lots of achievements[4][5]. When FERET
(Face Recognition Technology) shows its report of face
recognition algorithms in year 1996, scientists find that
the main researches are not robust enough with
illumination and pose. Now illumination pretreatment is
an important research domain of face recognition.
Nowadays, we always use the following methods to
process illumination pretreatment. They are histogram
equalization (HE for short)[6], Gamma correction (GC for
short)[7], local contrast enhancement (LCE for short)[8],
discrete cosine transform (DCT for short)[9] and
difference of Gaussian filter (DOG for short)[10], etc. All
these methods are used to improve face recognition rate,
but there have some disadvantages.
The main idea of HE is to mapping grayscales of an
original image’s pixels to another image with probability
density uniform distribution of grayscales. This method
could weaken impact of illumination from mapping. But
it decreases grayscales and leads to lose some details.
The Algorithm GC controls luminosity of original
images with parameter Gamma. Thus, it decreases
impact of illumination. But the correction value cannot
solve practical problems when illumination changes with
highlight, transition and shade. Moreover, it is always a
© 2012 ACADEMY PUBLISHER
doi:10.4304/jmm.7.6.429-433
bit distortion when an image changes with gamma
correction. Especially, the distortion is obvious with
colorful images.
LCE algorithm makes statistics of mean luminance of
every area. Then it makes logarithm transformation by
luminance of the calculated pixel and mean luminance of
the pixel’s area. Though LCE could strengthen local
image details, the disadvantage is that it cannot improve
dynamic range of whole image.
DCT is an orthogonal transformation. When we use
DCT parameters to rebuild original image, we save some
low frequency components of discrete cosine transform
and drop lots of high frequency components. It uses
inverse transformation to get a resume image which is
similar to original image. The resume image is
inconspicuous distortion because it contains most
important information. But it depends on original image
seriously and it needs long time for recognition.
DOG filter is a kind of filter that makes convolution
operations with original grey image to smooth original
image in space domain. Its transfer functions are two
Gaussian differences with different widths.
In this paper, by compared with these algorithms of
face recognition, we give an improved DOG filter to
process illumination pretreatment at first. Secondly, we
combine the improved DOG filter with PCA-LDA
methods. We use PCA to reduce dimensions and LDA to
recognize faces. Then we compare all these five methods
which are combined with PCA-LDA. All recognition
images are from the Yale B face database and AR face
database. Finally, we study results of all experiment and
find that the improved DOG filter shows best behavior.
The improved method increases recognition rate by same
poor illumination.
Ⅱ. IMPROVED DOG FILTER
A DOG filter image is constructed by convolutions of
an original image and DOG filter. In this paper,
2-dimensional DOG filter is used usually. We know the
formula of 2-dimensional Gaussian function is formula
(1).
430
JOURNAL OF MULTIMEDIA, VOL. 7, NO. 6, DECEMBER 2012
f δ ( x, y ) = e
−
x2 + y 2
2δ
2
(1)
So when δ1 and δ2 are standard deviations, DOG filter
of 2-dimensional Gaussian function is shown in formula
(2).
D(x, y, δ1, δ2) =
1
2πδ
2
1
−
e
x2 + y 2
2δ12
-
1
2πδ
2
2
e
−
x2 + y 2
2δ 22
(2)
It is always used δ1=δ2/1.6 because DOG filter
approximates to Laplacian of Gaussian filter[11] (for short
LOG).
With different δ1, δ2, A and B, a DOG filter can
structure band pass filters by different forms. We can
define these 4 parameters by formula (3).
W0 = min{| u |:
dE (u )
= 0, u ≠ 0}
du
(3)
As we known, E(u) is envelope of frequency spectrum
and W0 is width of frequency band. When λ is the gain
of filter, we divide parameters λ and u to two conditions.
One is 0≤λ<1 and 0≤u<W0, the other is λ≥1 and u>W0.
As we known, when δ1→+∞, the transfer function can
−
x2 + y2
2δ 2
simplify to Dδ(x, y) =1- e
. Then we can make
inverse Fourier transform to get impulse response of
−
x2 + y2
2α 2
DOG. Its formula is g(x, y) =σ(x, y)- e
/ 2πα
with α=1/2πδ and σ(x, y) is a unit impulse function.
Moreover, we use convolution kernel to filter signal by
convolution integral, we get h(x, y) =
∫
∞
-∞
2
H ( x, y ) g(x-ω,
y-ω)dω. When signal’s frequency is larger than W0, the
signal is in pass band of filter and gain=1. In other words,
it means that component of high frequency passed with
distortion free[12]. Of course, when signal’s frequency
<W0, the gain is smaller than 1 and decreases by
Gaussian curve. In limited condition, when frequency =0,
we find gain=0. To consider about character of σ(x, y),
−
x2 + y2
2α 2
/ 2πα ).
we get h(x, y) = H(x, y)·(1- e
Then we can easily find that fδ(x, y) is mapping a circle
in xOy surface with center origin when the original
function f δ ( x, y ) = e
−
x2 + y 2
2δ 2
2
. So D(x, y, δ1, δ2) has
similar characters to fδ(x, y). It is to say that there are
similar characters in a DOG filter which is constructed
by D(x, y, δ1, δ2). It means that all filters are symmetry
by origin. So when gravity center of a face is nearly in
center of an image, DOG filter shows its best
performance. In other words, images must be nearly
symmetry with both horizontal and vertical. As we
known, faces of images are always nearly symmetry with
vertical in face recognition. But it is less symmetry with
horizontal[13]. So we design an improved DOG filter.
We changed 2-dimensional Gaussian function
© 2012 ACADEMY PUBLISHER
f δ ( x, y ) = e
−
x2 + y 2
2δ 2
to f δ x ,δ y ( x, y ) = e
1 x2 y2
− ( 2+ 2 )
2 δx δy
1
1
.
Then we find that improved Gaussian function in
formula (4) which is constructed by formula (2).
Dδ x1,δ x 2,δ y1,δ y 2 ( x, y ) =
1
2πδ x1δ y1
e
1 x2 y 2
− ( 2 + 2 )
2 δx δ y
1
1
-
1
2πδ x2 δ y2
e
1 x2 y 2
− ( 2 + 2 )
2 δx δ y
2
2
(4)
So we have to find δx1 and δy1. At first, we give an
adjustable method to find δx1. We consider about limit
condition of a point (x, y).
1. We assume nearby of point to filter is smooth, in
other words, grey values of every point are same. Then
we get that D(x, y)=0. D(x, y)=I(x, y)-M(x, y) is
difference between grey of (x, y) and mean grey value at
(x, y). M(x, y) is mean grey value and I(x, y) is grey of
point (x, y).
2. We assume the point to filter is an isolate noise point
in smooth area. Then we get D(x, y) ≈ |I(x, y)-I(x-1, y-1)|.
It means that D(x, y) is changed by noise.
From conditions 1 and 2, we know that D(x, y) is
inverse proportion to smoothness. To consider with
intensity dependent spread (IDS for short)[14], we find
variance σ2(x, y) = 1/I(x, y). Then we can calculate δx1.
When we find the proportion relation of δx1 and δy1, we
define proportion R as formula (5).
R = k /(k + avg ( D(i, j ) 2 )) (k is proportion factor) (5)
So we find δy1=R·δx1. Moreover, δx2 and δy2 are
calculated by similar steps. So we can use formula (4) to
design an improved DOG filter.
Ⅲ. FACE RECOGNITION ALGORITHM AND PROCESS
In this paper, we use principal component analysis
algorithm (PCA for short) and linear discriminant
analysis (LDA for short) algorithm to recognize faces.
When we make standardization of training object by
X=(X-Xavg)/D1/2, we get principal component by
UT(XXT)U=Λ. Hereinto, X is training sample set with
size N×P. N is sample and P is size of it. Xavg is mean
image of X and D is variance. Λ is a diagonal matrix
make up of eigenvalues and U make up of eigenvectors.
To select eigenvalue Um from the first m eigenvalues,
we get X’s mapping is P=UmXXT. For each image Xt, we
can make recognition by compare its mapping to training
sets. It is PCA algorithm.
LDA is another algorithm of face recognition. We
design a set of linear transform and get the most
discriminatingly characters of low-dimensional from
high-dimensional space. So the best mapping function is
W=arg max |WTSBW/WTSWW|. SB is a dispersion matrix
between different sample classes and Sw is in same
sample class. Then we can solve W by equation
SBWi=λiSWWi.
In this paper, we use improved DOG to make
pretreatment at first. Secondly, we get eigen-face
subspace by PCA and LDA. Then, we combine them to
JOURNAL OF MULTIMEDIA, VOL. 7, NO. 6, DECEMBER 2012
PCA-LDA fusion character space. Moreover, we make
mapping of training and test samples to get recognition
characters. Finally, we make recognition by nearestneighbor criterion.
So we gain our process of recognition in algorithm a
and b.
Algorithm a. Training Process
Step 1. Get training sample set;
Step 2. Use improved DOG to make pretreatment;
Step 3. Construct covariance matrix;
Step 4. Solve eigenvectors’ dimension to satisfy
contribution rate;
Step 5. Solve dispersion matrix in same sample class
and different sample classes;
Step 6. Solve mapping matrix of LDA;
Step 7. Mapping sample average value of every class
and get final sample.
Algorithm b. Recognition Process
Step 1. Get training sample set;
Step 2. Use improved DOG to make pretreatment;
Step 3. Use the same PCA as training to reduce
dimensions;
Step 4. Use mapping matrix of LDA to map the image
with dimensions reduced to subspace;
Step 5. Compare it with the mapping of sample by
Euclidean distance to find recognition result.
431
images are divided into 4 sets. Set a is images with
normal expressions and illuminations and set b is images
with different expressions and normal illuminations. The
other two are with normal expressions and different
illuminations. Illuminations in set c are changed by one
side and set d is changed by both two sides. The number
of training images is 300. We use images from 50 people
and 6 images of each person. Their ids are 1, 2, 3, 5, 6
and 7. The number of testing images is 300 too. We also
use 50 people and 6 images for each one. Their ids are
14, 15, 16, 18, 19 and 20. Images with id 1 and 14
belong to set a. Images with id 2, 3, 15, 16 belong to set
b. Images with id 5, 6, 18, 19 belong to set c and images
with id 7 and 20 belong to set d. It is shown in figure 2.
Fig.2 AR face database
Experiment. Compare with different pretreatment
illumination algorithms
We test 6 algorithms in figure 3. Figure 3a is an
original image, 3b is processed with HE, 3c is processed
with GC, 3d is processed with DCT, 3e is processed with
LCE, 3f is processed with DOG and 3g is processed with
improved DOG algorithm.
Ⅳ. EXPERIMENT AND RESULT
CPU of testing PC is Intel(R) Core(TM)2 Duo CPU
E7200 @ 2.53GHz, display card is ATI Radeon HD
2400 PRO and EMS memory is 1GB. OS is Microsoft
Windows XP Professional (SP3) and utility software is
Microsoft Visual Studio 2005. Face databases are Yale B
and AR face database.
Yale B face database is a widely used to test
illumination of face images. We select 10 people to be
experiment objects in this paper. We choose 12 images
with different illumination and angle of every object.
Then we divide them to 5 subsets by angle. Angle is 10
degrees in subset 1, 20 degrees in subset 2, 40 degrees in
subset 3, 60 degrees in subset 4 and 90 degrees in subset
5. In our experiment, we select 600 images to training.
Every image’s size is 640×480. We select 120 images to
recognize. Every image’s size is 32×38. It is shown in
figure 1.
Fig.1 Yale B face database
Images in AR database are all shot by different
conditions just like time, angle, expression and detail of
face. In this paper, we select 50 people’s images in the
experiment. We choose 8 images of every person. The 8
a
b
d
e
f
g
Fig.3 The original image and 5 images with different processing
In order to find the best algorithm with different
illumination, we use LDA algorithm to assist recognize
300 images in AR database. By test all these algorithms
in recognition, we find improved DOG is the most
suitable algorithm in condition with all illuminations.
The test results are in table 1.
TABLEⅠ
COMPARE WITH 6 PRETREATMENT ALGORITHMS
Pretreatment
Algorithms
HE
Successful
Recognition
260
Recognition
Rate
0.867
GC
265
0.883
DCT
266
0.891
LCE
229
0.763
DOG
268
0.893
Improved DOG
268
0.895
Analysis of the result
Figure 3a is a dark image. Figure 3b transforms
histogram to uniform distribution with stochastic
distribution in figure 3a. Though the transformation
TABLE Ⅱ
RECOGNITION RADIO
© 2012 ACADEMY PUBLISHER
c
432
JOURNAL OF MULTIMEDIA, VOL. 7, NO. 6, DECEMBER 2012
Contribution
80
Rate(%)
85
90
95
Character
Recognition
Character
Recognition
Character
Recognition
Character
Recognition
Dimension
Rate(%)
Dimension
Rate(%)
Dimension
Rate(%)
Dimension
Rate(%)
HE
21
80.3
31
84.6
50
91.6
92
94.3
GC
23
83.2
33
85.9
52
90.7
93
94.9
LCE
23
80
33
83.3
52
85.6
93
89.3
DOG
21
82.3
31
87.6
49
94.7
90
96.3
22
83.8
32
88.9
50
95.7
913
97.2
Improved
DOG
TABLE Ⅲ
MISS RECOGNITION RADIO
Contribution
80
Rate(%)
Character
Dimension
85
Miss
Recognition
Rate(%)
90
Miss
Character
Dimension
Recognition
Rate(%)
Character
Dimension
95
Miss
Recognition
Rate(%)
Character
Dimension
Miss
Recognition
Rate(%)
HE
20
6
32
5.67
50
4.12
93
1.93
GC
23
5
33
4.27
52
3.9
93
1.8
LCE
23
8
33
7
52
7
93
5
DOG
21
8
31
6.67
49
4
90
2.33
21
4
31
4.11
50
3.6
91
1.52
Improved
DOG
TABLE Ⅳ
RECOGNITION TIME
Contribution
80
Rate(%)
85
90
95
Character
Recognition
Character
Recognition
Character
Recognition
Character
Recognition
Dimension
Time(s)
Dimension
Time(s)
Dimension
Time(s)
Dimension
Time(s)
HE
20
0.35
32
0.41
50
0.47
93
0.59
GC
23
0.37
33
0.43
52
0.49
93
0.63
LCE
23
0.44
33
0.48
52
0.53
93
0.61
DOG
21
0.39
31
0.44
49
0.49
90
0.65
21
0.41
31
0.46
50
0.52
91
0.69
Improved
DOG
enhances distribution range of grayscales and whole
luminance, it drops lots of details because of decrement
of grayscale. Figure 3c is transformation by GC. It
enhances luminance in dark part of original image by
γ>1. But the transformation weakens several normal
characters. Figure 3d is processed with DCT. It uses
inverse transformation to get a new image which is
© 2012 ACADEMY PUBLISHER
similar to original image. However, it doesn’t completely
improve the image’s effect because it depends on
original image seriously. When we use LCE in figure 3e,
we find that it shows well effect in area with many
details. But figure 3a is a centralize grayscale image, so
LCE shows ill effect in this kind of images. When we
use DOG and improved DOG to transform original
JOURNAL OF MULTIMEDIA, VOL. 7, NO. 6, DECEMBER 2012
image, we find that successful recognition are better than
others. It is because Gaussian filter has well effect when
illumination is weak or non-uniform. To consider about
practical application, DOG and improved DOG have
more robustness.
Then we use table 2~4 to find the best pretreatments
with PCA-LDA algorithm. We find recognition rate in
table 2, miss recognition rate in table 3 and recognition
time in table 4.
We can find that the improved illumination
pretreatment enhances recognition rate from table 2.
Furthermore, we can see our pretreatment has the best
miss recognition rate from table 3. It means that the
improved DOG filter makes positive effect in face
recognition.
However, we should know that the improved DOG
filter needs more time to design and recognize. But the
waste time is fewness and character dimension do not
increase much.
433
[5]
[6]
[7]
[8]
[9]
[10]
Ⅴ. CONCLUSION
In this paper, we put forward an improved DOG
algorithm to make illumination pretreatment. To
combine with PCA-LDA reorganization method, we
compare and analyze lots of characters with experiments
of major illumination pretreatment algorithms. The
characters contain recognition number, time, rate, miss
rate and so on. From experiment results, we can see that
the improved DOG algorithm is better than any other
ones based on PCA-LDA algorithm when there are
changes in illumination and expression of images. The
disadvantage is that the improved algorithm needs more
time to calculate convolution operations.
ACKNOWLEDGMENTS
We want to thank any anonymous reviewers’ work for
this paper. This work is supported by the grants from
"National Natural Science Foundation of China" (No.
60873147).
REFERENCES
[1] W. W. Bledsoe, The model method in facial recognition,
Technical report PR1 15, Panoramic Research Inc, Palo
Alto, 1966.
[2] Junfeng Yao, Yu Zhan, Chih-Cheng Hung, Xiaobiao Xie
and Guoli Ji, “Splicing Side and Front Face Images
Seamlessly by Applying Iterative Fusion Algorithm with
n*n Wave-low-pass Filters”. Information, vol. 14, 2011,
pp. 609-620.
[3] Miao Song, Keizo Shinomori and Shiyong Zhang, “How
do Facial Parts Contribute to Expression Perception? An
Answer from the High-level Face Adaptation ”,
Information, vol. 13, 2010, pp. 1947-1956.
[4] Zhao-yi Peng, Yu Zhou, Yan-hui Zhu, Zhi-qiang Wen,
“Application of an Improved Mean Shift Algorithm in
© 2012 ACADEMY PUBLISHER
[11]
[12]
[13]
[14]
[15]
Real-time Facial Expression Recognition”, Journal of
Software, vol. 6, 2011, pp. 100-107.
Chuanxu Wang, “Face Segmentation Based on Skin Color
in Complicated Background and Its Sex Recognition”,
Journal of Software, vol. 6, 2011, pp. 1209-1216.
S. D. Chen and A. R. Ramli, “Minimum Mean Brightness
Error Bi-Histogram Equalization in Contrast
Enhancement”, IEEE Transactions on Consumer
Electronics, vol. 49, 2003, pp. 1310-1319.
S. Shan, W. Gao, B. Cao and D. Zhao, “Illumination
normalization for robust face recognition against varying
lighting conditions”, IEEE International Workshop on
Analysis and Modeling of Faces and Gestures, pp. 157164, 2003.
W. C. Kao, M. C. Hsu and Y. Y. Yang, “Local contrast
enhancement and adaptive feature extraction for
illumination-invariant face recognition” Pattern
Recognition, vol. 43, 2010, pp, 1736-1747.
Z. M. Hafed and M. D. Levine, “Face recognition using
the discrete cosine transform”, International Journal of
Computer Vision, vol. 43, 2001, pp. 167-188.
G. Hua and A. Akbarzadeh, “A robust elastic and partial
matching metric for face recognition”, ICCV, pp. 20822089, September 2009.
E. M. Oehoa. Clustered microcalcification detection using
optimized difference of Gaussians, M.Sc Thesis, Air Force
lnstitute of Technology, 1996.
Zhichao Lian, Meng Joo Er and Juekun Li, “A Novel Face
Recognition Approach under Illumination Variations
Based on Local Binary Pattern”, the 14th international
conference on Computer analysis of images and patterns,
vol. 6855, 2011, pp. 89-96.
Yong Cheng, YingKun Hou and Zuoyong Li, “An
Improved Retina Modeling for Varying Lighting Face
Recognition”, Advances in Intelligent and Soft Computing,
vol. 122, 2012, pp. 563-568.
E. Izquierdo and M. Ghanbari, “Nonlinear gaussian
filtering approach for object segmentation”, Vision, Image
and Signal Processing, vol. 146, 1999, pp. 137-143.
Weina Fu, Zhiwen Xu, Shuai Liu, Xin Wang, Hongchang
Ke, “The capture of moving object in video image”,
Journal of Multimedia, vol. 6, 2011, pp. 518-525.
Shoujia Wang, male, born in 1982,
PhD, his research work include image
processing and patter recognition.
E-mail: [email protected]
Wenhui Li, corresponding author,
male, born in 1961, PhD and Professor,
his research work include computer
graphics, computer vision, image
processing and patter recognition.
E-mail: [email protected]