# US 2026/0311307 A1 · Image processing methods and apparatuses, electronic devices and storage media

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

- Number: US 2026/0311307 A1
- Document ID: US20260311307A1
- Status: Published application
- Kind: A1
- Application number: 18/996,882
- Filed: 2023-04-28
- Published: 2026-10-08
- Earliest claimed: 2023-04-28
- Assignees: Boe Technology Group Co., Ltd.
- Applicants: BOE Technology Group Co., Ltd.
- Inventors: Yanhong WU; Yan GAO
- Web page: https://patentgrep.com/patent/US20260311307A1

## CPC

- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 3/40: Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T 5/70: Denoising; Smoothing
- G06V 40/161: {Detection; Localisation; Normalisation}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

The disclosure relates to an image processing method and apparatus, an electronic device and a storage medium. The method includes the following steps: identifying video image frames of a video stream to obtain an initial image including a face; aligning a face region in the initial image with the preset skin template to obtain a mapping relationship between the face region and the preset skin template, and adjusting the skin region of the face region to obtain an adjusted image; determining the skin region based on the mapping relationship; performing image quality enhancement processing on the adjusted image to obtain an enhanced image; and rendering the enhanced image to obtain a target image.

## Claims

### Claim 1

An image processing method, comprising:
identifying video image frames of a video stream to obtain an initial image comprising a face;
aligning a face region in the initial image with a preset skin template to obtain a mapping relationship between the face region and the preset skin template;
adjusting a skin region of the face region to obtain an adjusted image, wherein the skin region is determined based on the mapping relationship;
performing image quality enhancement processing on the adjusted image to obtain an enhanced image; and
rendering the enhanced image to obtain a target image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein aligning the face region comprises:
obtaining key point coordinates of a face in the preset skin template to obtain a first key point coordinate vector;
obtaining key point coordinates of the face in the initial image to obtain a second key point coordinate vector; and
inputting the first key point coordinate vector and the second key point coordinate vector into a preset distance model to obtain a solution of the preset distance model, and determining the solution of the preset distance model as the mapping relationship.

### Claim 3 (depends on 2)

The method according to claim 2, wherein obtaining the solution of the preset distance model comprises:
respectively obtaining a coordinate mean value and a coordinate standard deviation of the first key point coordinate vector as a first coordinate mean value and a first coordinate standard deviation;
respectively obtaining a coordinate mean value and a coordinate standard deviation of the second key point coordinate vector as a second coordinate mean value and a second coordinate standard deviation;
subtracting the first coordinate mean value from the first key point coordinate vector and then dividing by the first coordinate standard deviation to obtain a first adjusted coordinate vector;
subtracting the second coordinate mean value from the second key point coordinate vector and then dividing by the second coordinate standard deviation to obtain a second adjusted coordinate vector; and
inputting the first adjusted coordinate vector and the second adjusted coordinate vector into the preset distance model, and performing singular value decomposition on the preset distance model to obtain the mapping relationship.

### Claim 4 (depends on 1)

The method according to claim 1, wherein adjusting the skin region of the face region comprises:
sequentially scaling the initial image with different preset size ratios to obtain candidate size images, performing clearing processing on one of the candidate size images to obtain a processed image; and
in response to a number of times of size adjustment being equal to a preset times threshold, performing clearing processing on a last candidate size image of the candidate size images to obtain a last processed image, restoring a size of the last processed image to a size of the initial image to obtain a first candidate image, and determining the first candidate image as the adjusted image.

### Claim 5 (depends on 4)

The method according to claim 4, wherein performing clearing processing on the candidate size image comprises:
detecting at least one freckle region of a skin region of the candidate size image, wherein the freckle region is a connected component with an area within a first preset area range, a size less than a first preset size threshold and larger than a second preset size threshold;
performing clearing processing on the at least one freckle region to obtain a first processed image; and
in response to a first cycle condition being satisfied, restoring a size of the first processed image to a size of the initial image to obtain a final processed image;
wherein the first cycle condition is that a number of times of freckle region detection is equal to a first preset times threshold or a quantity of freckle regions currently detected is less than a first preset quantity threshold.

### Claim 6 (depends on 5)

The method according to claim 5, wherein detecting the at least one freckle region of the skin region of the candidate size image comprises:
obtaining target pixel data based on the mapping relationship and pixel data of each pixel of the preset skin template;
replacing pixel data of corresponding positions in the candidate size image with the target pixel data to obtain a second candidate image; and
performing connected component detection on the skin region of the second candidate image to obtain the freckle region of the skin region, wherein the freckle region of the skin region is a connected component with a freckle region size less than a first preset size threshold and larger than a second preset size threshold in the skin region.

