In an embodiment, in order to obtain the first face image and the second face image more accurately, an angle contour may be displayed on the display device. The user needs to put the face into the contour to obtain a face image of an angle, and then another angle contour may be displayed, and the user needs to put the face into the contour to obtain a face image of another angle. The images of the two angles obtained in this manner are more in line with expectations, which can improve the accuracy of the calculation. In one embodiment, a capturing position such as an aperture or a red dot may be displayed on the display device. The user needs to keep his face still and move the aperture or the red dot to the center of the mobile phone, and capture images from two angles. The images captured in this manner have relatively fixed parameters, such as a distance from the lens to the face, a translation distance, and the like, which can improve the calculation efficiency.
In step S401, low-pass filtering is performed on the face image, to obtain a low frequency component of the face image.
In step S402, high-pass filtering is performed on the face image, to obtain a high frequency component of the face image.
In step S403, the low frequency component is multiplied by a first coefficient, to obtain a first low frequency component.
In step S404, the high frequency component is multiplied by a second coefficient, to obtain a first high frequency component.