IP Library Granted Patent US 11,064,174
Granted Patent B2
US 11,064,174 · App. 16/629,896 · Granted Jul 13, 2021

White balance processing method and apparatus

Inventor: Quan Yuan (Guangdong, CN)
Assignee: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
H04N9/735G06K9/00228G06T7/50G06T7/90H04N9/643H04N9/68G06T2207/30201
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,064,174
App. No.
16/629,896
Granted
Jul 13, 2021
Kind
B2
Abstract

The present application provides a white balance processing method and apparatus. The method comprises: recognizing a portrait region in an image; calculating a target white balance gain value according to the area occupied by the portrait region in the image; and performing white balance processing on the image according to the target white balance gain value. The present application resolves the problems of poor user experience due to inaccurate image color restoration caused by a small area proportion of a human face region in an image during white balance adjustment according to the white balance gain value determined according to the area occupied by the human face in the case of a long photography distance.

Claims (66)

1. A white balance processing method, comprising:

performing face recognition on an image to obtain a face region;

determining candidate regions with depths similar to that of the face region according to depth information of the image, and identifying a region adjacent to the face region in the candidate regions as a portrait region in the image, the portrait region comprising the face region and a body region;

determining that an area occupied by the portrait region in the image is less than a preset area threshold;

calculating, when the area occupied by the portrait region in the image is not less than the preset area threshold, a target white balance gain value according to an area occupied by the face region in the image;

calculating, when the area occupied by the portrait region in the image is less than the preset area threshold, a target white balance gain value according to the area occupied by the portrait region in the image; and

performing white balance processing on the image according to the target white balance gain value.

2. The white balance processing method of claim 1 , wherein calculating the target white balance gain value according to the area occupied by the portrait region in the image comprises:

calculating an area proportion of the portrait region in the image according to the area occupied by the portrait 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 target white balance gain value, the first gain value being used to regulate a face in the image to a skin color and the second gain value being different from the first gain value.

3. The white balance processing method of claim 2 , wherein calculating the first gain value and the second gain value of each color component according to the area proportion to obtain the target white balance gain value comprises:

determining a weight of the first gain value and a weight of the second gain value according to the area proportion; and

performing weighted calculation on the first gain value and the second gain value according to the determined weight of the first gain value and the weight of the second gain value to obtain the target white balance gain value.

4. The white balance processing method of claim 1 , wherein before identifying the portrait region in the image, the method further comprises at least one of the following:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

5. A computer device, comprising a memory, a processor and a computer program stored in the memory and capable of running in the processor, wherein the processor executes the program to implement a white balance processing method, the method comprising:

performing face recognition on an image to obtain a face region;

determining candidate regions with depths similar to that of the face region according to depth information of the image, and identifying a region adjacent to the face region in the candidate regions as a portrait region in the image, the portrait region comprising the face region and a body region;

determining that an area occupied by the portrait region in the image is less than a preset area threshold;

calculating, when the area occupied by the portrait region in the image is not less than the preset area threshold, a target white balance gain value according to an area occupied by the face region in the image;

calculating, when the area occupied by the portrait region in the image is less than the preset area threshold, a target white balance gain value according to the area occupied by the portrait region in the image; and

performing white balance processing on the image according to the target white balance gain value.

6. 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:

performing face recognition on an image to obtain a face region;

determining candidate regions with depths similar to that of the face region according to depth information of the image, and identifying a region adjacent to the face region in the candidate regions as a portrait region in the image, the portrait region comprising the face region and a body region;

determining that an area occupied by the portrait region in the image is less than a preset area threshold;

calculating, when the area occupied by the portrait region in the image is not less than the preset area threshold, a target white balance gain value according to an area occupied by the face region in the image;

calculating, when the area occupied by the portrait region in the image is less than the preset area threshold, a target white balance gain value according to the area occupied by the portrait region in the image; and

performing white balance processing on the image according to the target white balance gain value.

7. The white balance processing method of claim 2 , wherein before identifying the portrait region in the image, the method further comprises at least one of the following:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

8. The white balance processing method of claim 3 , wherein before identifying the portrait region in the image, the method further comprises at least one of the following:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

9. The computer device of claim 5 , wherein the processor executes the program to implement the following operations:

calculating an area proportion of the portrait region in the image according to the area occupied by the portrait 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 target white balance gain value, the first gain value being used to regulate a face in the image to a skin color and the second gain value being different from the first gain value.

10. The computer device of claim 9 , wherein the processor executes the program to implement the following operations:

determining a weight of the first gain value and a weight of the second gain value according to the area proportion; and

performing weighted calculation on the first gain value and the second gain value according to the determined weight of the first gain value and the weight of the second gain value to obtain the target white balance gain value.

11. The computer device of claim 5 , wherein the processor executes the program to implement at least one of the following operations:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

12. The computer device of claim 9 , wherein the processor executes the program to implement at least one of the following operations:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

13. The computer device of claim 10 , wherein the processor executes the program to implement at least one of the following operations:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

14. The non-transitory computer-readable storage medium of claim 6 , wherein the program is executed by a processor to implement the following operations:

calculating an area proportion of the portrait region in the image according to the area occupied by the portrait 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 target white balance gain value, the first gain value being used to regulate a face in the image to a skin color and the second gain value being different from the first gain value.

15. The non-transitory computer-readable storage medium of claim 14 , wherein the program is executed by a processor to implement the following operations:

determining a weight of the first gain value and a weight of the second gain value according to the area proportion; and

performing weighted calculation on the first gain value and the second gain value according to the determined weight of the first gain value and the weight of the second gain value to obtain the target white balance gain value.

16. The non-transitory computer-readable storage medium of claim 6 , wherein the program is executed by a processor to implement at least one of the following operations:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

17. The non-transitory computer-readable storage medium of claim 14 , wherein the program is executed by a processor to implement at least one of the following operations:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

18. The non-transitory computer-readable storage medium of claim 15 , wherein the program is executed by a processor to implement at least one of the following operations:

obtaining the image by shooting with a rear camera;

or, obtaining the image by shooting with a focal length greater than a preset focal length threshold.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 9, 2020
From: YUAN, QUAN
To: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
Reel/Frame 051471/0201 →
Priority Claims (1)
CN 201710557843.5 · Jul 10, 2017 · national
Continuity (1)
Related Publication 20200396435A1 · Dec 17, 2020