文章快速检索     高级检索
  重庆大学学报  2019, Vol. 42 Issue (3): 85-91  DOI: 10.11835/j.issn.1000-582X.2019.03.009 RIS(文献管理工具)
0

引用本文 

罗元, 余朝靖, 张毅, 刘浪. 基于改进的局部方向模式人脸表情识别算法[J]. 重庆大学学报, 2019, 42(3): 85-91. DOI: 10.11835/j.issn.1000-582X.2019.03.009.
LUO Yuan, YU Chaojing, ZHANG Yi, LIU Lang. Facial expression recognition algorithm based on improved local direction pattern[J]. Journal of Chongqing University, 2019, 42(3): 85-91. DOI: 10.11835/j.issn.1000-582X.2019.03.009.

作者简介

罗元(1972-), 女, 博士, 教授, 主要从事机器视觉, 光电信号处理研究, (E-mail)luoyuan@cqupt.edu.cn

文章历史

收稿日期: 2018-07-03
基于改进的局部方向模式人脸表情识别算法
罗元 a, 余朝靖 a, 张毅 b, 刘浪 a     
a. 重庆邮电大学 光电信息感测与传输技术重点实验室, 重庆 400065;
b. 重庆邮电大学 重庆市信息无障碍与服务机器人工程技术研究中心, 重庆 400065
摘要: 针对LDP利用Kirsch算子计算8方向的边缘响应值并排序,特征提取速度慢的问题,提出了一种改进的分解局部方向模式DLDP(divided local directional pattern)特征提取方法。将Kirsch算子的8个方向掩模分成2个子方向掩模再分别计算边缘响应值,获得2个编码(DLDP1和DLDP2),级联两个编码的直方图得到表情特征DLDP。然后利用主成分分析法(PCA,principal component analysis)降维处理。最后用支持向量机进行表情识别,在JAFFE数据库上的实验表明,本文方法与近几年效果较好的特征提取算法相比,不仅缩短了特征提取的运算时间,而且提高了识别率。
关键词: 表情识别    Kirsch算子    分解局部方向模式    PCA    
Facial expression recognition algorithm based on improved local direction pattern
LUO Yuan a, YU Chaojing a, ZHANG Yi b, LIU Lang a     
a. Key Laboratory of Optoelectronic Information Sensing and Transmission Technology, Chongqing University of Posts and Telecommunications, Chongqing 400065, P. R. China;
b. Engineering Research Center for Information Accessibility and Service Robots, Chongqing University of Posts and Telecommunications, Chongqing 400065, P. R. China
Abstract: The local directional pattern (LDP) descriptor is a method for texture feature extraction. It calculates and sorts edge response values of eight different directions, thus the speed is slower than other local texture feature extraction algorithm. This paper presents a new feature descriptor called divided local directional pattern (DLDP) for feature extraction. In this method, Kirsch masks in eight different orientations were divided into two sub-directional masks. The edge response values were calculated respectively to obtain DLDP1 and DLDP2. DLDP1 and DLDP2 were concatenated into a single DLDP descriptor. Then principal component analysis (PCA) was used for dimensionality reduction processing. Finally, the support vector machine (SVM) was applied to classify and recognize facial expression. The experimental results show that compared with the better feature extraction algorithms in recent years, the improved local direction pattern can not only reduce the computation time, but also improve the rate of facial expression recognition.
Keywords: facial expression recognition    Kirsch masks    divided local directional pattern    principal component analysis    