### Claim 7 (depends on 6)

The method according to claim 6, wherein performing connected component detection on the skin region of the second candidate image comprises:
converting a grayscale image of the candidate size image to binary images based on respective preset thresholds to obtain frames of binary images;
respectively obtaining connected regions in the frames of binary images to obtain connected components in the frames of binary images;
classifying the connected components based on distances between center points of corresponding connected components in the frames of binary images, to obtain a plurality of connected components with distances between corresponding center points less than a preset distance threshold;
obtaining positions and sizes of the plurality of connected components; and
determining a connected component with a size less than the first preset size threshold and larger than the second preset size threshold of the plurality of connected components as the freckle region of the skin region.

### Claim 8 (depends on 5)

The method according to claim 5, wherein after detecting the at least one freckle region of the skin region of the candidate size image, the method further comprises:
in response to detecting no freckle region, determining whether there is a wrinkle region, wherein the wrinkle region is a connected component having an area within a second preset area range, a size within a preset length range and a width within a preset width range;
in response to detecting at least one wrinkle region, performing clearing processing on a wrinkle region satisfying a second preset condition in the candidate size image to obtain a second processed image; and
in response to a second cycle condition being satisfied, restoring a size of the second processed image to the size of the initial image to obtain a final processed image;
wherein the second cycle condition is that a number of times of wrinkle region detection is equal to a second preset times threshold or a quantity of wrinkle regions currently detected is less than a second preset quantity threshold.

### Claim 9 (depends on 4)

The method according to claim 4, wherein performing clearing processing on the candidate size image comprises:
detecting a wrinkle region of the skin region of the candidate size image, wherein the wrinkle region is a connected component having an area within a second preset area range, a size within a preset length range, and a width within a preset width range;
in response to detecting at least one wrinkle region, performing clearing processing on a wrinkle region satisfying a second preset condition in the candidate size image to obtain a third processed image; and
in response to a second cycle condition being satisfied, restoring a size of the third processed image to the size of the initial image to obtain the processed image;
wherein the second cycle condition is that a number of times of wrinkle region detection is equal to a second preset times threshold or a quantity of wrinkle regions currently detected is less than a second preset quantity threshold.

### Claim 10 (depends on 1)

The method according to claim 1, wherein adjusting the skin region of the face region comprises:
sequentially scaling the initial image to candidate size images with different preset sizes, obtaining an abnormal region of the skin region in the candidate size image, wherein the abnormal region comprises a freckle region, a wrinkle region or both, the freckle region is a connected component with an area within a first preset area range, a size less than a first preset size threshold and larger than a second preset size threshold, the wrinkle region is a connected component with an area within a second preset area range, a size within a preset length range, and a width within a preset width range, and the second preset area range is larger than the first preset area range; and
in response to a number of times of size adjustment being equal to a preset times threshold, clearing the abnormal region from a last candidate size image of the candidate size images to obtain the adjusted image.

### Claim 11 (depends on 4)

The method according to claim 4, wherein after obtaining the first candidate image, the method further comprises:
scaling an eye region in the first candidate image to obtain a second candidate image, and determining the second candidate image as the adjusted image.

### Claim 12 (depends on 11)

The method according to claim 11, wherein scaling the eye region in the first candidate image comprises:
obtaining a scaling ratio of each pixel in the eye region of the first candidate image;
obtaining target coordinate data of each pixel based on the scaling ratio and original coordinate data of each pixel; and
replacing original coordinate data of each pixel in the first candidate image with target coordinate data to obtain the second candidate image;
wherein obtaining the scaling ratio of each pixel in the eye region of the first candidate image comprises:
obtaining a distance ratio of each pixel in the eye region of the first candidate image, wherein the distance ratio indicates that a moving distance ratio of a pixel closer to a center point of the eye region is smaller; and
obtaining the scaling ratio of each pixel based on the distance ratio, wherein the scaling ratio is proportional to the distance ratio;
wherein obtaining the distance ratio of each pixel in the eye region of the first candidate image comprises:
obtaining a long axis length and a short axis length of the eye region; and
obtaining the distance ratio of each pixel based on the long axis length, the short axis length, coordinate data of the center point of the eye region, and original coordinate data of each pixel;
wherein obtaining the scaling ratio of each pixel based on the distance ratio comprises:
obtaining the scaling ratio of each pixel based on the distance ratio and an initial value of the scaling ratio.

### Claim at position 13

-15. (canceled)

### Claim 16 (depends on 11)

