# US 2021/0241432 A1 · Image Processing Method and Apparatus, and Device

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

- Number: US 2021/0241432 A1
- Document ID: US20210241432A1
- Status: Published application
- Kind: A1
- Application number: 17/230,169
- Filed: 2021-04-14
- Published: 2021-08-05
- Earliest claimed: 2018-10-15
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yu Li; Feilong Ma; Tizheng Wang; Xiujie Huang
- Web page: https://patentgrep.com/patent/US20210241432A1

## CPC

- G06T 5/94: based on local image properties, e.g. for local contrast enhancement
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06T 5/20: using local operators
- G06T 5/60: using machine learning, e.g. neural networks
- G06T 5/70: Denoising; Smoothing
- G06T 7/11: Region-based segmentation
- G06T 7/194: involving foreground-background segmentation
- G06V 20/35: {Categorising the entire scene, e.g. birthday party or wedding scene}
- H04N 5/2621: {Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability}
- H04N 23/61: based on recognised objects
- G06T 2207/10016: Video; Image sequence
- G06T 2207/10024: Color image
- 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)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An image processing method includes determining a target area and a background area in an image by performing mask segmentation on the image. Different color processing modes are applied to the target area and the background area, so that luminance of the target area is greater than luminance of the background area, or chrominance of the target area is greater than chrominance of the background area, and a main object corresponding to the target area is more prominently highlighted.

## Claims

### Claim 1

An image processing method, implemented by a terminal time, wherein the image processing method comprises:
capturing an image;
identifying a main object area or a background area in the image based on a category of an object in the image and using a neural network, wherein the background area is an area of the image other than the main object area;
when the terminal identifies only the background in the image, retaining a color of the main object area in the image; and performing the black and white processing or blurring processing on the background area in the image;
when the terminal identifies only the background, performing the black and white processing or blurring processing on the background area; and
generating a target image or a target video based on the image.

### Claim 2 (depends on 1)

The image processing method of claim 1, wherein a first mask of a first object category identifies the main subject area, wherein a second mask of a second object category identifies the background area, wherein the first object category comprises at least one of a person, an animal, a plant, a vehicle, or another preset object category, wherein the second object category is the background, and wherein the image processing method further comprises determining the first mask and the second mask are based on the neural network.

### Claim 3 (depends on 1)

The image processing method of claim 1, further comprising obtaining the neural network based on, a training data set for training, wherein the training data set comprises input images and mask graphs of a plurality of application scenarios.

### Claim 4 (depends on 2)

The image processing method of claim 2, wherein the neural network identifies at least two object categories of the person, the animal, the plant, the vehicle, clothes, or the another preset object category.

### Claim 5 (depends on 2)

The image processing method of claim 2, wherein a first quantity of pixels that are in the image and that correspond to the first mask is greater than a se and quantity of pixels that are in the image and that correspond to a third mask of a third object category, and wherein the third object category is different from the second object category.

### Claim 6 (depends on 2)

The image processing method of claim 2, wherein the first mask has a main object determining priority greater than a determining priority of another mask corresponding to another object category.

### Claim 7 (depends on 1)

The image processing method of claim 1, wherein the main object area comprises a plurality of individuals, and wherein the individuals belong to a same object category or different object categories.

### Claim 8 (depends on 1)

The image processing method of claim 1, further comprising obtaining the main object area by performing pixel-level segmentation on the object using the neural network.

### Claim 9

An image processing apparatus, comprising
a processor; and
a memory coupled to the processor and configured to store instructions that, when executed by the processor, cause the image processing apparatus to be configured to:
capture an image;
identify a main object area or a background area in the image based on a category of an object in the image using a neural network, wherein the background area is an area of the image other than the main object area; and
when the processor identifies a main subject and a background in the image,
retain a color of the main object area in the image; and
perform black and white processing or blurring processing on the background area in the image;
when the processor identifies only the background, perform the black and white processing or blurring processing on the background area; and
generate a target image or a target video based on the image after processing.

### Claim 10 (depends on 9)

The image processing apparatus of claim 9, wherein a first mask of a first object category identifies the main subject area, wherein a second mask of a second object category identifies the background area, wherein the first object category comprises at least one of a person, an animal, a plant, a vehicle, or another preset object category, wherein the second object category is the background, and wherein the instructions further cause the image processing apparatus to be configured to determine the first mask and the second mask based on the neural network.

### Claim 11 (depends on 9)

The image processing apparatus of claim 9, wherein the color processing apparatus is further configured to obtain the neural network is based on a training data set for training, wherein the training data set comprises input images and mask graphs of a plurality of application scenarios.

### Claim 12 (depends on 10)

The image processing apparatus of claim 10, wherein the neural network identifies at least two object categories of the person, the animal, the plant, the vehicle, clothes, or the another preset object category.

### Claim 13 (depends on 10)

The image processing apparatus of claim 10, wherein a first quantity of pixels that are in the image and that correspond to the first mask is greater than a second quantity of pixels that are in the image and that correspond to a third mask of a third object category, and wherein the third object category is different from the second object category.

### Claim 14 (depends on 10)

The image processing apparatus of claim 10, wherein the first mask has a main object determining priority greater than a determining priority of another of another mask corresponding to another object category.

### Claim 15 (depends on 9)

The image processing apparatus of claim 9, wherein the main object area comprises a plurality of individuals, and wherein the individuals belong to a same object category or different object categories.

### Claim 16 (depends on 9)

The image processing apparatus of claim 9, wherein the color processing apparatus is further configured to obtain the main object area by performing pixel-level segmentation on the object using the neural network.

### Claim 17

A terminal device, wherein the terminal device comprises:
a camera configured to capture an image;
a processor coupled to the camera; and
a memory coupled to the processor and configured to store instructions that, when executed by the processor, cause the terminal device to be configured to:
capture an image;
identify a main object area or a background area in the image based on a category of an object in the image using a neural network, wherein the background area is an area of the image other than the main object area; and
when the terminal device identifies a main subject and a background in the image,
retain a color of the main object area in the image; and
perform black and white processing or blurring processing on the background area in the image;
when the terminal device identifies only the background, perform the black and white processing or blurring processing on the background area; and
generate a target image or a target video based on the image after processing.

### Claim 18 (depends on 17)

The terminal device of claim 17, wherein the terminal device further comprises an antenna system configured to receive and send a wireless communication signal under control of the processor to implement wireless communication with a mobile communications network, that is one or more of a Global System or Mobile Communications (GSM) network, a code division multiple access (CDMA) network, a 3rd generation (3G) network, a 4th generation (4G) network, a 5th generation (5G) network, frequency division multiple access (FDMA) network, a time division multiple access (TDMA) network, a primary domain controller (PDC) network, a total access communication system (TACS) network, an Advanced Mobile Phone System (AMPS) network, a wideband CDMA (WCDMA) network, a time domain synchronous CDMA (TDSCDMA) network, a WI-FI network, or a Long-Term Evolution (LTE) network.

### Claim 19

An image processing apparatus, comprising:
a processor; and
a memory coupled to the processor and configured to store instructions that, when executed by the processor, cause the image processing apparatus to be configured to:
photograph a video;
determine a main object in a video image of the video; and
retain a color of a target area in the video image, wherein the target area corresponds to the main object; and
perform black and white processing on a background area in the video image to obtain a target video,
wherein the background area is an area of the video image other than the target area.

### Claim 20 (depends on 19)

The image processing apparatus of claim 19, wherein the instructions further cause the image processing apparatus to be configured perform filter processing on the background area, and wherein the filter processing comprises at least one of bokeh processing, darkening processing, retro processing, film processing, or texture superimposition processing.
