# US 12,223,658 B2 · Foreground data generation method and method for applying same, related apparatus, and system

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

- Number: US 12,223,658 B2
- Document ID: US12223658B2
- Status: Granted
- Kind: B2
- Application number: 18/601,882
- Filed: 2024-03-11
- Published: 2024-06-27
- Granted: 2025-02-11
- Earliest claimed: 2019-04-12
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Jingmin Luo; Xiaolong Zhu
- Web page: https://patentgrep.com/patent/US12223658B2

## CPC

- G06T 7/11: Region-based segmentation
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06T 5/70: Denoising; Smoothing
- G06T 7/194: involving foreground-background segmentation
- G06V 10/28: Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
- G06V 10/34: Smoothing or thinning of the pattern; Morphological operations; Skeletonisation
- G06V 40/20: Movements or behaviour, e.g. gesture recognition (recognition of facial expressions G06V40/16)
- G06T 2207/10016: Video; Image sequence
- G06T 2207/10024: Color image
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

This application discloses a foreground data generation method performed at a computer device. The method includes: obtaining a target image, the target image containing a target object and a background; removing the background from the target image to obtain initial foreground data of the target object in the target image; expanding the initial foreground data and eroding the expanded foreground data; blurring the eroded foreground data to obtain certain foreground data and uncertain data from the initial foreground data; and segmenting the certain foreground data from the uncertain data, to obtain target foreground data of the target object in the target image.

## Claims

### Claim 1

A foreground data generation method performed by a computer device, the method comprising:
obtaining a target image, the target image containing a target object and a background;
removing the background from the target image to obtain initial foreground data of the target object in the target image;
expanding the initial foreground data and eroding the expanded foreground data;
blurring the eroded foreground data to obtain certain foreground data and uncertain data from the initial foreground data; and
segmenting the certain foreground data from the uncertain data, to obtain target foreground data of the target object in the target image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the blurring the eroded foreground data to obtain the certain foreground data and the uncertain data comprises:
determining difference data between the expanded foreground data and the eroded foreground data;
blurring the difference data;
performing summation on the blurred difference data and the eroded foreground data, to obtain a summation result; and
determining data, in the summation result, that meets a foreground data screening condition as the certain foreground data, and determining data, in the summation result, that meets neither the foreground data screening condition nor a background data screening condition as the uncertain data.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the obtaining a target image, containing a target object and a background comprises:
obtaining multiple target images, each target image containing the target object having a gesture and gestures of the target object in the multiple target images being different from each other.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
obtaining a background image set, each background image having a unique background;
respectively constructing target images of the target object in the unique backgrounds of the background images according to the target foreground data; and
constructing a target image sample set based on the target images of the target object in the unique backgrounds.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
training a background segmentation model by using the target image sample.

### Claim 6 (depends on 5)

The method according to claim 5, further comprising:
acquiring a to-be-processed target image;
separating foreground data and background data from the to-be-processed target image by using the background segmentation model; and
separately rendering the foreground data and the background data of the to-be- processed target image.

### Claim 7

A computer device, comprising a memory, a processor, and a plurality of computer programs stored in the memory that, when executed by the processor, cause the computer device to perform a foreground data generation method including:
obtaining a target image, the target image containing a target object and a background;
removing the background from the target image to obtain initial foreground data of the target object in the target image;
expanding the initial foreground data and eroding the expanded foreground data;
blurring the eroded foreground data to obtain certain foreground data and uncertain data from the initial foreground data; and
segmenting the certain foreground data from the uncertain data, to obtain target foreground data of the target object in the target image.

### Claim 8 (depends on 7)

The computer device according to claim 7, wherein the blurring the eroded foreground data to obtain the certain foreground data and the uncertain data comprises:
determining difference data between the expanded foreground data and the eroded foreground data;
blurring the difference data;
performing summation on the blurred difference data and the eroded foreground data, to obtain a summation result; and
determining data, in the summation result, that meets a foreground data screening condition as the certain foreground data, and determining data, in the summation result, that meets neither the foreground data screening condition nor a background data screening condition as the uncertain data.

### Claim 9 (depends on 7)

The computer device according to claim 7, wherein the obtaining a target image, containing a target object and a background comprises:
obtaining multiple target images, each target image containing the target object having a gesture and gestures of the target object in the multiple target images being different from each other.

### Claim 10 (depends on 7)

The computer device according to claim 7, wherein the method further comprises:
obtaining a background image set, each background image having a unique background;
respectively constructing target images of the target object in the unique backgrounds of the background images according to the target foreground data; and
constructing a target image sample set based on the target images of the target object in the unique backgrounds.

### Claim 11 (depends on 7)

The computer device according to claim 7, wherein the method further comprises:
training a background segmentation model by using the target image sample.

### Claim 12 (depends on 11)

The computer device according to claim 11, wherein the method further comprises:
acquiring a to-be-processed target image;
separating foreground data and background data from the to-be-processed target image by using the background segmentation model; and
separately rendering the foreground data and the background data of the to-be- processed target image.

### Claim 13

A non-transitory computer-readable storage medium, storing processor- executable instructions, the processor-executable instructions, when executed by a processor of a computer device, causing the computer device to perform a foreground data generation method including:
obtaining a target image, the target image containing a target object and a background;
removing the background from the target image to obtain initial foreground data of the target object in the target image;
expanding the initial foreground data and eroding the expanded foreground data;
blurring the eroded foreground data to obtain certain foreground data and uncertain data from the initial foreground data; and
segmenting the certain foreground data from the uncertain data, to obtain target foreground data of the target object in the target image.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the blurring the eroded foreground data to obtain the certain foreground data and the uncertain data comprises:
determining difference data between the expanded foreground data and the eroded foreground data;
blurring the difference data;
performing summation on the blurred difference data and the eroded foreground data, to obtain a summation result; and
determining data, in the summation result, that meets a foreground data screening condition as the certain foreground data, and determining data, in the summation result, that meets neither the foreground data screening condition nor a background data screening condition as the uncertain data.

### Claim 15 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the obtaining a target image, containing a target object and a background comprises:
obtaining multiple target images, each target image containing the target object having a gesture and gestures of the target object in the multiple target images being different from each other.

### Claim 16 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the method further comprises:
obtaining a background image set, each background image having a unique background;
respectively constructing target images of the target object in the unique backgrounds of the background images according to the target foreground data; and
constructing a target image sample set based on the target images of the target object in the unique backgrounds.

### Claim 17 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the method further comprises:
training a background segmentation model by using the target image sample.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein the method further comprises:
acquiring a to-be-processed target image;
separating foreground data and background data from the to-be-processed target image by using the background segmentation model; and
separately rendering the foreground data and the background data of the to-be- processed target image.
