White balance processing method and apparatus
AssigneeGuangdong Oppo Mobile Telecommunications Corp., Ltd.
InventorQuan Yuan
Life of this patent
Estimating the term…
Abstract
A white balance processing method and apparatus are provided. The method comprises: imaging a living paragraphed object to obtain an image; obtaining a white balance gain value according to the area occupied by a target region containing a human face in the image; and performing white balance processing on the image according to the white balance gain value.
Claims14
A white balance processing method, comprising:
- imaging a living shot object to obtain an image;
- obtaining a white balance gain value according to an area of a target region comprising a face in the image;
- and
- performing white balance processing on the image according to the white balance gain value, wherein
- obtaining the white balance gain value according to the area of the target region comprising the face in the image comprises:
- determining, when an area occupied by a face region in the image is not less than a preset area threshold, the face region as the target region;
- or determining, when the area occupied by the face region in the image is less than the preset area threshold, a portrait region as the target region;
- calculating an area proportion of the target region in the image according to the area occupied by the target region in the image;
- and
- calculating a first gain value and a second gain value of each color component according to the area proportion to obtain the white balance gain value, the first gain value being used to regulate the face in the image to a skin color and the second gain value being different from the first gain value.
A white balance processing device, comprising a camera and a processor, wherein:
- the camera is configured to image a living shot object to obtain an image;
- and
- the processor is configured to:
- obtain a white balance gain value according to an area of a target region comprising a face in the image;
- perform white balance processing on the image according to the white balance gain value;
- determine, when an area occupied by a face region in the image is not less than a preset area threshold, the face region as the target region, or determine, when the area occupied by a face region in the image is less than the preset area threshold, a portrait region in the image as the garget region;
- calculate an area proportion of the target region in the image according to the area occupied by the target region in the image;
- and
- calculate a first gain value and a second gain value of each color component according to the area proportion to obtain the white balance gain value, the first gain value being used to regulate the face in the image to a skin color and the second gain value being different from the first gain value.
A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein the program is executed by a processor to implement a white balance processing method, the method comprising:
- imaging a living shot object via a camera to obtain an image;
- obtaining a white balance gain value according to an area of a target region comprising a face in the image;
- and
- performing white balance processing on the image according to the white balance gain value, wherein
- obtaining the white balance gain value according to the area of the target region comprising the face in the image comprises:
- determining, when an area occupied by a face region in the image is not less than a preset area threshold, the face region as the target region;
- or determining, when the area occupied by the face region in the image is less than the preset area threshold, a portrait region as the target region;
- calculating an area proportion of the target region in the image according to the area occupied by the target region in the image;
- and
- calculating a first gain value and a second gain value of each color component according to the area proportion to obtain the white balance gain value, the first gain value being used to regulate the face in the image to a skin color and the second gain value being different from the first gain value.
Dependencies are inferred from the claim text.