# US 2026/0065488 A1 · Image processing method and apparatus, electronic device, and storage medium

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

- Number: US 2026/0065488 A1
- Document ID: US20260065488A1
- Status: Published application
- Kind: A1
- Application number: 19/320,869
- Filed: 2025-09-05
- Published: 2026-03-05
- Earliest claimed: 2023-07-31
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Xiaobin HU; Donghao LUO; Ying TAI; Chengjie WANG
- Web page: https://patentgrep.com/patent/US20260065488A1

## CPC

- G06T 7/194: involving foreground-background segmentation
- G06T 5/20: using local operators
- G06T 5/70: Denoising; Smoothing
- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 7/11: Region-based segmentation
- G06T 7/136: involving thresholding
- G06T 2207/10016: Video; Image sequence
- G06T 2207/10024: Color image
- G06T 2207/20182: Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering
- G06T 2207/20192: Edge enhancement; Edge preservation
- G06T 2207/20221: Image fusion; Image merging
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

An image processing method and apparatus, an electronic device, and a storage medium are provided. The method includes fusing a pre-segmentation mask corresponding to a green screen image and the green screen image to obtain a composite image comprising a foreground region and a background region, the foreground region having a target object, and the target object comprising a target part; determining a target region comprising the target part in the composite image; driving the target part in the target region; determining a target region comprising the driven target part as a driven image; extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region; and generating a target foreground region corresponding to the target object according to the driven target part and a region other than the target part in the foreground region.

## Claims

### Claim 1

An image processing method, performed by an electronic device, the method comprising:
fusing a pre-segmentation mask corresponding to a green screen image and the green screen image to obtain a composite image comprising a foreground region and a background region, the foreground region having a target object, and the target object comprising a target part;
determining a target region comprising the target part in the composite image;
driving the target part in the target region;
determining a target region comprising the driven target part as a driven image;
extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region; and
generating a target foreground region corresponding to the target object according to the driven target part and a region other than the target part in the foreground region.

### Claim 2 (depends on 1)

The method according to claim 1, wherein before the determining a target region comprising the target part in the composite image, the method further comprises:
replacing pixel values of pixel points in the background region in the composite image with a target pixel value to obtain a background-replaced image;
the determining a target region comprising the target part in the composite image comprises:
determining the target region comprising the target part in the background-replaced image; and
the extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region comprises:
extracting the driven target part in the driven image according to pixel values of pixel points of the driven image and the target pixel value.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the extracting the driven target part in the driven image according to pixel values of pixel points of the driven image and the target pixel value comprises:
determining a first segmentation mask corresponding to the driven image according to a difference between a pixel value of each pixel point in the driven image and the target pixel value; and
extracting the driven target part in the driven image by using the first segmentation mask.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining a first segmentation mask corresponding to the driven image according to a difference between a pixel value of each pixel point in the driven image and the target pixel value comprises:
determining a mask value respectively corresponding to each pixel point in the driven image according to the difference between the pixel value of each pixel point in the driven image and the target pixel value; and
determining the first segmentation mask corresponding to the driven image according to the mask value respectively corresponding to each pixel point in the driven image.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the determining a mask value respectively corresponding to each pixel point in the driven image according to the difference between the pixel value of each pixel point in the driven image and the target pixel value comprises:
determining a mask value of the driven pixel point as a first value, the driven pixel point being any pixel point in the driven image in response to that a difference between a pixel value of a driven pixel point and the target pixel value is greater than or equal to a first threshold;
determining the mask value of the driven pixel point as a second value, the first value being greater than the second value in response to that the difference between the pixel value of the driven pixel point and the target pixel value is less than or equal to a second threshold; or
determining the mask value of the driven pixel point according to the difference between the pixel value of the driven pixel point and the target pixel value, the first threshold, and the second threshold, in response to that the difference between the pixel value of the driven pixel point and the target pixel value is not greater than the first threshold and the difference between the pixel value of the driven pixel point and the target pixel value is not less than the second threshold.

