CN-121985228-A - Face white balance processing method, device, chip and computer equipment
Abstract
The application relates to a face white balance processing method, a device, a chip and computer equipment, wherein the method comprises the steps of extracting skin color pixel points from a face area of an image to be processed; the method comprises the steps of determining chromaticity data of skin color pixels under corresponding calibration color temperatures according to calibration white balance parameters of environment brightness corresponding to an image to be processed under different calibration color temperatures, determining target white balance parameters of the skin color pixels under the environment brightness according to deviation degrees between the chromaticity data of the skin color pixels under the calibration color temperatures and a target chromaticity range, and performing white balance processing on a face area according to the target white balance parameters. The application can improve the white balance effect.
Inventors
- GUO YITING
- ZHAO RUXUE
- HU JIYAO
Assignees
- 展讯半导体(南京)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260303
Claims (10)
- 1. The face white balance processing method is characterized by comprising the following steps of: extracting skin color pixel points from a face area of an image to be processed; determining chromaticity data of the skin color pixel points under corresponding calibration color temperatures according to the calibration white balance parameters of the environment brightness corresponding to the image to be processed under different calibration color temperatures; determining a target white balance parameter of the skin color pixel under the ambient brightness according to the deviation degree between the chromaticity data of the skin color pixel under each calibrated color temperature and the target chromaticity range; And carrying out white balance processing on the face area according to the target white balance parameter.
- 2. The method of claim 1, wherein determining the target white balance parameter of the skin tone pixel at the ambient brightness according to the degree of deviation between the chromaticity data of the skin tone pixel at each nominal color temperature and the target chromaticity range comprises: According to the deviation degree, determining an initial white balance parameter of the skin color pixel point under the ambient brightness; And determining the target white balance parameter according to the color cast direction of the skin color pixel point under the initial white balance parameter.
- 3. The method of claim 2, wherein said determining an initial white balance parameter for said skin tone pixel at said ambient brightness based on each said degree of deviation comprises: Selecting a target calibration color temperature from the calibration color temperatures according to the deviation degrees; determining an initial white balance parameter according to the target calibration color temperature; The target color temperature is a color temperature corresponding to target chromaticity data, and the target chromaticity data is obtained by selecting according to the approach degree of each chromaticity data and a boundary value in the target chromaticity range.
- 4. The method of claim 3, wherein said selecting a target calibration color temperature from each of said calibration color temperatures based on each of said degrees of deviation comprises: determining the color temperature weight of the skin color pixel point under the calibrated color temperature according to the deviation degree corresponding to the calibrated color temperature aiming at each calibrated color temperature, wherein the color temperature weight of the skin color pixel point under the calibrated color temperature is used for representing the approaching degree of the chromaticity data of the skin color pixel point under the calibrated color temperature and the boundary value in the target chromaticity range; Selecting the target calibration color temperature from the calibration color temperatures according to the color temperature weights corresponding to the calibration color temperatures; Correspondingly, the determining the initial white balance parameter according to the target calibration color temperature comprises the following steps: and determining the initial white balance parameter according to the target standard color temperature and the corresponding color temperature weight.
- 5. The method of claim 4, wherein the color temperature weights for each of the calibrated color temperatures include a low color temperature weight and a high color temperature weight, and wherein the determining the color temperature weight for the skin tone pixel at the calibrated color temperature based on the degree of deviation for the calibrated color temperature, respectively, comprises: Responding to the fact that the chromaticity data of the skin color pixel points under the calibrated color temperature exceeds the upper boundary value of the target chromaticity range, determining the high color temperature weight of the skin color pixel points under the calibrated color temperature according to the exceeding degree, and setting the low color temperature weight of the skin color pixel points under the calibrated color temperature as a first value; Responding to the fact that the chromaticity data of the skin color pixel points under the calibrated color temperature exceeds the lower boundary value of the target chromaticity range, determining the low color temperature weight of the skin color pixel points under the calibrated color temperature according to the exceeding degree, and setting the high color temperature weight of the skin color pixel points under the calibrated color temperature as a first value; And determining that the low color temperature weight and the high color temperature weight of the skin color pixel point under the calibrated color temperature are both second values according to the fact that the chromaticity data of the skin color pixel point under the calibrated color temperature falls in the target chromaticity range, wherein the second values are larger than the first values.
- 6. The method of claim 2, wherein determining the target white balance parameter based on a color cast direction of the skin tone pixel under the initial white balance parameter comprises: And performing cascade adjustment on the light color parameters corresponding to the initial white balance parameters according to the opposite direction of the color cast direction until the chromaticity data of the skin color pixel points under the white balance parameters corresponding to the adjusted light color parameters fall in the target chromaticity range.
- 7. The method of claim 6, wherein the color parameters include color temperature parameters and color deviation parameters, and wherein the performing cascade adjustment on the color parameters corresponding to the initial white balance parameters according to the opposite direction of the color cast direction until the chromaticity data of the skin color pixels under the white balance parameters corresponding to the adjusted color parameters falls within the target chromaticity range comprises: According to the opposite direction, carrying out cascade adjustment on the color temperature parameters until the chromaticity data of the skin color pixel points under the white balance parameters corresponding to the adjusted color temperature parameters fall in the adjacent area of the target chromaticity range; and carrying out cascade adjustment on the color deviation parameters according to the opposite direction until the chromaticity data of the skin color pixel points under the white balance parameters corresponding to the adjusted color deviation parameters fall in the target chromaticity range.
- 8. A face white balance processing apparatus, comprising: the first extraction module is used for extracting skin color pixel points from a face area of an image to be processed; The first determining module is used for determining chromaticity data of the skin color pixel points under corresponding calibration color temperatures according to the calibration white balance parameters of the environment brightness corresponding to the image to be processed under different calibration color temperatures; The second determining module is used for determining a target white balance parameter of the skin color pixel under the environment brightness according to the deviation degree between the chromaticity data of the skin color pixel under each calibrated color temperature and the target chromaticity range; And the white balance processing module is used for carrying out white balance processing on the face area according to the target white balance parameters.
- 9. A chip comprising a processor and a communication interface, the processor being configured to cause the chip to perform the steps of the method of any one of claims 1 to 7.
- 10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
Description
Face white balance processing method, device, chip and computer equipment Technical Field The present application relates to the field of image processing technologies, and in particular, to a face white balance processing method, device, chip, and computer apparatus. Background At present, the white balance processing mode is that the pixel value of the skin color card and the pixel value of the gray scale card under the same light source are calibrated, then the mapping relation between the pixel value of the skin color card and the pixel value of the gray scale card is determined, and finally the white balance parameter is determined based on the mapping relation. However, in the case of inaccurate mapping, the determined white balance parameter is inaccurate, so that the white balance processing effect on the face in the image based on the white balance parameter is poor. Disclosure of Invention In view of the foregoing, it is desirable to provide a face white balance processing method, apparatus, chip, and computer device capable of improving the white balance effect. The application provides a face white balance processing method, which comprises the steps of extracting skin color pixel points from a face region of an image to be processed, determining chromaticity data of the skin color pixel points under corresponding calibrated color temperatures according to calibrated white balance parameters of environment brightness corresponding to the image to be processed under different calibrated color temperatures, determining target white balance parameters of the skin color pixel points under the environment brightness according to deviation degrees between the chromaticity data of the skin color pixel points under the calibrated color temperatures and a target chromaticity range, and performing white balance processing on the face region according to the target white balance parameters. In one embodiment, the target white balance parameter of the skin color pixel under the environment brightness is determined according to the deviation degree between the chromaticity data of the skin color pixel under each calibrated color temperature and the target chromaticity range, and the target white balance parameter is determined according to the deviation degree and the color deviation direction of the skin color pixel under the environment brightness. In one embodiment, determining the initial white balance parameter of the skin color pixel point under the environment brightness according to each deviation degree comprises selecting a target calibration color temperature from all calibration color temperatures according to each deviation degree, and determining the initial white balance parameter according to the target calibration color temperature, wherein the target calibration color temperature is the calibration color temperature corresponding to target chromaticity data, and the target chromaticity data is obtained by selecting according to the approaching degree of all chromaticity data and a boundary value in a target chromaticity range. In one embodiment, the target calibration color temperature is selected from the calibration color temperatures according to the deviation degrees, the method comprises the steps of determining color temperature weights of skin color pixels under the calibration color temperatures according to the deviation degrees corresponding to the calibration color temperatures for each calibration color temperature, wherein the color temperature weights of the skin color pixels under the calibration color temperatures are used for representing the approaching degree of chromaticity data of the skin color pixels under the calibration color temperatures and boundary values in a target chromaticity range, selecting the target calibration color temperature from the calibration color temperatures according to the color temperature weights corresponding to the calibration color temperatures, and accordingly, determining initial white balance parameters according to the target calibration color temperatures, wherein the initial white balance parameters are determined according to the target calibration color temperatures and the corresponding color temperature weights. In one embodiment, the color temperature weights corresponding to each calibration color temperature comprise low color temperature weights and high color temperature weights, and accordingly, the color temperature weights of the skin color pixels under the calibration color temperatures are determined according to deviation degrees corresponding to the calibration color temperatures, the color temperature weights of the skin color pixels under the calibration color temperatures are determined according to the deviation degrees, the high color temperature weights of the skin color pixels under the calibration color temperatures are determined according to the deviation degrees, the low color temperature weights of the sk