CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to and benefit of Chinese Patent Application No. 201910411288.4, filed on May 16, 2019, which is hereby incorporated by reference in its entirety.

FIELD

The disclosure relates to the field of image processing technologies, and in particular, to a method and apparatus for processing face image, an electronic device, and a storage medium.

BACKGROUND

In the practical application of an image processing technology, it is often necessary to process a face image, so as to obtain a face image having an expected effect. For example, aging processing, rejuvenation processing, or the like is performed on the face image.

In a related technology, a special-effect material having an expected effect can be predesigned, and a face image having the expected effect can be obtained by directly adding the special-effect material to a proper position of a face image. For example, during aging processing, special-effect materials such as a wrinkle material and a spot material can be predesigned. These special-effect materials may be understood as layers having some specified special effects. Adding these special-effect materials to proper positions of a face image may be understood as covering these proper positions of the face image with these layers, thereby obtaining the face image with the expected effect.

SUMMARY

According to a first aspect of the embodiments of the disclosure, a method for processing a face image is provided, including:

detecting face key points in the face image;

determining a face key point grid of the face image based on the face key points, wherein the face key point grid comprises a plurality of grid areas defined by connection lines between the face key points;

generating a special effect face image by adding a special-effect material to a grid area in the face key point grid, wherein the special-effect material is pre-designed for representing a specified image effect;

determining a processed face image by adjusting a face contour in the special effect face image based on preset liquify filter parameters, wherein the preset liquify filter parameters are determined based on the specified image effect; the processed face image has the specified image effect.

According to a second aspect of the embodiments of the disclosure, an electronic device is provided, including:

a processor; and

a memory, configured to store an instruction that can be executed by the processor, wherein the processor is configured to execute the instruction to implement the method according to a foregoing embodiment.

According to a third aspect of the embodiments of the disclosure, a nonvolatile computer storage medium is provided. In response to a computer instruction in the storage medium is executed by a processor in an electronic face image processing device, the electronic face image processing device performs the foregoing method.

According to a fourth aspect of the embodiments of the disclosure. An executable program product, including executable program codes, wherein the executable program codes are configured to be executed to perform the foregoing method.