### Claim 6 (depends on 1)

The method according to claim 1, wherein before the extracting the driven target part in the driven image by using the first segmentation mask, the method further comprises:
performing edge inward corrosion processing on edges of the target part in the first segmentation mask, to obtain a second segmentation mask corresponding to the driven image; and
the extracting the driven target part in the driven image by using the first segmentation mask comprises:
extracting the driven target part in the driven image by using the second segmentation mask.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the performing edge inward corrosion processing on edges of the target part in the first segmentation mask, to obtain a second segmentation mask corresponding to the driven image comprises:
performing convolution processing on the edges of the target part in the first segmentation mask by using a convolution kernel of a target size, to obtain a third segmentation mask corresponding to the driven image; and
performing smoothing processing on the edges of the target part in the third segmentation mask by using a blur kernel, to obtain the second segmentation mask corresponding to the driven image.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the green screen image is a video frame comprised in a target video; and before the extracting the driven target part in the driven image by using the second segmentation mask, the method further comprises:
obtaining a related segmentation mask corresponding to a related region comprising the target part in an adjacent green screen image, the adjacent green screen image being a video frame in the target video that is adjacent to the green screen image and comprises the target object, and the related segmentation mask being configured to indicate a region in which the target part is located after a driven part in the related region is driven; and
performing temporal smoothing processing on the second segmentation mask according to the related segmentation mask, to obtain a target segmentation mask corresponding to the driven image; and
the extracting the driven target part in the driven image by using the second segmentation mask comprises:
extracting the driven target part in the driven image by using the target segmentation mask.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the obtaining a related segmentation mask corresponding to a related target region comprising the target part in an adjacent green screen image comprises:
fusing a pre-segmentation mask corresponding to the adjacent green screen image and the adjacent green screen image, to obtain a related composite image comprising a related foreground region and a related background region, the related foreground region having the target object;
replacing pixel values of pixel points in the related background region in the related composite image with the target pixel value, to obtain a related background-replaced image;
determining a related target region comprising the target part in the related background-replaced image;
driving the target part in the related target region, to obtain a related driven image; and
determining the related segmentation mask corresponding to the related target region according to pixels of the related driven image and the target pixel value.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the adjacent green screen image comprises a first adjacent green screen image preceding the green screen image and a second adjacent green screen image subsequent to the green screen image in the target video, and the related segmentation mask comprises a first related segmentation mask corresponding to the first adjacent green screen image and a second related segmentation mask corresponding to the second adjacent green screen image; and
the performing temporal smoothing processing on the second segmentation mask according to the related segmentation mask, to obtain a target segmentation mask corresponding to the driven image comprises:
performing weighted summation on the first related segmentation mask, the second related segmentation mask, and the second segmentation mask, to obtain the target segmentation mask.

### Claim 11 (depends on 1)

The method according to claim 1, wherein after the generating a target foreground region corresponding to the target object according to the driven target part and a region other than the target part in the foreground region, the method further comprises:
using a preset background image as a background of the target foreground region and fusing the target foreground region and the preset background image, to obtain a target background-replaced image.

### Claim 12 (depends on 1)

The method according to claim 1, wherein before the extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region, the method further comprises:
obtaining a region segmentation mask corresponding to the target region from the pre-segmentation mask corresponding to the green screen image; and
fusing the region segmentation mask with the driven image, to obtain a fused driven image; and
the extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region comprises:
extracting the driven target part in the driven image according to the pixels of the driven image and the pixels of the background region in response to that the fused driven image does not meet a preset condition.

### Claim 13

