# US 11,908,237 B2 · Image processing method and apparatus, electronic device, and computer-readable storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,908,237 B2
- Document ID: US11908237B2
- Status: Granted
- Kind: B2
- Application number: 17/886,101
- Filed: 2022-08-11
- Published: 2022-12-08
- Granted: 2024-02-20
- Earliest claimed: 2021-04-02
- Assignees: Beijing Bytedance Network Technology Co., Ltd.
- Applicants: Beijing Bytedance Network Technology Co., Ltd.
- Inventors: Jiali Pan; Shupeng Zhang
- Web page: https://patentgrep.com/patent/US11908237B2

## CPC

- G06T 11/00: Two-dimensional [2D] image generation
- G06V 40/168: {Feature extraction; Face representation}
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 13/40: of characters, e.g. humans, animals or virtual beings
- G06T 13/80: Two-dimensional [2D] animation, e.g. using sprites
- G06V 40/165: {using facial parts and geometric relationships}
- G06V 40/171: {Local features and components; Facial parts (eye characteristics G06V40/18); Occluding parts, e.g. glasses; Geometrical relationships}
- G06T 2207/10004: Still image; Photographic image
- G06T 2207/20132: Image cropping
- G06T 2207/30196: Human being; Person
- G06T 2207/30201: Face
- G06V 40/178: {estimating age from face image; using age information for improving recognition}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Embodiments of the present disclosure relate to the field of image processing technologies and disclose an image processing method and apparatus, an electronic device, and a computer-readable storage medium. The image processing method includes: when an obtained first image includes a human face, performing a first transformation process on the first image to obtain a second image; determining, based on a first target face key point of the human face in the first image, a target position, in the first image, of a second target face key point of the human face in the second image; performing a first movement process on the second image based on the target position; and generating a target image based on the first image and the second image processed through the first movement process, and displaying the target image.

## Claims

### Claim 1

An image processing method, comprising:
when an obtained first image comprises a human face, performing a first transformation process on the first image to obtain a second image;
determining, based on a first target face key point of the human face in the first image, a target position, in the first image, of a second target face key point of the human face in the second image;
performing a first movement process on the second image based on the target position;
generating a target image based on the first image and the second image processed through the first movement process, and displaying the target image;
wherein the image processing method further comprises:
subsequent to the performing a first movement process on the second image based on the target position, performing a second movement process on the second image processed through the first movement process based on a predetermined movement trajectory;
wherein the generating a target image further comprises generating the target image based on the first image and the second image processed through the first movement process and the second movement process;
wherein the image processing method further comprises: subsequent to the performing the first movement process on the second image based on the target position, adding target additional information to a predetermined position of the second image processed through the first movement process to obtain a fifth image; and
wherein the generating the target image based on the first image and the second image processed through the first movement process further comprises: generating the target image based on the first image and the fifth image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein said performing the first transformation process on the first image to obtain the second image comprises:
performing a feature transformation process on respective first facial features of the human face in the first image to obtain respective second facial features matching a human face of a predetermined age group, and determining an image of a human face containing the respective second facial features as a third image; and
performing a cutout process on the third image based on a predetermined portrait mask, and determining an image obtained through the cutout process as the second image.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising, prior to said performing the first movement process on the second image based on the target position:
adding additional information corresponding to a facial feature to the second image,
wherein said performing the first movement process on the second image comprises: performing the first movement process on the second image added with the additional information corresponding to the facial feature.

### Claim 4 (depends on 1)

The method according to claim 1, wherein:
the first target face key point comprises a 44-th face key point and a 16-th face key point of 106 face key points, and the second target face key point is the 44-th face key point of the 106 face key points; and
said determining, based on the first target face key point of the human face in the first image, the target position, in the first image, of the second target face key point of the human face in the second image comprises:
determining a direction vector from the 44-th face key point to the 16-th face key point of the human face in the first image; and
obtaining a first position point based on a predetermined displacement factor, the direction vector and the 16-th face key point of the human face in the first image in accordance with a first predetermined calculation formula, and determining the first position point as a target position, in the first image, of the 44-th face key point of the human face in the second image.

### Claim 5 (depends on 4)

The method according to claim 4, wherein said performing the first movement process on the second image based on the target position comprises:
performing, based on a predetermined zoom-out factor, a zoom-out process on the second image taking the 44-th face key point of the human face in the first image as a face center point, to obtain a fourth image; and
performing a translation process on the fourth image based on the target position.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the performing the second movement process on the second image processed through the first movement process based on the predetermined movement trajectory comprises:
determining a time difference between a current time point and a movement start time point of the predetermined movement trajectory;
determining, based on the time difference from a predetermined movement set, a target displacement and a target rotation angle that correspond to the current time point, the predetermined movement set comprising displacements and rotation angles of the predetermined movement trajectory at a plurality of predetermined time points; and
determining, based on the target displacement and the target rotation angle, a movement position of the second image processed through the first movement process at the current time point, and determining that the second image processed through the first movement process continuously moves along the predetermined movement trajectory by taking the movement position as a movement start position.