人脸表情识别用于分析人类的一些情感和意图,在人机交互、计算机视觉、人类心理学理论和情绪模拟研究等领域都有重要的应用[1]。提取有效的表情特征是人脸表情识别中的关键步骤,它直接影响表情分类的识别率[2]。表情特征提取方法分为基于全局特征和基于局部纹理特征提取。相较于全局特征提取,基于局部的特征提取方法对光照、姿势等变化的鲁棒性更好[3]。LBP由于其原理简单,计算复杂度低,广泛的应用于图像识别、目标检测和跟踪等领域。LBP对一致光照变化不敏感,但对融入非一致光照变化和随机噪声的图像表示效果不理想,影响最佳的图像识别正确率。为此,2010年Jabid等人提出了一种对噪声更具鲁棒性的局部方向模式(LDP)[4]描述人脸。2015年Rivera A R等人通过将图像的方向信息和第一第二大的强度信息融合起来编码以提高识别率[5]。2016年,R.Srinivasa Perumal等人通过对在单个分块中获得的LDP码进行X-ORing运算,生成用于高效面部识别的紧凑代码DR-LDP,识别率得到了提高[6]。2017年,Byungyong Ryu等人通过使用方向信息和三元模式高效地编码表情相关特征信息,提高了表情识别的准确性[7]。但以上研究都致力于提高识别率,未考虑计算8方向的边缘响应并排序,算法时间消耗较大的问题。

为了提高表情特征提取过程的速率,提出了DLDP特征提取方法,减少了特征尺寸,从而缩短了人脸表情的识别时间。为了进一步降低DLDP的特征维度并提高识别率,利用主成分分析(PCA, principal component analysis)方法[8]对DLDP描述进行降维处理。实验结果表明,研究方法与目前效果较好的特征提取算法相比,大大缩短了特征提取的时间并且提高了识别率。

1 分解局部方向模式(DLDP) 1.1 LDP

LDP算子在每个像素位置处计算所有8个方向的边缘响应值,并根据相对强度大小生成代码。给定图像中的中心像素,中心像素周围有一个局部3×3邻域,8个方向的边缘响应值mi(i= 0, 1,…,7)由Kirsch掩模Mi[9]与该3×3邻域的灰度值卷积计算得到。

边缘响应值在所有方向上不是同等重要的, 有角或边缘存在的特定方向就显示较高的响应值。因此,将边缘响应值的绝对值|mi|进行排序,求出第k大的值|mk|,并将大于等于|mk|的|mi|对应位置设置为1,剩余8-k位设置为0,图 1给出了LDP码的计算过程。文献[3]验证了相比于其他值当k=3时可获得最好的表情识别率,因此,研究都是在k=3的前提下进行的,图 2给出了k=3时计算LDP码的一个实例。

图 1 LDP码的计算过程 Figure 1 The LDP descriptor
图 2 LDP码的编码实例(k=3) Figure 2 LDP code with k=3
1.2 DLDP

由于LDP需要计算8方向的边缘响应值,并对所得的8个边缘响应值取绝对值再排序,使得整个表情特征提取过程有较大的时间消耗。针对这一问题,设计了DLDP算子。

为了既保留原始LDP的纹理信息又减少时间的消耗,设计了分解局部方向模式(DLDP)。将Kirsch算子的8方向模板根据4个角和上下左右分成2个子方向模板,令面部图像的任意像素点X作为中心点,同时分别通过2个子模板计算4个角和上下左右方向的边缘响应值,得到2个4方向边缘响应值,即m10m11m12m13m20m21m22m23,对8个边缘响应值的绝对值进行排序,将排名前3的边缘响应值所在的位置设为1,其他位置设为0,得到DLDP1和DLDP2编码,如图 3所示。

图 3 DLDP编码 Figure 3 The DLDP descriptor

根据图像在4个方向的响应符号直接进行二值编码,构造图像局部描述子,定义为

