Method of determining image background, device and medium
AssigneeBeijing Kingsoft Internet Security Software Co., Ltd.
InventorHanwen Chang
Life of this patent
Estimating the term…
Abstract
The present disclosure provides a method and an apparatus of determining an image background, a device and a medium. The method includes: recognizing a face region in an image, and obtaining a face distance based on the face region; obtaining a face distance parameter of each pixel in the image based on the face distance; processing the face distance parameter and corresponding color parameter of each pixel in the image by applying a pre-trained image region segmentation model to determine an image region type corresponding to each pixel; determining a background region of the image based on the image region type corresponding to each pixel and performing preset background image processing on the background region.
Claims15
A method of determining an image background, comprising:
- recognizing a face region in an image, and obtaining a face distance based on the face region;
- obtaining a face distance parameter of each pixel in the image based on the face distance;
- processing the face distance parameter and corresponding color parameter of each pixel in the image by applying a pre-trained image region segmentation model to determine an image region type corresponding to each pixel;
- determining a background region of the image based on the image region type corresponding to each pixel and performing preset background image processing on the background region.
A terminal device, comprising a memory, a processor and computer programs stored in the memory and executable by the processor, wherein when the computer programs are executed by the processor, the processor is configured to perform acts of:
- recognizing a face region in an image, and obtaining a face distance based on the face region;
- obtaining a face distance parameter of each pixel in the image based on the face distance;
- processing the face distance parameter and corresponding color parameter of each pixel in the image by applying a pre-trained image region segmentation model to determine an image region type corresponding to each pixel;
- determining a background region of the image based on the image region type corresponding to each pixel and performing preset background image processing on the background region.
A non-transitory computer readable storage medium, having stored therein computer programs that, when executed by a processor, causes the processor to perform a method of determining an image background, the method comprises:
- recognizing a face region in an image, and obtaining a face distance based on the face region;
- obtaining a face distance parameter of each pixel in the image based on the face distance;
- processing the face distance parameter and corresponding color parameter of each pixel in the image by applying a pre-trained image region segmentation model to determine an image region type corresponding to each pixel;
- determining a background region of the image based on the image region type corresponding to each pixel and performing preset background image processing on the background region.
Dependencies are inferred from the claim text.