摘要
某些企业迫切需要一种能够自动检测照片中的人脸皮肤是否存在明显偏光的技术,存在明显偏光时需给出光源的方向。提出了一种针对人脸皮肤的偏光检测方法。该方法首先利用OpenCV的人脸检测算法检测人脸,然后进行人脸对齐,得到66个人脸特征点,再以这些特征点的闭包络作为前景掩码送给GrabCut算法对图像进行二分抠图得到完整的脸部皮肤,最后用过脸部中心特征点的水平直线和垂直直线将皮肤分为4个区域,以区域内皮肤像素的平均亮度为标准来判断脸部光照是否偏光以及偏光的方向。本方法应用于某家企业的实际项目中。
Some companies urgently need a technique that automatically detects the presence of significant illumination uneven on the face skin in a photo, and gives the direction of the light source when there is a significant illumination uneven. An illumination uneven detection method for human facial skin is proposed. Firstly, face detection is performed by face detection algorithm of OpenCV. Next, face alignment is performed to obtain 66 face feature points. Then, the closed envelope of these feature points is used as the foreground mask given to the GrabCut algorithm, getting the whole face skin from the binary segmentation of the image. Finally, the skin is divided into four regions by using the horizontal and vertical lines passing through the facial center feature point. The average brightness of the skin pixels in these regions is used as a criterion to determine whether the facial illumination is uneven or not and the direction of light. This method is applied to an actual project of some company.
出处
《电脑知识与技术》
2018年第1Z期152-153,160,共3页
Computer Knowledge and Technology
关键词
皮肤
人脸检测
人脸对齐
抠图
偏光检测
skin
face detection
face alignment
segmentation
illumination uneven detection