# US 2019/0377944 A1 · Method and device for image processing, computer readable storage medium, and electronic device

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

- Number: US 2019/0377944 A1
- Document ID: US20190377944A1
- Status: Published application
- Kind: A1
- Application number: 16/296,807
- Filed: 2019-03-08
- Published: 2019-12-12
- Earliest claimed: 2018-06-08
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Yan CHEN
- Web page: https://patentgrep.com/patent/US20190377944A1

## CPC

- G06V 30/413: Classification of content, e.g. text, photographs or tables
- G06F 18/21: Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06T 7/11: Region-based segmentation
- G06T 7/136: involving thresholding
- G06T 7/194: involving foreground-background segmentation
- G06T 7/50: Depth or shape recovery
- G06V 10/26: Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V 10/70: using pattern recognition or machine learning (optical pattern recognition or electronic computations therefor G06V10/88)
- G06V 10/82: using neural networks
- G06F 2218/12: Classification; Matching
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The present disclosure relates to an image processing method and device, a computer readable storage medium, and an electronic device. The method includes: acquiring an image to be processed; detecting a foreground target of the image, and recognizing the foreground target, to obtain a foreground classification result; detecting a background area of the image, and recognizing the background area, to obtain a background classification result; and obtaining a classification label of the image based on the foreground classification result and the background classification result.

## Claims

### Claim 1

An image processing method, comprising:
acquiring an image to be processed;
detecting at least one foreground target of the image, and recognizing the at least one foreground target to obtain a foreground classification result;
detecting a background area of the image, and recognizing the background area to obtain a background classification result; and
obtaining a classification label of the image based on the foreground classification result and the background classification result.

### Claim 2 (depends on 1)

The method of claim 1, wherein recognizing the at least one foreground target to obtain a foreground classification result comprises:
acquiring a target definition of each foreground target detected from the image; and
recognizing the at least one foreground target having the target definition greater than a first definition threshold to obtain the foreground classification result.

### Claim 3 (depends on 2)

The method of claim 2, wherein recognizing the at least one foreground target having the target definition greater than the first definition threshold to obtain the foreground classification result comprises:
acquiring depth data of at least one foreground target having the target definition greater than the first definition threshold, the depth data indicating a distance between the foreground target and an image capturing device; and
recognizing the foreground target with the smallest depth data, to obtain the foreground classification result.

### Claim 4 (depends on 1)

The method of claim 1, wherein recognizing the background area to obtain a background classification result comprises:
acquiring a background definition of the background area; and
recognizing the background area to obtain a background classification result when the background definition is greater than a second definition threshold.

### Claim 5 (depends on 1)

The method of claim 1, wherein obtaining a classification label of the image based on the foreground classification result and the background classification result comprises:
generating a target classification label of the image based on the foreground classification result, and generating an image classification label of the image based on the background classification result.

### Claim 6 (depends on 5)

The method of claim 5, wherein generating the image classification label of the image based on the background classification result comprises:
acquiring a target area of the foreground target;
generating an image classification label of the image based on the background classification result when the target area is less than or equal to an area threshold; and
generating an image classification label of the image based on the foreground classification result when the target area is larger than the area threshold.

### Claim 7 (depends on 1)

The method of claim 1, wherein after obtaining a classification label of the image based on the foreground classification result and the background classification result, the method further comprises:
classifying the image based on the target classification label and the image classification label, and processing the image based on the classification result.

### Claim 8

An image processing device, comprising:
an image acquisition module configured to acquire an image to be processed;
a foreground recognition module configured to detect at least one foreground target of the image, and recognize the at least one foreground target to obtain a foreground classification result;
a background recognition module configured to detect a background area of the image, and recognize the background area to obtain a background classification result; and
a label generation module configured to obtain a classification label of the image based on the foreground classification result and the background classification result.

### Claim 9 (depends on 1)

A computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the method of claim 1.

### Claim 10

An electronic device comprising:
a memory; and
a processor,
wherein the memory stores computer readable instructions, when the instructions are executed by the processor, the processor is configured to:
acquire an image to be processed;
detect at least one foreground target of the image, and recognize the at least one foreground target to obtain a foreground classification result;
detect a background area of the image, and recognize the background area to obtain a background classification result; and
obtain a classification label of the image based on the foreground classification result and the background classification result.

### Claim 11 (depends on 10)

The electronic device of claim 10, wherein, the processor is further configured to:
acquire a target definition of each foreground target detected from the image; and
recognize one or more of the at least one foreground target having the target definition greater than a first definition threshold to obtain the foreground classification result.

### Claim 12 (depends on 11)

The electronic device of claim 11, wherein the processor is further configured to:
acquire depth data corresponding to the one or more foreground targets having the target definition greater than the first definition threshold, the depth data indicating a distance between the foreground target and an image capturing device; and
recognize the foreground target with the smallest depth data to obtain the foreground classification result.

### Claim 13 (depends on 10)

The electronic device of claim 10, wherein the processor is further configured to:
acquire a background definition of the background area; and
recognize the background area to obtain a background classification result when the background definition is greater than a second definition threshold.

### Claim 14 (depends on 10)

The electronic device of claim 10, wherein the processor is further configured to:
generate a target classification label of the image based on the foreground classification result, and generating an image classification label of the image based on the background classification result.

### Claim 15 (depends on 14)

The electronic device of claim 14, wherein the processor is further configured to:
acquire a target area of the foreground target;
generate an image classification label of the image based on the background classification result when the target area is less than or equal to an area threshold; and
generate an image classification label of the image based on the foreground classification result when the target area is larger than the area threshold.

### Claim 16 (depends on 10)

The electronic device of claim 10, wherein the processor is further configured to:
classify the image based on the target classification label and the image classification label, and process the image based on the classification result.

### Claim 17 (depends on 11)

The electronic device of claim 11, wherein the processor is further configured to:
classify the image based on the target classification label and the image classification label, and process the image based on the classification result.

### Claim 18 (depends on 12)

The electronic device of claim 12, wherein the processor is further configured to:
classify the image based on the target classification label and the image classification label, and process the image based on the classification result.

### Claim 19 (depends on 13)

The electronic device of claim 13, wherein the processor is further configured to:
classify the image based on the target classification label and the image classification label, and process the image based on the classification result.

### Claim 20 (depends on 14)

The electronic device of claim 14, wherein the processor is further configured to:
classify the image based on the target classification label and the image classification label, and process the image based on the classification result.
