White balance calibration method based on skin color data and image processing apparatus using the same
AssigneeRealtek Semiconductor Corp.
InventorsChing-Ju Hsiao, Wen-Tsung Huang
Life of this patent
Estimating the term…
Abstract
Disclosed are a white balance calibration method based on skin color data and an image processing apparatus using the same. By using the method and the image processing apparatus, weight allocation of the skin color data in an input image may be adaptively performed to avoid white balance calibration errors due to excessive skin color data. Therefore, the present disclosure can further solve an issue that in video applications, the white balance calibration is easily interfered by a large amount of the skin color data. Moreover, the present disclosure may be adapted to different color temperatures and may output images having colors closer to actual colors.
Claims20
A white balance calibration method based on skin color data, adapted to an image processing apparatus, comprising:
- receiving a plurality of pixel data of an input image, wherein each of the pixel data includes a first color component, a second color component and a third color component;
- dividing the input image into a plurality of blocks, and calculating a first average component of the first color components, a second average component of the second color components and a third average component of the third color components of each block;
- calculating first data and second data according to the first average component, the second average component and the third average component of each block;
- mapping each block to a position coordinate of a color space according to the first data and the second data, wherein a white region and a skin color region are built in the color space, the white region includes white colors at different color temperatures, and the skin color region includes skin colors at different color temperatures;
- determining whether a number of the blocks in an overlapping region of the white region and the skin color region is smaller than a predetermined number, and when the number of the blocks in the overlapping region of the white region and the skin color region is smaller than the predetermined number, calculating weighted averages of the first data and the second data of each block in the white region to generate a first weight value and a second weight value and converting the first weight value and the second weight value to a first gain value and a second gain value according to a predetermined precision, wherein a weighted value of each of the first data and each of the second data used to calculate the first weighting value and the second weighting value is 1 or less;
- and
- adjusting the first color component, the second color component and the third color component of each of the pixel data according to the first gain value and the second gain value.
An image processing apparatus, comprising:
- an image capturing device, receiving an input image, wherein the input image includes pixel data;
- and
- an image processor, electrically connected to the image capturing device to:
- receive the pixel data of the input image, wherein each of the pixel data includes a first color component, a second color component and a third color component;
- divide the input image into a plurality of blocks, and calculate a first average component of the first color components, a second average component of the second color components and a third average component of the third color components for each block;
- calculate first data and second data according to the first average component, the second average component and the third average component for each block;
- map each block to a position coordinate of a color space according to the first data and the second data, wherein a white region and a skin color region are built in the color space, the white region includes white colors at different color temperatures, and the skin color region includes skin colors at different color temperatures;
- determine whether a number of the blocks in an overlapping region of the white region and the skin color region is smaller than a predetermined number, and when the number of the blocks in the overlapping region of the white region and the skin color region is smaller than the predetermined number, calculate weighted averages of the first data and the second data of each block in the white region to generate a first weight value and a second weight value and convert the first weight value and the second weight value to a first gain value and a second gain value according to a predetermined precision, wherein a weight value of each of the first data and each of the second data used to calculate the first weighting value and the second weighting value is 1 or less;
- and
- adjust the first color component, the second color component and the third color component of each pixel datum according to the first gain value and the second gain value.
Dependencies are inferred from the claim text.