The method according to claim 11, wherein after obtaining the second candidate image, the method further comprises:
performing size adjustment on a face region in the second candidate image to obtain a third candidate image, and
determining the third candidate image as the adjusted image.

### Claim 17 (depends on 16)

The method according to claim 16, wherein performing size adjustment on the face region in the second candidate image comprises:
obtaining a distance value between a control point of the face region and each pixel in the face region;
obtaining a deformation ratio of each pixel based on the distance value, wherein the deformation ratio is configured to indicate that a moving distance of a pixel farther away from the control point is smaller;
calculating target pixel data of each pixel based on coordinate data of a target position of the control point, coordinate data of the control point, and coordinate data of a target position X of each pixel; and
replacing pixels of the face region of the second candidate image with the target pixel data to obtain the third candidate image.

### Claim 18 (depends on 1)

The method according to claim 1, wherein the image quality enhancement processing comprises skin smoothing processing, whitening processing, brightening processing or any combination thereof, and performing image quality enhancement processing on the adjusted image comprises:
performing skin smoothing processing on the adjusted image to obtain a first skin smoothed feature map;
adjusting a smoothing degree of the first skin smoothed feature map to obtain a second skin smoothed feature map;
performing skin tone brightening processing on the second skin smoothed feature map to obtain a skin tone brightened feature map;
performing soft light processing based on the skin tone brightened feature map and the adjusted image to obtain a soft light feature map; and
obtaining the enhanced image based on the adjusted image, the second skin smoothed feature map, the skin tone brightened feature map, the soft light feature map and respective weight values.

### Claim 19 (depends on 18)

The method according to claim 18, wherein performing smoothing processing on the adjusted image comprises:
performing filtering processing on a green sub-image of the adjusted image to obtain a filtered sub-image;
obtaining a pixel data difference value of a same pixel in the adjusted image and the filtered sub-image to obtain a difference sub-image;
compensating pixel data of each pixel in the difference sub-image based on preset compensation data to obtain a difference compensation sub-image; and
performing light compensation on the difference compensation sub-image to obtain the first skin smoothed feature map;
wherein adjusting the smoothing degree of the skin smoothed feature map to obtain the second skin smoothed feature map comprises:
obtaining a grayscale image corresponding to the adjusted image;
performing brightening processing on grayscale data of each pixel in the grayscale image based on preset skin smoothing degree data to obtain a grayscale brightened image; and
adjusting pixel data of each pixel of the adjusted image based on the first skin smoothed feature map and the grayscale brightened image to obtain the second skin smoothed feature map.

### Claim 20 (depends on 19)

The method according to claim 19, wherein performing filtering processing on the green sub-image of the adjusted image comprises: averaging filtering, Gaussian filtering, bilateral filtering, guiding filtering, or any combination thereof;
wherein a filtering kernel of the Gaussian filtering is a circular filtering kernel, and a sum of weight values of the circular filtering kernel is equal to a preset weight value.

### Claim 21

(canceled)

### Claim 22 (depends on 19)

The method according to claim 19, wherein performing light compensation on the difference compensation sub-image comprises:
comparing pixel data of each pixel of the difference compensation sub-image with preset compensation data;
in response to that the pixel data of each pixel is greater than or equal to the preset compensation data, obtaining target pixel data corresponding to the pixel data based on a first light compensation model;
in response to that the pixel data of each pixel is less than the preset compensation data, obtaining target pixel data corresponding to the pixel data based on a second light compensation model;
replacing pixel data of each pixel of the difference compensation sub-image with the target pixel data; and
in response to a number of times of compensation reaching a preset compensation times threshold, determining that a difference compensation sub-image obtained by a last compensation is the first skin smoothed feature map;
wherein a value range of the preset compensation times threshold is [1, 10].

### Claim at position 21

-24. (canceled)

### Claim 25 (depends on 1)

The method according to claim 1, wherein after identifying the video image frames of the video stream, the method further comprises:
in response to no face region being detected in the video image frames, performing image quality enhancement processing on the video image frames to obtain the enhanced image; and
rendering the enhanced image to obtain the target image.

### Claim at position 23

-51. (canceled)

### Claim 52

A non-transitory computer-readable storage medium, when an executable computer program in the computer-readable storage medium is executed by a processor, causing the processor to implement operations comprising:
identifying video image frames of a video stream to obtain an initial image comprising a face;
aligning a face region in the initial image with a preset skin template to obtain a mapping relationship between the face region and the preset skin template;
adjusting a skin region of the face region to obtain an adjusted image, wherein the skin region is determined based on the mapping relationship;
performing image quality enhancement processing on the adjusted image to obtain an enhanced image; and
rendering the enhanced image to obtain a target image.
