# US 2021/0279888 A1 · 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 2021/0279888 A1
- Document ID: US20210279888A1
- Status: Published application
- Kind: A1
- Application number: 17/330,268
- Filed: 2021-05-25
- Published: 2021-09-09
- 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/US20210279888A1

## 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

Embodiments of this application disclose a foreground data generation method performed at a computer device. The method includes: obtaining a background image and a target image, the target image containing a target object and a background; removing the background from the target image according to the background image and the target image, to obtain initial foreground data of the target object in the target image; obtaining certain foreground data and uncertain data from the initial foreground data, wherein the uncertain data represents data whose value is between the certain foreground data and background data corresponding to the background; 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 background image and a target image, the target image containing a target object and a background;
removing the background from the target image according to the background image and the target image, to obtain initial foreground data of the target object in the target image;
obtaining certain foreground data and uncertain data from the initial foreground data, wherein the uncertain data represents data whose value is between the certain foreground data and background data corresponding to the background; 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 obtaining certain foreground data and uncertain data from the initial foreground data comprises:
expanding the initial foreground data, to obtain expanded foreground data;
eroding the expanded foreground data, to obtain eroded foreground data; and
re-expanding and blurring the eroded foreground data, to obtain the certain foreground data and the uncertain data.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the re-expanding and blurring the eroded foreground data, to obtain the certain foreground data and the uncertain data comprises:
determining difference data between the re-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 4 (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 5 (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 6 (depends on 5)

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

### Claim 7 (depends on 6)

The method according to claim 6, 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 8

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 plurality of operations including:
obtaining a background image and a target image, the target image containing a target object and a background;
removing the background from the target image according to the background image and the target image, to obtain initial foreground data of the target object in the target image;
obtaining certain foreground data and uncertain data from the initial foreground data, wherein the uncertain data represents data whose value is between the certain foreground data and background data corresponding to the background; and
segmenting the certain foreground data from the uncertain data, to obtain target foreground data of the target object in the target image.

### Claim 9 (depends on 8)

The computer device according to claim 8, wherein the obtaining certain foreground data and uncertain data from the initial foreground data comprises:
expanding the initial foreground data, to obtain expanded foreground data;
eroding the expanded foreground data, to obtain eroded foreground data; and
re-expanding and blurring the eroded foreground data, to obtain the certain foreground data and the uncertain data.

### Claim 10 (depends on 9)

The computer device according to claim 9, wherein the re-expanding and blurring the eroded foreground data, to obtain the certain foreground data and the uncertain data comprises:
determining difference data between the re-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 11 (depends on 8)

The computer device according to claim 8, 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 12 (depends on 8)

The computer device according to claim 8, wherein the plurality of operations further comprise:
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 13 (depends on 12)

The computer device according to claim 12, wherein the plurality of operations further comprise:
training a background segmentation model by using the target image sample set.

### Claim 14 (depends on 13)

The computer device according to claim 13, wherein the plurality of operations further comprise:
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 15

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 plurality of operations including:
obtaining a background image and a target image, the target image containing a target object and a background;
removing the background from the target image according to the background image and the target image, to obtain initial foreground data of the target object in the target image;
obtaining certain foreground data and uncertain data from the initial foreground data, wherein the uncertain data represents data whose value is between the certain foreground data and background data corresponding to the background; and
segmenting the certain foreground data from the uncertain data, to obtain target foreground data of the target object in the target image.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the obtaining certain foreground data and uncertain data from the initial foreground data comprises:
expanding the initial foreground data, to obtain expanded foreground data;
eroding the expanded foreground data, to obtain eroded foreground data; and
re-expanding and blurring the eroded foreground data, to obtain the certain foreground data and the uncertain data.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium according to claim 16, wherein the re-expanding and blurring the eroded foreground data, to obtain the certain foreground data and the uncertain data comprises:
determining difference data between the re-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 18 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the plurality of operations further comprise:
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 19 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein the plurality of operations further comprise:
training a background segmentation model by using the target image sample set.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein the plurality of operations further comprise:
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.
