系统仿真学报 ›› 2018, Vol. 30 ›› Issue (11): 4195-4202.doi: 10.16182/j.issn1004731x.joss.201811018

• 仿真系统与技术 • 上一篇    下一篇

基于视频的虚拟试妆应用研究

刘家远1, 李晋芳1, 何汉武2   

  1. 1. 广东工业大学 机电学院,广东 广州 510006;
    2. 广东工贸职业技术学院机械工程系,广东 广州 510510
  • 收稿日期:2018-06-21 修回日期:2018-07-16 发布日期:2019-01-04

Application of Virtual Trial Makeup Based on Video

Liu Jiayuan1, Li Jinfang1, He Hanwu2   

  1. 1. School of Electromechanical Engineering, Guangdong University of Technology, Guangzhou 510006, China;
    2. Department of Mechanical Engineering, Guangdong College of Industry and Commerce, Guangzhou510510, China
  • Received:2018-06-21 Revised:2018-07-16 Published:2019-01-04
  • Supported by:
    National Natural Science Fund (61300106)

摘要: 为了以便捷、低成本的方式尝试不同化妆产品,提出了一种基于平面网格模型的虚拟试妆算法,通过Harr级联分类器和Dlib库对视频中的人脸提取特征点,根据平面网格模型纹理坐标对人脸不同的部位动态构建一张掩膜纹理,用来控制平面网格模型主纹理的显示区域,建立平面网格模型主纹理与特征点坐标的映射关系。为解决光照对人脸检测和上妆效果的影响,采用了改进的Gamma矫正调节脸部不同光线下的适应性。通过该算法可以将化妆品图片赋予平面网格模型,并与视频中人脸特征点进行一一映射,从而达到虚拟试妆的效果,经过在AR试妆易软件中应用验证,与其他基于图片处理的试妆算法相比,该算法具有更好的简便性。

关键词: 网格模型, 特征提取, 伽马矫正, 坐标映射

Abstract: To try different cosmetic products in a convenient and low cost way, a virtual make-up algorithm based on a plane mesh model is proposed. The feature points are extracted from the face in the video by the Harr cascade classifier and the Dlib library. A mask pattern is built on the different parts of the face dynamically according to the texture coordinates of the plane mesh model. Theory is used to control the display area of the main texture of the planar mesh model. The mapping relationship between the main texture and the feature point coordinates of the planar mesh model is established. To solve the influence of illumination on face detection and makeup effect, Improved Gamma correction is used to adjust the adaptability of different light levels in the face. This algorithm can give the cosmetic picture to the plane grid model, and map the face feature points in the video, so as to achieve the effect of the virtual trial makeup. It is verified by the application of the AR test makeup software. Compared with other image processing algorithms, the algorithm has better simplicity.

Key words: mesh model, feature extraction, gamma correction, coordinate mapping

中图分类号: