Method, electronic device and storage medium for processing image
AssigneeBeijing Dajia Internet Information Technology Co., Ltd.
InventorPeihong Hou
Life of this patent
Estimating the term…
Abstract
A method electronic device and storage medium for processing an image are provided. The method includes: receiving an instruction for a preset fly-away special effect; creating a facial grid and facial feature grids in the image to be processed; determining a facial image in an image region covered by the facial grid; setting a pixel value of each pixel in the facial image to a target pixel value; extracting facial feature images from an image region covered by the facial feature grids; and obtaining a target image by mapping the facial feature images onto the facial image based on a preset triangular mapping algorithm and a preset offset.
Claims20
A method for processing an image, comprising:
- receiving an instruction for a preset fly-away special effect;
- creating a facial grid and facial feature grids in the image to be processed;
- determining a facial image in an image region covered by the facial grid;
- setting a pixel value of each pixel in the facial image to a target pixel value;
- extracting facial feature images from an image region covered by the facial feature grids;
- and
- obtaining a target image by mapping the facial feature images onto the facial image based on a preset triangular mapping algorithm and a preset offset.
An electronic device, comprising:
- a memory storing a computer program as well as candidate intermediate data and result data generated when the computer program is executed;
- a processor configured to:
- create a facial grid and facial feature grids in an image to be processed when receiving an instruction for a preset fly-away special effect;
- determine a facial image in an image region covered by the facial grid;
- set a pixel value of each pixel in the facial image to a target pixel value;
- extract facial feature images from an image region covered by the facial feature grids;
- and
- obtain a target image by mapping the facial feature images onto the facial image based on a preset triangular mapping algorithm and a preset offset.
A nonvolatile computer readable storage medium carrying one or more computer instruction programs thereon, wherein when the computer instruction programs are executed by one or more processors, the one or more processors are configured to:
- create a facial grid and facial feature grids in an image to be processed when receiving an instruction for a preset fly-away special effect;
- determine a facial image in an image region covered by the facial grid;
- set a pixel value of each pixel in the facial image to a target pixel value;
- extract facial feature images from an image region covered by the facial feature grids;
- and
- obtain a target image by mapping the facial feature images onto the facial image based on a preset triangular mapping algorithm and a preset offset.
Dependencies are inferred from the claim text.