An electronic device, comprising:
one or more processors;
a memory; and
one or more application programs, the one or more application programs being stored in the memory and configured to be executed by the one or more processors, and the one or more application programs being configured to perform an image processing method, performed by an electronic device, the method comprising:
fusing a pre-segmentation mask corresponding to a green screen image and the green screen image to obtain a composite image comprising a foreground region and a background region, the foreground region having a target object, and the target object comprising a target part;
determining a target region comprising the target part in the composite image;
driving the target part in the target region;
determining a target region comprising the driven target part as a driven image;
extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region; and
generating a target foreground region corresponding to the target object according to the driven target part and a region other than the target part in the foreground region.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein before the determining a target region comprising the target part in the composite image, the method further comprises:
replacing pixel values of pixel points in the background region in the composite image with a target pixel value to obtain a background-replaced image;
the determining a target region comprising the target part in the composite image comprises:
determining the target region comprising the target part in the background-replaced image; and
the extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region comprises:
extracting the driven target part in the driven image according to pixel values of pixel points of the driven image and the target pixel value.

### Claim 15 (depends on 13)

The electronic device according to claim 13, wherein the extracting the driven target part in the driven image according to pixel values of pixel points of the driven image and the target pixel value comprises:
determining a first segmentation mask corresponding to the driven image according to a difference between a pixel value of each pixel point in the driven image and the target pixel value; and
extracting the driven target part in the driven image by using the first segmentation mask.

### Claim 16 (depends on 13)

The electronic device according to claim 13, wherein the determining a first segmentation mask corresponding to the driven image according to a difference between a pixel value of each pixel point in the driven image and the target pixel value comprises:
determining a mask value respectively corresponding to each pixel point in the driven image according to the difference between the pixel value of each pixel point in the driven image and the target pixel value; and
determining the first segmentation mask corresponding to the driven image according to the mask value respectively corresponding to each pixel point in the driven image.

### Claim 17 (depends on 13)

The electronic device according to claim 13, wherein the determining a mask value respectively corresponding to each pixel point in the driven image according to the difference between the pixel value of each pixel point in the driven image and the target pixel value comprises:
determining a mask value of the driven pixel point as a first value, the driven pixel point being any pixel point in the driven image in response to that a difference between a pixel value of a driven pixel point and the target pixel value is greater than or equal to a first threshold;
determining the mask value of the driven pixel point as a second value, the first value being greater than the second value in response to that the difference between the pixel value of the driven pixel point and the target pixel value is less than or equal to a second threshold; or
determining the mask value of the driven pixel point according to the difference between the pixel value of the driven pixel point and the target pixel value, the first threshold, and the second threshold, in response to that the difference between the pixel value of the driven pixel point and the target pixel value is not greater than the first threshold and the difference between the pixel value of the driven pixel point and the target pixel value is not less than the second threshold.

### Claim 18 (depends on 13)

The electronic device according to claim 13, wherein before the extracting the driven target part in the driven image by using the first segmentation mask, the method further comprises:
performing edge inward corrosion processing on edges of the target part in the first segmentation mask, to obtain a second segmentation mask corresponding to the driven image; and
the extracting the driven target part in the driven image by using the first segmentation mask comprises:
extracting the driven target part in the driven image by using the second segmentation mask.

### Claim 19 (depends on 13)

The electronic device according to claim 13, wherein the performing edge inward corrosion processing on edges of the target part in the first segmentation mask, to obtain a second segmentation mask corresponding to the driven image comprises:
performing convolution processing on the edges of the target part in the first segmentation mask by using a convolution kernel of a target size, to obtain a third segmentation mask corresponding to the driven image; and
performing smoothing processing on the edges of the target part in the third segmentation mask by using a blur kernel, to obtain the second segmentation mask corresponding to the driven image.

### Claim 20

A non-transitory computer-readable storage medium, having program code stored therein, the program code being invoked by a processor to perform an image processing method, the method comprising:
fusing a pre-segmentation mask corresponding to a green screen image and the green screen image to obtain a composite image comprising a foreground region and a background region, the foreground region having a target object, and the target object comprising a target part;
determining a target region comprising the target part in the composite image;
driving the target part in the target region;
determining a target region comprising the driven target part as a driven image;
extracting the driven target part in the driven image according to pixels of the driven image and pixels of the background region; and
generating a target foreground region corresponding to the target object according to the driven target part and a region other than the target part in the foreground region.