$ \text{DLDP1}=\sum\limits_{i=0}^{3}{b}({{m}_{1i}}-{{m}_{k}})2, $ (1)
$ \text{DLDP2}=\sum\limits_{i=0}^{3}{b}({{m}_{2i}}-{{m}_{k}}){{2}^{i}}, $ (2)
$ \text{ }b\left( a \right)=\left\{ \begin{align} &0, a<0, \\ &\text{ }1, a\ge 0, \\ \end{align} \right. $ (3)

其中,m1im2i是边缘响应值,mk是第k大的边缘响应值。图 4显示了DLDP编码的一个实例。

图 4 DLDP编码实例 Figure 4 An example of computing DLDP

像素的DLDP码根据原图坐标排列形成对应的DLDP编码图。计算每个像素(x, y)的DLDP码之后,其DLDP描述子——直方图HDLDPi定义如下

$ {{H}_{\text{DLDP}i}}=\sum\nolimits_{x, y}{f}(\text{DLDP}i\left( x, y \right), {{C}_{i}}), ~ $ (4)

式中,$f\left( a, x \right)=\left\{ \begin{align} &1, a=x \\ &0, \text{other} \\ \end{align} \right.\text{ } $Ci子方向的DLDPi码,i=1, 2。

$ {{H}_{\text{DLDP}}}=\sum\limits_{i=1}^{2}{{{H}_{\text{DLDP}i}}}, $ (5)

所得的DLDP描述子是DLDP编码梯度值的直方图。DLDP描述子包含图像的详细信息,例如边缘、角、点和其他局部纹理特征。通过式(4)可得到DLDP1和DLDP2的直方图,再利用式(5)将DLDP1和DLDP2的直方图联接起来获得DLDP直方图HDLDP,作为图像特征表示。

DLDP特征描述了表情图像的详细信息,若在整个面部图像上计算DLDP特征会忽略很多重要信息,因此将人脸表情图像进行分块处理,采用与文献[3]相同的分块方式,划分为7×6的分块,利用式(6)分别提取每一个子块的DLDP直方图HDLDP

$ {{H}_{\text{DLDP}}}=\sum\limits_{i=1}^{2}{\sum\limits_{x=1}^{7}{\sum\limits_{y=1}^{6}{f\left( \text{DLDP}i\left( x, y \right), {{C}_{i}} \right)}}}, $ (6)

式中,$ f\left( a, x \right)=\left\{ \begin{align} &1, a=x \\ &0, \text{other} \\ \end{align} \right.\text{ }$Ci表示子方向的DLDPi码,i=1, 2。最终将表情图像以从左至右、从上至下的顺序联接各个子块的特征直方图,该联接直方图作为表情特征,图 5显示了特征直方图的联接过程。

图 5 表情图像的DLDP特征直方图的联接过程 Figure 5 Facial expression representations using the combined fusion feature histogram

虽然DLDP大大减少了特征提取的运算时间,但是它提取的纹理特征与原始LDP一样,相较于目前的一些先进的特征提取方法,识别率较低。为了提高识别率,研究进行了以下研究。

2 融合PCA与DLDP的人脸表情特征提取

PCA方法是常用的全局特征提取算法,提取全局特征的同时能有效地降低特征维度[10]。DLDP则是局部特征提取方法,且其特征维度过高。融合PCA与DLDP进行人脸表情特征提取不仅能够得到人脸表情的全局和局部特征信息有利于提高识别率,而且能够进一步降低特征维度有利于缩短计算时间。

融合PCA与DLDP的人脸表情特征提取方法的实现过程如图 6所示。首先,通过DLDP提取人脸表情图像的局部特征信息;然后,利用PCA提取原始表情图像和DLDP特征图像的特征并进行融合,最后得到人脸表情图像的特征信息。

图 6 融合PCA与DLDP的表情特征提取过程 Figure 6 The expression feature extraction process of improved local direction pattern
3 实验结果及分析

支持向量机(SVM, support vector machine)[11]是一种很好的机器学习方法,在模式识别中提供了很好的分类精度。因此,研究选择用SVM对面部表情进行分类识别。

大多数面部表情识别系统致力于识别一组基本情感表情,如愤怒,厌恶,恐惧,高兴,悲伤和惊喜[12]。这6类表情也可以通过包含中性表情扩展为7类表情[13]。研究主要研究了6类和7类基本表情的识别。为了验证提出算法的有效性,进行了2类实验:第一类是识别率对比实验,第二类是时间对比实验。所有的实验均在Intel Core i3-3220 CPU @ 3.30 GHz, 4.00 GB内存,Microsoft Windows 7平台下,使用Matlabr2012a得出实验数据。

JAFFE人脸表情数据库是日本ATR建立的专门用于表情识别研究的基本表情数据库[14]。在预处理阶段,将所有图像统一归一化为150×110像素,图 7为经过预处理后的图像示例。然后采用分块方式将归一化后的图像划分为7×6大小的块进行特征提取。

图 7 JAFFE人脸表情库的人脸表情图像示例 Figure 7 Six basic expressions and the neutral expression from the left to right (表情分别为愤怒,厌恶,恐惧,高兴,悲伤,惊喜和中性) (Angry, Disgust, Fear, Happy, Sad, Surprise, Neutral)

在实验中,对JAFFE人脸表情库中的人脸表情图像分别利用、LDTP[4]、DR-LDP[5]以及所述的DLDP和融合PCA与DLDP的特征提取方法提取表情特征,然后用SVM进行分类识别。采用10折交叉验证方法[15],计算平均识别率和标准偏差,得到的实验结果DLDP如表 1所示。与其他算法相比,DLDP大大缩短了识别时间,但是识别率与LDP大致相同,而融合PCA与DLDP的方法虽然识别时间相较于DLDP增加了5.92 ms,但还是远小于其他几种算法的识别时间,同时识别率也得到了很大的提高。实验证明,研究提出的方法不仅能够提高表情识别的识别率,而且能够较大幅度的缩短表情特征提取的运算时间,进而提高了识别速率。

表 1 JAFFE数据库的识别结果 Table 1 Facial expression recognition rate and time of different algorithm

为了更好地了解单个表情类型的识别率,JAFFE的6类表情和7类表情分别采用研究方法进行特征提取,然后用SVM进行分类识别,识别结果如图 8图 9所示。可以看出,在6类表情识别中,高兴的识别率最高,厌恶的识别率相对较低;在7类表情识别中,高兴的识别率最高,恐惧和悲伤的识别率较低。由于中性表情的加入,有些表情和中性表情产生了混淆,因此导致其他6个表情识别率降低。

图 8 JAFFE数据库6类表情的识别结果 Figure 8 Facial expression recognition rate and time of different algorithm
图 9 JAFFE数据库7类表情的识别结果 Figure 9 Six basic expression and the netral expression from the left to right
4 总结

针对LDP算法时间消耗较大的问题,提出了一种改进算法——分解局部方向模式(DLDP),同时为了降低特征维度和提高识别率提出了融合DLDP与PCA的表情特征提取算法。研究不仅解决了LDP提取表情特征慢的问题,而且与目前效果较好的几种特征提取方法相比,提高了识别率。在JAFFE人脸表情数据库上进行的实验,验证了该方法在处理速度和识别率上的有效性和优越性。表情变化最明显的地方是眉毛、眼睛和嘴巴区域,因此后续将考虑在提取表情特征时,强化这3个区域的特征以进一步提高表情识别的识别率。

参考文献
[1]
徐峰, 张军平. 人脸微表情识别综述[J]. 自动化学报, 2017, 43(3): 333-348.
XU Feng, ZHANG Junping. Facial microexpression recognition:a survey[J]. Acta Automatica Sinica, 2017, 43(3): 333-348. (in Chinese)
[2]
Tasnim T, Paul A, et al. Human expression recognition based on facial features[C]//Electronics and Vision, IEEE Computer Society Conference on. US: IEEE, 2016: 990-994.
[3]
张友梅, 张伟. 基于数据融合的表情识别[J]. 四川大学学报(工程科学版), 2016, 48(6): 160-164.
ZHANG Youmei, ZHANG Wei. Facial expression recognition based on data fusion[J]. Journal of Sichuan University (Engineering Science Edition), 2016, 48(6): 160-164. (in Chinese)
[4]
Jabid T, Kabir M H, Chae O. Facial expression recognition using local directional pattern (LDP)[J]. 2010, 119(5): 1605-1608.
[5]
Rivera A R, Castillo J R, Chae O. Local directional texture pattern image descriptor[J]. Pattern Recognition Letters, 2015, 51(1): 94-100.
[6]
Srinivasa P R, Chandra Mouli PVS. Dimensionality reduced local directional pattern (DR-LDP) for face recognition[J]. Expert Systems with Applications, 2016, 63: 66-73. DOI:10.1016/j.eswa.2016.06.031
[7]
Ryu B, Rivera A R, Kim J, et al. Local directional ternary pattern for facial expression recognition[J]. IEEE Transactions on Image Processing, 2017, PP(99): 1-4.
[8]
Filho J B O S, Diniz P S R. A fixed-point online kernel principal component extraction algorithm[J]. IEEE Transactions on Signal Processing, 2017, PP(99): 12-16.
[9]
JUN-BAI L B. an algorithm for edge extraction based on fast kirsch and the probability of being true edges[J]. Computer Applications, 2001, 21(2): 33-35.
[10]
Ren Y, Liao L, Maybank S J, et al. Hyperspectral image spectral-spatial feature extraction via tensor principal component analysis[J]. IEEE Geoscience & Remote Sensing Letters, 2017, PP(99): 1-5.
[11]
Mlakar U, Fister I, Brest J, et al. Multi-objective differential evolution for feature selection in facial expression recognition systems[J]. Expert Systems with Applications, 2017, 89.
[12]
解仑, 卢亚楠, 姜波, 等. 基于人脸运动单元及表情关系模型的自动表情识别[J]. 北京理工大学学报, 2016, 36(2): 163-169.
XIE Lun, LU Yanan, JING Bo, et al. Expression automatic recognition based on facial action units and expression relationship model[J]. Transactions of Beijing Institute of Technology, 2016, 36(2): 163-169. (in Chinese)
[13]
Uddin M Z. A depth video-based facial expression recognition system utilizing generalized local directional deviation-based binary pattern feature discriminant analysis[J]. Multimedia Tools and Applications, 2016, 75(12): 1-16.
[14]
Alphonse A S, Dharma D. Enhanced Gabor (E-Gabor), Hypersphere-based normalization and pearson general kernel-based discriminant analysis for dimension reduction and classification of facial emotions[J]. Expert Systems with Applications, 2017, 90.
[15]
胡敏, 江河, 王晓华, 等. 基于几何和纹理特征的表情层级分类方法[J]. 电子学报, 2017, 45(1): 164-172.
HU Min, JIANG He, WANG Xiaohua, et al. A hierarchical classification method of expressions based on geometric and texture features[J]. Acta Electronica Sinica, 2017, 45(1): 164-172. (in Chinese) DOI:10.3969/j.issn.0372-2112.2017.01.023
[16]
颜雪军, 赵春霞, 袁夏. 2DPCA-SIFT:一种有效的局部特征描述方法[J]. 自动化学报, 2014, 40(4): 675-682.
YAN Xuejun, ZHAO Chunxia, YUAN Xia. 2DPCA-SIFT:an efficient local feature descriptor[J]. Acta Automatica Sinica, 2014, 40(4): 675-682. (in Chinese)
[17]
Jian Z, Luxi H, Jian J, et al. A fast iterative pursuit algorithm in robust face recognition based on sparse representation[J]. Mathematical Problems in Engineering, 2014, 2014(2): 1-11.
图 1 LDP码的计算过程 Figure 1 The LDP descriptor
图 2 LDP码的编码实例(k=3) Figure 2 LDP code with k=3
图 3 DLDP编码 Figure 3 The DLDP descriptor
图 4 DLDP编码实例 Figure 4 An example of computing DLDP
图 5 表情图像的DLDP特征直方图的联接过程 Figure 5 Facial expression representations using the combined fusion feature histogram
图 6 融合PCA与DLDP的表情特征提取过程 Figure 6 The expression feature extraction process of improved local direction pattern
图 7 JAFFE人脸表情库的人脸表情图像示例 Figure 7 Six basic expressions and the neutral expression from the left to right (表情分别为愤怒,厌恶,恐惧,高兴,悲伤,惊喜和中性) (Angry, Disgust, Fear, Happy, Sad, Surprise, Neutral)
表 1 JAFFE数据库的识别结果 Table 1 Facial expression recognition rate and time of different algorithm
图 8 JAFFE数据库6类表情的识别结果 Figure 8 Facial expression recognition rate and time of different algorithm
图 9 JAFFE数据库7类表情的识别结果 Figure 9 Six basic expression and the netral expression from the left to right
基于改进的局部方向模式人脸表情识别算法
罗元 , 余朝靖 , 张毅 , 刘浪