### Claim 7

An electronic device, comprising:
a memory; a processor; and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, causes the electronic device to:
when an obtained first image comprises a human face, perform a first transformation process on the first image to obtain a second image;
determine, based on a first target face key point of the human face in the first image, a target position, in the first image, of a second target face key point of the human face in the second image;
perform a first movement process on the second image based on the target position;
generate a target image based on the first image and the second image processed through the first movement process, and display the target image;
wherein the processor, when executing the computer program, further causes the electronic device to:
subsequent to performing the first movement process on the second image based on the target position, perform a second movement process on the second image processed through the first movement process based on a predetermined movement trajectory;
wherein generating the target image further comprises generating the target image based on the first image and the second image processed through the first movement process and the second movement process;
wherein the processor, when executing the computer program, further causes the electronic device to:
subsequent to the performing the first movement process on the second image based on the target position, add target additional information to a predetermined position of the second image processed through the first movement process to obtain a fifth image; and
wherein the generating the target image based on the first image and the second image processed through the first movement process further comprises: generating the target image based on the first image and the fifth image.

### Claim 8 (depends on 7)

The electronic device according to claim 7, wherein said performing the first transformation process on the first image to obtain the second image comprises:
performing a feature transformation process on respective first facial features of the human face in the first image to obtain respective second facial features matching a human face of a predetermined age group, and determining an image of a human face containing the respective second facial features as a third image; and
performing a cutout process on the third image based on a predetermined portrait mask, and determining an image obtained through the cutout process as the second image.

### Claim 9 (depends on 7)

The electronic device according to claim 7, wherein the processor, when executing the computer program, further causes the electronic device to, prior to said performing the first movement process on the second image based on the target position:
add additional information corresponding to a facial feature to the second image,
wherein said performing the first movement process on the second image comprises: performing the first movement process on the second image added with the additional information corresponding to the facial feature.

### Claim 10 (depends on 7)

The electronic device according to claim 7, wherein:
the first target face key point comprises a 44-th face key point and a 16-th face key point of 106 face key points, and the second target face key point is the 44-th face key point of the 106 face key points; and
said determining, based on the first target face key point of the human face in the first image, the target position, in the first image, of the second target face key point of the human face in the second image comprises:
determining a direction vector from the 44-th face key point to the 16-th face key point of the human face in the first image; and
obtaining a first position point based on a predetermined displacement factor, the direction vector and the 16-th face key point of the human face in the first image in accordance with a first predetermined calculation formula, and determining the first position point as a target position, in the first image, of the 44-th face key point of the human face in the second image.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein said performing the first movement process on the second image based on the target position comprises:
performing, based on a predetermined zoom-out factor, a zoom-out process on the second image taking the 44-th face key point of the human face in the first image as a face center point, to obtain a fourth image; and
performing a translation process on the fourth image based on the target position.

### Claim 12 (depends on 7)

The electronic device according to claim 7, wherein the performing the second movement process on the second image processed through the first movement process based on the predetermined movement trajectory comprises:
determining a time difference between a current time point and a movement start time point of the predetermined movement trajectory;
determining, based on the time difference from a predetermined movement set, a target displacement and a target rotation angle that correspond to the current time point, the predetermined movement set comprising displacements and rotation angles of the predetermined movement trajectory at a plurality of predetermined time points; and
determining, based on the target displacement and the target rotation angle, a movement position of the second image processed through the first movement process at the current time point, and determining that the second image processed through the first movement process continuously moves along the predetermined movement trajectory by taking the movement position as a movement start position.

### Claim 13

A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements operations comprising:
when an obtained first image comprises a human face, performing a first transformation process on the first image to obtain a second image;
based on a first target face key point of the human face in the first image, determining a target position of a second target face key point of the second image in the first image;
performing a first movement process on the second image based on the target position;
generating a target image based on the first image and the second image processed through the first movement process, and displaying the target image;
wherein the operations further comprise:
subsequent to the performing a first movement process on the second image based on the target position, performing a second movement process on the second image processed through the first movement process based on a predetermined movement trajectory;
wherein the generating a target image further comprises generating the target image based on the first image and the second image processed through the first movement process and the second movement process;
wherein the operations further comprise: subsequent to the performing the first movement process on the second image based on the target position, adding target additional information to a predetermined position of the second image processed through the first movement process to obtain a fifth image; and
wherein the generating the target image based on the first image and the second image processed through the first movement process comprises: generating the target image based on the first image and the fifth image.
