Method and device for image processing, computer readable storage medium, and electronic device
AssigneeGuangdong Oppo Mobile Telecommunications Corp., Ltd.
InventorYan Chen
Life of this patent
Estimating the term…
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.
Claims18
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;
- 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;
- wherein the target definition refers to a gray difference of a plurality of pixels contained in the foreground target.
An image processing device, comprising:
- one or more computing devices configured to execute one or more software modules, the one or more software modules including:
- 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;
- wherein the foreground recognition module is further configured to:
- acquire a target definition of each foreground target detected from the image;
- and
- recognize the at least one foreground target having the target definition greater than a first definition threshold to obtain the foreground classification result;
- wherein the target definition refers to a gray difference of a plurality of pixels contained in the foreground target.
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;
- wherein the processor is further configured to:
- acquire a target definition of each foreground target detected from the image;
- and
- recognize the at least one foreground target having the target definition greater than a first definition threshold to obtain the foreground classification result;
- wherein the target definition refers to a gray difference of a plurality of pixels contained in the foreground target.
Dependencies are inferred from the claim text.