Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
net/publication/228870902
CITATIONS READS
11 12,693
3 authors, including:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Encoding selection for a class of fitness functions based on locus interdependency View project
Robust H∞ Control for Uncertain Nonlinear Active Magnetic Bearing Systems via Takagi-Sugeno Fuzzy Models View project
All content following this page was uploaded by Young Hoon Joo on 19 February 2014.
Abstract: An emotion detection algorithm using frontal facial image is presented in this paper. The algorithm is composed of
three main stages: image processing stage and facial feature extraction stage, and emotion detection stage. In image processing
stage, the face region and facial component is extracted by using fuzzy color filter, virtual face model, and histogram analysis
method. The features for emotion detection are extracted from facial component in facial feature extraction stage. In emotion
detection stage, the fuzzy classifier is adopted to recognize emotion from extracted features. It is shown by experiment results
that the proposed algorithm can detect emotion well.
Keywords: Emotion recognition, facial analysis, feature extraction, fuzzy classifier, virtual face model.
Image processing
achieved by using facial image, voice, body shape, and etc..
Among them, the facial image is most frequently source to
detect emotion. Especially, frontal facial image is commonly
2373
age processing stage, the facial region is extracted and then Algorithm 1: Histogram Segmentation Algorithm
facial components are extracted. In face region extraction al- Data: W = [w1 , . . . , wc ]: histogram input
gorithm, the fuzzy color filter and histogram analysis method d: minimum depth of segment
are used. r: minimum width of segment
It is not easy to recognize the skin color in give image because Result: The largest segment in given histogram W
skin color changes depend on personality and illumination egdebegin =false
condition. However the skin color should be detected by for i = 1 to c do
Q Q
using some type filter to extract the face region. To solve ŵi = −1 k=−r δ(wi+k − e1i+k ) rk=1 u(wi+k − e1i+k ) −
Q−1 2 Qr 2
this difficulty, fuzzy color filter is used. The fuzzy color filter k=−r u(wi+k − ei+k ) k=1 δ(wi+k − ei+k )
is based on fuzzy inference system. The vague skin colors where( (
are represented as fuzzy sets and memorized in fuzzy rules. 0 , −r ≤ i ≤ −1 d , −r ≤ i ≤ −1
e1i = , e2i =
The structure of fuzzy rule is represented as, d ,0 ≤ i ≤ r 0 ,0 ≤ i ≤ r
if ŵi = 1 and egdebegin =false then
Ri : IF x1 is Mi1 and . . . and xm is Mim (1) temp = i
THEN yi (x) = ai , i = 1, . . . , l egdebegin =true
endif
where xi ∈ R is the ith color input, Mi1 , . . . , Mim are the if ŵi = −1 and egdebegin =true then
antecedent fuzzy sets, yi (x) is the consequent output of the (temp, i) is new segment.
ith rule, x = [x1 , . . . , xm ]T ∈ F ⊂ Rm is the input feature egdebegin =false
vector, F is the feature vector set, and ai is the consequent endif
end
parameter and mean the weight for rule i. The output of the
fuzzy rule system is inferred by following equations:
(ci 2
Pl Qm − vi
j −xj )
i=1 e j ai
j=1
Y (x) = (ci −xj )2
(2)
j
Pl Qm − vi
i=1 j=1 e
j D1
where cij and vji are the center the width of membership R1 R2
function of the jth feature in the ith rule.
Finally, the final output of fuzzy color filter Ŷ (x) is calcu-
lated as
R3
Ŷ (x) = αu(Y (x) − Ymin ) (3)
where α is the offset value for gray image, u(x) is the unit Fig. 2. Three regions in VFM.
step function, and Ymin is minimum value of Y (x). There-
fore, if Y (x) is greater than Ymin , the final output has α. The detailed description for Algorithm 1 presented in [2].
Adjusting Ymin , we can change robustness of skin color filter. When face region is extracted, the facial components are ex-
The identification method for fuzzy skin filter is discussed in tracted by using virtual face model (VFM) based histogram
[2] specifically. analysis. VFM is proposed to reduce searching space of his-
When the given image is filtered via fuzzy skin filter, we togram analysis method. VFM contains position and length
can get filtered gray image Ig ⊂ Rm×n . Let zij ∈ Ig is the information of each facial component. In this paper, we used
one pixel include the face region information. By adding the VFM proposed in [2]. There are three face region to extract
gray value of each pixel, we obtain the following horizon- the facial component. By investigate each face region, we can
tal histogram vector o = [o1 , . . . , om ] and vertical histogram extract accurate facial component in fast time. The detailed
vectorp = [p1 , . . . , on ], algorithm is presented in [2].
n
X
oi = zij (4)
3. Feature Extraction for Emotion Recognition
j=1
m The feature vector extraction method is most important key
X
pj = zij . (5) point in emotion recognition problem. Especially, it is nec-
i=1 essary to get good feature vector to make better recognition
accuracy. In the facial feature extraction stage, we propose a
To extract more specific face region, histogram analysis method
new feature vector extraction method. The proposed method
is used. When the gray image is converted into histogram
divide whole image into three feature region: eye region,
vector o and p, the largest segment can be detected via Algo-
mouth region, and auxiliary region. Several information are
rithm 1. The largest segment in o and p becomes the width
extracted from each region: geometric and shape informa-
and height of final face region.
2374
Table 2. Features in mouth region.
Features Description Size
X e1 Xm1 Width of mouth
1×1
X e2 Height of mouth
Xm2 Distance between nose and 1×1
mouth
X se Xse Error between mouth and tem- 6×1
X e3 X e4 plate
(a) (b)
tion. Table 1 shows the specific features of eye region. Eight
features are extracted from eye region. Figure 3 shows the
location for features in eye region. First four features repre-
sent geometric information of eye and eye brow. Remained
four features represent shape information of eye. This shape
(c) (d) information is acquired from comparing with template. Fig-
Fig. 4. Eye template for comparison. ure 4 shows the template for comparison. Table 2 shows
the features in mouth region. Figure 5 shows the position
of features in mouth region. There are two features for ge-
Table 1. Features in eye region. ometric information and six features for shape information.
Features Description Size The template for comparison is shown in Figure 6. Table 3
Xe1 Distance between two eye brow 1×1 shows the features in auxiliary region. If winkles exist, fea-
Xe2 Distance between eye and eye 1×1 tures have one. If winkles do not exist, features have zero.
brow Figure 7 shows the auxiliary region and corresponding fea-
Xe3 Distance between nose and 1×1 tures. Since size of facial image is not static value, we need
eye(left side) to normalize the feature vector. In this paper, all features
Xe4 Distance between nose and 1×1 are normalized by width of facial image. Comparing images
eye(right side) is not easy and spends much time to compute. To overcome
Xse Error between eye and template 4×1 this difficulty, new calculated method is used to compare fa-
cial component image with template. Let Xw , Xh , and Xp
are width, height, and the number of pixel in image. The
similarity S can be calculated as
¯ ¯
¯ Xw Tw ¯¯
S =|Xw − Tw | + |Xh − Th | + ¯¯ − +
Xh Th ¯
|Xp − Tp | (6)
Width of mouth
4. Fuzzy Classifier Based Emotion Detection
Fig. 5. Position of features in mouth region. Generally, pattern recognition problem has specific desired
pattern to recognize. For example, the finger print recog-
2375
represented as,
X a1
Ri : IF x1 is Mi1 and . . . and xm is Mim (7)
THEN yi (x) = ai1 x1 + . . . + aim xm + bi L
i = 1, . . . , l (8)
X a2 X a3 where xi ∈ R is the ith color input, Mi1 , . . . , Mim are the
antecedent fuzzy sets, yi (x) is the consequent output of the
ith rule, x = [x1 , . . . , xm ]T ∈ F ⊂ is the input feature vector,
F is the feature vector set, and aij and bi is the consequent
parameters.
The output of the fuzzy rule system is inferred by following
equations:
Fig. 7. Feature in auxiliary region. Pl
hi (x)ai
Y (x) = Pi=1l
(9)
Table 3. Features in auxiliary region. i=1 hi (x)
m
Y
Features Description Size
hi (x) = µMij (xj ) (10)
Xa1 Existence of winkles between 1×1 j=1
eyes
Xa2 Existence of winkles in left 1×1 where hi (x) is the firing strength of the ith rule and µMij (xj )
cheek is the membership degree of the jth feature of the ith rule.
Xa3 Existence of winkles in left 1×1 The membership function is defined as,
cheek (ci
j −xj )
2
−
vi
µMij = e j (11)
nition problem, definite finger print is given to recognize. where cij is the center and vji is the width of the jth feature
However, there are only vague patterns are given in emotion of the ith rule. For computational convenience, the output
recognition problem. We can’t clearly guarantee that the Y (x) can be represented as following matrix equation:
extracted feature vector represents only one specific emo-
d1 (x) a11 ... a1m b1
tion. Therefore, it is not easy to design the emotion recog- . .
.. .. ..
.
.
nition system. To overcome this difficulty, a fuzzy classifier . .
is adopted in emotion detection stage. The fuzzy classifier H = di (x) , A = ai1 ... aim , B = bi (12)
is one of the most powerful classifier to solve classification .. .. .. ..
. . . .
problem with vague input. The fuzzy classifier can be de-
dl (x) al1 ... alm bl
scribed as set of fuzzy rules. The structure of fuzzy rule is
hi (x)
di (x) = Pl . (13)
j=1 hj (x)
Table 4. Feature values of eye template
Template Xw Xh Xw
Xp Fuzzy classifier design almost means arriving at a hard clas-
Xh
Fig. 4(a) 0.22 0.31 0.66 13.1 sifier because most of the pattern recognition systems require
Fig. 4(b) 0.23 0.24 0.46 9.6 hard labels for objects being classified. In order to convert
Fig. 4(c) 0.23 0.25 0.49 10.5 the soft label Y (x) to the hard label Yc (x), we use the fol-
Fig. 4(d) 0.23 0.25 0.48 11.4 lowing mapping equation:
2376
Algorithm 2: Fuzzy classifier identification algorithm.
for i ∈ {1, 2, . . . , n} do
W ← Calculate variance of the data set Happy Sad
Add following LMI constraints to LMI system,
Vi > 0
Vi < γW
for x ∈ Ci do
Add " following LMI # constrain to LMI system,
γ ?
>0
Vi x − Qi γ Angry Disgust
end
qi , Vi ← Solving the LMI optimization problem
ci ← Vi−1 qi
end
for i ∈ {1, 2, . . . , n} do
for x ∈ F do
T T
hi (x) ← e−(x−ci ) Vi Vi (x−ci )
Surprise
end
end Fig. 9. Five sample image of facial image database
for x ∈ F do
Determine the desired output Yd ← i
Add 5. Experimental Results
" following LMI constraint # to LMI system,
γ ? In the experiment, the performance of the proposed emotion
>0 detection algorithm is evaluated. To evaluate the perfor-
Yd − H T (Ax + B) I
end mance, 150 facial images are acquired from 20 men and 20
A, B ← Solving LMI optimization problem by using women. To evaluate the performance, we make facial im-
interior point method. age database consist of 20 men and 10 women. Under same
position and slightly different illumination condition, five fa-
cial images representing five emotions are acquired from each
person. Figure 9 shows the five sample images of database.
The used five emotions are happy, sad, disgust, surprise,
and angry. To detect human emotion, following algorithm
is used. Notice that the proposed database is not easy to
detect emotion because there are no limitation for hair style
and wearing glasses. Moreover, we can’t guarantee that the
acquired facial image express accurate corresponding emo-
tion since all people in the database is normal people. How-
60 ever, most of all facial images represent corresponding emo-
tion surely. The whole emotion detection procedure can be
50
described as following steps:
Feature value
40
Step 1 Apply fuzzy color filter and extract face region by
30 the method of histogram analysis
20
Step 2 Apply color filter and extract facial component by
using VFM and histogram analysis method.
10
Step 3 Extract feature vector from facial component.
0 Step 4 Identify fuzzy classifier with the extracted feature
100 vector.
15 Step 5 Test fuzzy classifier
50 10
Data
Features
From Step 1 and Step 2, the facial components of 124 facial
5
0 0 images are correctly extracted. We failed to extract facial
component from another 36 facial images. Therefore, the
performance of the facial image analysis algorithm amounts
Fig. 8. Facial features extracted from 124 facial image
82.7 %. Feature vectors are then extracted from 124 facial
images. Figure 8 shows the surface of extracted feature vec-
tor. In Step 4, the fuzzy classifiers with five rules are trained
2377
extract feature for emotion detection, the new feature ex-
5.5
traction methods are proposed in feature extraction stage.
Correctly classified data
5 The emotion of facial image is detected by using fuzzy clas-
Misclassified data sifier with extracted features. In the experimental results, it
4.5
Dedired output is shown that the proposed algorithm detect emotion well.
4 Surprise
Classifier output
3.5
References
Disgust
3 [1] M. H. Kim, Y. H. Joo, and J, “TS fuzzy classifier using
2.5 a linear matrix inequality,” Journal of Korea Fuzzy and
Angry Intelligent System, vol. 14, no.1, pp. 46-51, 2004.
2
[2] Y. H. Joo, K. H. Jeong, M. H. Kim, J. B. Park, J.
1.5 Sad LEE and Y. J. CHO, “Facial image analysis algorithm
1 for emotion recognition,” Journal of Korea Fuzzy and
Happy
Intelligent System, vol. 14, no. 7, pp. 801-806, 2004.
0.5
[3] Y. H. Joo and J. H. Oh, “Emotion Recognition Us-
0 20 40 60 80 100 120 ing Template Vector and Neural-Network,” Journal of
Data Korea Fuzzy and Intelligent System, Vol. 13, No.6, pp.
Fig. 10. Result of emotion detection algorithm 710-715, 2003.
[4] J.J. Lien, T. Kanade, J.F. Cohn, and C.C. Li, “Au-
Table 6. Emotion detection accuracy tomated facial expression recognition based on FACS
Facial component extraction sucess 82.7% action units,” Third IEEE International Conference on
Fuzzy classification accuracy 89.5% Automatic Face and Gesture Recognition, pp.390-395,
Final emotion detection accuracy 74.0% 1998.
[5] S. Morishima and H. Harashima, “Emotion space for
analysis and synthesis of facial expression,” IEEE In-
ternational Workshop on Robot and Human Communi-
by 124 data. The 95 antecedent membership function and
cation, pp. 188-193, 1993.
consequent parameters are identified. The identified param-
[6] J. Zhao and G. Kearney, “Classifying facial emotions by
eters are omitted by page limitation. Then the classification
back propagation neural networks with fuzzy inputs,”
performance is evaluated. The experimental results on 124
International Conference on Neural Information Pro-
facial images are shown in Table 6 and 7. The final emo-
cessing, vol. 1, pp. 454-457, 1996.
tion recognition rate is calculated by multiplying facial image
[7] S. Morishima, F. Kawakami, H. Yamada, and H. Ha-
analysis accuracy and fuzzy classification accuracy. Table 6
rashima, “A Modelling of Facial Expression and Emo-
summarize accuracy of emotion recognition system. Figure
tion for Recognition and Synthesis,” Symbiosis of Hu-
10 shows the experiment result of fuzzy classifier for 124
man and Artifact, Elsevier, pp. 251-256, 1995.
patterns. There are 13 facial images we can’t classify. The
[8] M.J. Black and Y. Yacoob, “Recognising Facial Expres-
emotion recognition accuracies on each emotion are evalu-
sions in Image Sequences using Local Parameterised
ated in Table 7. In Table 7, we could know that most of
Models of Image Motion,” International Journal on
recognition accuracy is similar.
Computer Vision, Vol. 25, No. 1, pp. 23–48, 1998.
[9] P. Ekman and W.V. Friesen, Unmasking the Face, Pren-
6. Conclusion tice Hall, New Jersey, 1975.
We have presented an emotion detection algorithm by us- [10] H. Kobayashi and F. Hara, “Facial interaction between
ing frontal facial image. The algorithm composed of three animated 3D face robot and human beings,” IEEE In-
stages. In image processing stage, the face region and fa- ternational Conference on System, Man and Cybernet-
cial components are extracted. The fuzzy color filter and ics, pp. 3732–3737, 1997.
histogram analysis methods are adopted to extract face re- [11] N.M. Thalmann, P. Kalra and M. Escher, “Face to vir-
gion from facial image. The facial components then are ex- tual face,” Proceedings of the IEEE, Vol. 86, No.5, pp.
tracted by using VFM and histogram analysis method. To 870–883, 1998.
[12] I.A. Essa and A.P. Pentland, “Coding analysis inter-
Table 7. Recognition accuracy of five emotion pretation and recognition of facial expressions,” IEEE
Transactions on Pattern Analysis and Machine Intelli-
Happy 79.7%
gence, Vol. 19, No. 7, pp. 757–763, 1997.
Sad 69.9%
Angry 72.3%
Disgust 69.9%
Surprise 78.5%
2378
View publication stats