CN103491357B - A kind of auto white balance treatment method of image sensor - Google Patents

A kind of auto white balance treatment method of image sensor Download PDF

Info

Publication number
CN103491357B
CN103491357B CN201310477953.2A CN201310477953A CN103491357B CN 103491357 B CN103491357 B CN 103491357B CN 201310477953 A CN201310477953 A CN 201310477953A CN 103491357 B CN103491357 B CN 103491357B
Authority
CN
China
Prior art keywords
gain
image
color
avg
color component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310477953.2A
Other languages
Chinese (zh)
Other versions
CN103491357A (en
Inventor
文康益
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sanbao Innovation Robot Co ltd
Original Assignee
QIHAN TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by QIHAN TECHNOLOGY Co Ltd filed Critical QIHAN TECHNOLOGY Co Ltd
Priority to CN201310477953.2A priority Critical patent/CN103491357B/en
Publication of CN103491357A publication Critical patent/CN103491357A/en
Application granted granted Critical
Publication of CN103491357B publication Critical patent/CN103491357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Color Television Image Signal Generators (AREA)
  • Color Image Communication Systems (AREA)

Abstract

本发明公开一种图像传感器白平衡处理方法,主要为了提供一种适应各种场景的图像传感器的白平衡处理方法。本发明,所述方法包括:判断该图像上所有灰度颜色点的数量;若灰度颜色点的数量大于第一阈值,则采用灰度颜色点方法对图像进行白平衡矫正;若灰度颜色点的数量不大于第一阈值,则采用灰度颜色点方法得到的增益因子和灰度世界方法得到的增益因子的平均值对图像进行白平衡矫正。本发明提升相机在不同环境下的适应性的图像传感器的白平衡处理效果。

The invention discloses a white balance processing method of an image sensor, mainly to provide a white balance processing method of an image sensor suitable for various scenes. In the present invention, the method includes: judging the number of all gray-scale color points on the image; if the number of gray-scale color points is greater than the first threshold, then using the gray-scale color point method to correct the white balance of the image; if the gray-scale color points If the number of points is not greater than the first threshold, the image is corrected for white balance by using the average value of the gain factor obtained by the grayscale color point method and the gain factor obtained by the grayscale world method. The invention improves the white balance processing effect of the image sensor adaptable to different environments of the camera.

Description

一种图像传感器白平衡处理方法A method for image sensor white balance processing

技术领域technical field

本发明涉及图像处理技术领域,具体涉及一种图像传感器的白平衡处理方法。The invention relates to the technical field of image processing, in particular to a white balance processing method of an image sensor.

背景技术Background technique

当前安防行业进入到高清时代,采用百万级的CMOS传感器已是趋势。白平衡(AWB,AutoWhitebalance)是一种去除非正常颜色的过程。人眼可以很自然的根据当前色源色温来调整看到的物体颜色,而摄像机设备却往往很难实现完美的自动白平衡。正因为传感器不具有人眼的不同光照色温下的色彩恒定性,白平衡模块就需要将人眼看来白色的物体进行色彩的还原,使其在照片上也呈现为白色。The current security industry has entered the high-definition era, and it is a trend to adopt million-level CMOS sensors. White balance (AWB, AutoWhitebalance) is a process of removing abnormal colors. The human eye can naturally adjust the color of the object it sees according to the color temperature of the current color source, but it is often difficult for camera equipment to achieve perfect automatic white balance. Just because the sensor does not have the color stability of the human eye under different light color temperatures, the white balance module needs to restore the color of the object that the human eye sees as white, so that it also appears white in the photo.

传统的白平衡算法基于寻找环境中的白点的方法来设计,虽然大部分场景都能适用,但是在有强反光、环境中不具备白色点的时候,图像将不能实现白平衡功能,从而图像会出现偏色,从而影响了高清视频的使用。The traditional white balance algorithm is designed based on the method of finding the white point in the environment. Although it is applicable to most scenes, when there is strong reflection and there is no white point in the environment, the image will not be able to achieve the white balance function, so the image There will be a color cast, which affects the use of high-definition video.

发明内容Contents of the invention

针对上述问题,本发明提供一种改善偏色现象,提升相机在不同环境下的适应性的图像传感器的白平衡处理方法。In view of the above problems, the present invention provides a white balance processing method of an image sensor that improves the color cast phenomenon and improves the adaptability of the camera in different environments.

为达到上述目的,本发明图像传感器白平衡处理方法,所述方法包括:计算图像上所有像素点的色值,判断该图像上所有灰度颜色点的数量,若灰度颜色点的数量大于第一阈值,则采用灰度颜色点方法对图像进行白平衡矫正;In order to achieve the above object, the image sensor white balance processing method of the present invention, the method includes: calculating the color values of all pixels on the image, judging the number of all gray color points on the image, if the number of gray color points is greater than the first A threshold value, the gray color point method is used to correct the white balance of the image;

若灰度颜色点的数量不大于第一阈值,则采用灰度颜色点方法得到的增益因子和灰度世界方法得到的增益因子的平均值对图像进行白平衡矫正。If the number of grayscale color points is not greater than the first threshold, the image is corrected for white balance using the average value of the gain factor obtained by the grayscale color point method and the gain factor obtained by the grayscale world method.

进一步地,判断图像上所有灰度颜色点的数量的计算方法包括:计算图像像素点的色度值与亮度值比值的绝对值的和是否大于第二阈值T,计算公式如下:Further, the calculation method for judging the number of all grayscale color points on the image includes: calculating whether the sum of the absolute values of the ratios of the chromaticity value and the brightness value of the image pixel is greater than the second threshold T, and the calculation formula is as follows:

Ff (( YY ,, Uu ,, VV )) == (( || Uu YY || ++ || VV YY || )) == (( || Uu || ++ || VV || )) YY

若F<T,则该像素点是灰度颜色点;若F≥T,则该像素点不是灰度颜色点。If F<T, then the pixel point is a grayscale color point; if F≥T, then this pixel point is not a grayscale color point.

进一步地,所述灰度颜色点法对图像进行白平衡处理具体包括:Further, the grayscale color point method to perform white balance processing on the image specifically includes:

分别计算图像中像素点的三原色分量各自的均值Ravg、Gavg、BavgCalculate the mean values R avg , G avg , and B avg of the three primary color components of the pixels in the image respectively;

基于所述三原色分量的均值得到各个原色分量的增益因子,所述增益因子的计算公式如下:The gain factor of each primary color component is obtained based on the mean value of the three primary color components, and the calculation formula of the gain factor is as follows:

Rgw_gain=Gavg/RavgRgw_gain=G avg /R avg ;

Ggw_gain=Gavg/Gavg Ggw_gain =Gavg/ Gavg ;

Bgw_gain=Gavg/Bavg Bgw_gain =Gavg/ Bavg ;

其中,Rgw_gain为红颜色分量的增益因子;Among them, Rgw_gain is the gain factor of the red color component;

Ggw_gain为绿颜色分量的增益因子;Ggw_gain is the gain factor of the green color component;

Bgw_gain为蓝颜色分量的增益因子;Bgw_gain is the gain factor of the blue color component;

基于所述增益因子计算图像每个颜色分量矫正后的色值,令图像的R、G、B分量分别与对应的增益因子相乘,得到白平衡处理后图像,矫正公式如下:The corrected color value of each color component of the image is calculated based on the gain factor, and the R, G, and B components of the image are multiplied by the corresponding gain factors respectively to obtain the white balance processed image. The correction formula is as follows:

R_awb=Rgw_gain*R;R_awb=Rgw_gain*R;

G_awb=Ggw_gain*G;G_awb=Ggw_gain*G;

B_awb=Bgw_gain*B;B_awb=Bgw_gain*B;

其中,R_awb为红颜色分量矫正后的色值;Among them, R_awb is the corrected color value of the red color component;

G_awb为绿颜色分量矫正后的色值;G_awb is the corrected color value of the green color component;

B_awb为蓝颜色分量矫正后的色值。B_awb is the corrected color value of the blue color component.

进一步地,所述的灰度颜色点方法得到的增益因子和灰度世界方法得到的增益因子的平均值对图像进行白平衡矫正的具体方法包括:Further, the specific method for correcting the white balance of the image by the average value of the gain factor obtained by the grayscale color point method and the gain factor obtained by the grayscale world method includes:

计算图像中全部像素点的图像颜色的三分量各自的均值Ravg、Gavg、BavgCalculate the mean values R avg , G avg , and B avg of the three components of the image color of all pixels in the image;

选取图像中的灰色像素点,分别计算所述灰色像素点的图像颜色三分量均值RΩ、GΩ、BΩSelect the gray pixels in the image, and calculate the image color three-component mean values R Ω , G Ω , B Ω of the gray pixels respectively;

基于全部像素点的颜色分量的均值得到灰度颜色方法的红颜色和蓝颜色分量的增益因子Rgw_gain、Bgw_gain和基于全部灰色像素点的颜色分量的均值得到灰度世界方法的红颜色和蓝颜色分量的增益因子Rgr_gain、Bgr_gain,计算公式如下:Based on the mean value of the color components of all pixels, the gain factors Rgw_gain and Bgw_gain of the red and blue color components of the grayscale color method are obtained, and the red and blue color components of the grayscale world method are obtained based on the mean value of the color components of all gray pixels. The gain factors Rgr_gain, Bgr_gain, the calculation formula is as follows:

Rgw_gain=Gavg/Ravg Rgw_gain =Gavg/ Ravg ;

Bgw_gain=Gavg/Bavg Bgw_gain =Gavg/ Bavg ;

Rgr_gain=GΩ/RΩ Rgr_gain =GΩ/ ;

Bgr_gain=GΩ/BΩ Bgr_gain =GΩ/ ;

计算所述灰度颜色方法和灰度世界方法的各颜色分量的增益因子的平均值,得到最终的颜色分量的增益因子,计算公式如下:Calculate the average value of the gain factor of each color component of the grayscale color method and the grayscale world method to obtain the final gain factor of the color component, and the calculation formula is as follows:

Rfinal_gain=avg(Rgw_gain,Rgr_gain);Rfinal_gain = avg(Rgw_gain, Rgr_gain);

Bfinal_gain=avg(Bgw_gain,Bgr_gain);Bfinal_gain = avg(Bgw_gain, Bgr_gain);

其中,Rfinal_gain为最终的红颜色分量的增益因子;Among them, Rfinal_gain is the gain factor of the final red color component;

Bfinal_gain为最终的蓝颜色分量的增益因子;Bfinal_gain is the gain factor of the final blue color component;

基于所述最终的颜色分量的增益因子计算图像红、蓝颜色分量矫正后的色值,令图像的R、B分量分别与对应的最终的颜色分量的增益因子相乘,得到白平衡处理后图像,矫正公式如下:Calculate the corrected color values of the red and blue color components of the image based on the gain factors of the final color components, and multiply the R and B components of the image by the corresponding gain factors of the final color components to obtain the white balance processed image , the correction formula is as follows:

R_awb=Rfinal_gain*R;R_awb=Rfinal_gain*R;

B_awb=Bfinal_gain*B;B_awb=Bfinal_gain*B;

其中,R_awb为红颜色分量矫正后的色值;Among them, R_awb is the corrected color value of the red color component;

B_awb为蓝颜色分量矫正后的色值。B_awb is the corrected color value of the blue color component.

本发明图像传感器白平衡处理方法,结合了灰度世界法简单快速和灰度世界方法在灰点很多时的偏差小的优点,避免了有大单色块物体存在时,但是当图像场景颜色并不丰富,灰度世界法出现比较大的偏差,如果图像的灰度很少或者没有灰点时,而基于灰度颜色点法会出现比较大的偏差的缺陷,大大的提升了相机在不同色温环境下,不同场景下的色彩还原,使得高清图像色彩更加鲜艳,正确。The white balance processing method of the image sensor of the present invention combines the advantages of the simple and fast gray-scale world method and the small deviation of the gray-scale world method when there are many gray points, and avoids the existence of large single-color block objects, but when the image scene color does not match Not rich, the grayscale world method has a relatively large deviation. If the grayscale of the image is few or no gray points, the grayscale color point method will have a relatively large deviation defect, which greatly improves the camera's performance in different color temperatures. Under the environment, the color reproduction in different scenes makes the color of high-definition images more vivid and correct.

附图说明Description of drawings

图1是本发明图像传感器白平衡处理方法的流程图。FIG. 1 is a flowchart of a white balance processing method for an image sensor of the present invention.

具体实施方式detailed description

下面结合说明书附图对本发明做进一步的描述。The present invention will be further described below in conjunction with the accompanying drawings.

通过大量的统计发现,一个自然场景往往包含有大量的灰度颜色点,如物体的影子。我们所称的灰色颜色点是指RGB分量相等的点,其值记为R,G,B。在标准光源照射条件下,灰度颜色点呈现为很纯的灰色。在非标准色温照射下,这些灰色点颜色会随着光源色温的不同发生不同的偏移,低色温下偏红,高色温下偏蓝。灰度颜色点由于光源照射引起的微小的颜色代表了整幅图像的偏离程序,可以用来准确估计色温。Through a large number of statistics, it is found that a natural scene often contains a large number of grayscale color points, such as the shadow of an object. The gray color point we call refers to the point where the RGB components are equal, and its value is recorded as R, G, B. Under standard lighting conditions, a grayscale color point appears as a very pure gray. Under the illumination of non-standard color temperature, the color of these gray points will shift differently with the color temperature of the light source, reddish at low color temperature, and blue at high color temperature. Gray-scale color points The tiny colors caused by light source illumination represent the deviation of the whole image and can be used to accurately estimate the color temperature.

如图1所示,本实施例图像传感器白平衡处理方法,所述方法包括:计算图像上所有像素点的色值,判断该图像上所有灰度颜色点的数量,若灰度颜色点的数量大于第一阈值,则采用灰度颜色点方法对图像进行白平衡矫正;As shown in Figure 1, the image sensor white balance processing method of this embodiment includes: calculating the color values of all pixel points on the image, and judging the number of all grayscale color points on the image, if the number of grayscale color points greater than the first threshold, the grayscale color point method is used to correct the image for white balance;

若灰度颜色点的数量不大于第一阈值,则采用灰度颜色点方法得到的增益因子和灰度世界方法得到的增益因子的平均值对图像进行白平衡矫正。If the number of grayscale color points is not greater than the first threshold, the image is corrected for white balance using the average value of the gain factor obtained by the grayscale color point method and the gain factor obtained by the grayscale world method.

进一步地,本实施例中,判断图像上所有灰度颜色点的数量的计算方法包括:计算图像像素点的色度值与亮度值比值的绝对值的和是否大于第二阈值T,计算公式如下:Further, in this embodiment, the calculation method for judging the number of all grayscale color points on the image includes: calculating whether the sum of the absolute value of the ratio of the chromaticity value and the brightness value of the image pixel is greater than the second threshold T, and the calculation formula is as follows :

Ff (( YY ,, Uu ,, VV )) == (( || Uu YY || ++ || VV YY || )) == (( || Uu || ++ || VV || )) YY

若F<T,则该像素点是灰度颜色点;If F<T, the pixel is a grayscale color point;

若F≥T,则该像素点不是灰度颜色点。If F≥T, the pixel is not a grayscale color point.

进一步地,本实施例中,所述灰度颜色点法对图像进行白平衡处理具体包括:Further, in this embodiment, the grayscale color point method to perform white balance processing on the image specifically includes:

分别计算图像中像素点的三原色分量各自的均值Ravg、Gavg、Bavg;基于所述三原色分量的均值得到各个原色分量的增益因子,所述增益因子的计算公式如下:Calculate the mean values R avg , G avg , and B avg of the three primary color components of the pixels in the image respectively; obtain the gain factor of each primary color component based on the mean values of the three primary color components, and the calculation formula of the gain factor is as follows:

Rgw_gain=Gavg/Ravg Rgw_gain =Gavg/ Ravg ;

Ggw_gain=Gavg/Gavg Ggw_gain =Gavg/ Gavg ;

Bgw_gain=Gavg/Bavg Bgw_gain =Gavg/ Bavg ;

其中,Rgw_gain为红颜色分量的增益因子;Among them, Rgw_gain is the gain factor of the red color component;

Ggw_gain为绿颜色分量的增益因子;Ggw_gain is the gain factor of the green color component;

Bgw_gain为蓝颜色分量的增益因子;Bgw_gain is the gain factor of the blue color component;

基于所述增益因子计算图像每个颜色分量矫正后的色值,令图像的R、G、B分量分别与对应的增益因子相乘,得到白平衡处理后图像,矫正公式如下:The corrected color value of each color component of the image is calculated based on the gain factor, and the R, G, and B components of the image are multiplied by the corresponding gain factors respectively to obtain the white balance processed image. The correction formula is as follows:

R_awb=Rgw_gain*R;R_awb=Rgw_gain*R;

G_awb=Ggw_gain*G;G_awb=Ggw_gain*G;

B_awb=Bgw_gain*B;B_awb=Bgw_gain*B;

其中,R_awb为红颜色分量矫正后的色值;Among them, R_awb is the corrected color value of the red color component;

G_awb为绿颜色分量矫正后的色值;G_awb is the corrected color value of the green color component;

B_awb为蓝颜色分量矫正后的色值。B_awb is the corrected color value of the blue color component.

进一步地,本实施例中,所述的灰度颜色点方法得到的增益因子和灰度世界方法得到的增益因子的平均值对图像进行白平衡矫正的具体方法包括:Further, in this embodiment, the specific method of correcting the white balance of the image using the average value of the gain factor obtained by the grayscale color point method and the gain factor obtained by the grayscale world method includes:

计算图像中全部像素点的图像颜色的三分量各自的均值Ravg、Gavg、Bavg;选取图像中的灰色像素点,分别计算所述灰色像素点的图像颜色三分量均值RΩ、GΩ、BΩCalculate the mean values R avg , G avg , B avg of the three components of the image color of all pixels in the image; select the gray pixels in the image, and calculate the mean values R Ω and G Ω of the image colors of the gray pixels respectively , ;

基于全部像素点的颜色分量的均值得到灰度颜色方法的红颜色和蓝颜色分量的增益因子Rgw_gain、Bgw_gain和基于全部灰色像素点的颜色分量的均值得到灰度世界方法的红颜色和蓝颜色分量的增益因子Rgr_gain、Bgr_gain,计算公式如下:Based on the mean value of the color components of all pixels, the gain factors Rgw_gain and Bgw_gain of the red and blue color components of the grayscale color method are obtained, and the red and blue color components of the grayscale world method are obtained based on the mean value of the color components of all gray pixels. The gain factors Rgr_gain, Bgr_gain, the calculation formula is as follows:

Rgw_gain=Gavg/RavgRgw_gain=G avg /R avg ;

Bgw_gain=Gavg/Bavg Bgw_gain =Gavg/ Bavg ;

Rgr_gain=GΩ/RΩ Rgr_gain =GΩ/ ;

Bgr_gain=GΩ/BΩ Bgr_gain =GΩ/ ;

计算所述灰度颜色方法和灰度世界方法的各颜色分量的增益因子的平均值,得到最终的颜色分量的增益因子,计算公式如下:Calculate the average value of the gain factor of each color component of the grayscale color method and the grayscale world method to obtain the final gain factor of the color component, and the calculation formula is as follows:

Rfinal_gain=avg(Rgw_gain,Rgr_gain);Rfinal_gain = avg(Rgw_gain, Rgr_gain);

Bfinal_gain=avg(Bgw_gain,Bgr_gain);Bfinal_gain = avg(Bgw_gain, Bgr_gain);

其中,Rfinal_gain为最终的红颜色分量的增益因子;Among them, Rfinal_gain is the gain factor of the final red color component;

Bfinal_gain为最终的蓝颜色分量的增益因子;Bfinal_gain is the gain factor of the final blue color component;

基于所述最终的颜色分量的增益因子计算图像红、蓝颜色分量矫正后的色值,令图像的R、B分量分别与对应的最终的颜色分量的增益因子相乘,得到白平衡处理后图像,矫正公式如下:Calculate the corrected color values of the red and blue color components of the image based on the gain factors of the final color components, and multiply the R and B components of the image by the corresponding gain factors of the final color components to obtain the white balance processed image , the correction formula is as follows:

R_awb=Rfinal_gain*R;R_awb=Rfinal_gain*R;

B_awb=Bfinal_gain*B;B_awb=Bfinal_gain*B;

其中,R_awb为红颜色分量矫正后的色值;Among them, R_awb is the corrected color value of the red color component;

B_awb为蓝颜色分量矫正后的色值。B_awb is the corrected color value of the blue color component.

其中第二阈值,此值由大量的实验得出,一般为图像所有像素的1/20。本发明图像传感器白平衡处理方法,结合了灰度世界法简单快速和灰度世界方法在灰点很多时的偏差小的优点,避免了有大单色块物体存在时,但是当图像场景颜色并不丰富,灰度世界法出现比较大的偏差,如果图像的灰度很少或者没有灰点时,而基于灰度颜色点法会出现比较大的偏差的缺陷,大大的提升了相机在不同色温环境下,不同场景下的色彩还原,使得高清图像色彩更加鲜艳,正确。Among them, the second threshold, which is obtained from a large number of experiments, is generally 1/20 of all pixels in the image. The white balance processing method of the image sensor of the present invention combines the advantages of the simple and fast gray-scale world method and the small deviation of the gray-scale world method when there are many gray points, and avoids the existence of large single-color block objects, but when the image scene color does not match Not rich, the grayscale world method has a relatively large deviation. If the grayscale of the image is few or no gray points, the grayscale color point method will have a relatively large deviation defect, which greatly improves the camera's performance in different color temperatures. Under the environment, the color reproduction in different scenes makes the color of high-definition images more vivid and correct.

以上,仅为本发明的较佳实施例,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求所界定的保护范围为准。The above are only preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention are all Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be defined by the claims.

Claims (2)

1. an auto white balance treatment method of image sensor, is characterized in that, described method comprises:
The colour of all pixels in computed image, judges the quantity of all greyscale color points on this image,
If the quantity of greyscale color point is greater than first threshold, then greyscale color point methods is adopted to carry out white balance correction to image; Described greyscale color point method is carried out white balance process to image and is specifically comprised:
The three primary color components average R separately of pixel in difference computed image avg, G avg, B avg;
Average based on described three primary color components obtains the gain factor of each primary components, and the computing formula of described gain factor is as follows:
Rgw_gain=G avg/R avg;
Ggw_gain=G avg/G avg;
Bgw_gain=G avg/B avg;
Wherein, Rgw_gain is the gain factor of red color component;
Ggw_gain is the gain factor of green color component;
Bgw_gain is the gain factor of blue color component;
Colour after correcting based on each color component of described gain factor computed image, makes R, G, B component of image be multiplied with corresponding gain factor respectively, obtains image after white balance process, corrects formula as follows:
R_awb=Rgw_gain*R;
G_awb=Ggw_gain*G;
B_awb=Bgw_gain*B;
Wherein, R_awb is the colour after red color component is corrected;
G_awb is the colour after green color component is corrected;
B_awb is the colour after blue color component is corrected;
If the quantity of greyscale color point is not more than first threshold, then the mean value of the gain factor that the gain factor adopting greyscale color point methods to obtain and gray world method obtain carries out white balance correction to image; The mean value of the gain factor that described greyscale color point methods obtains and the gain factor that gray world method obtains comprises the concrete grammar that image carries out white balance correction:
The three-component average R separately of the color of image of whole pixel in computed image avg, G avg, B avg;
Choose the gray pixels point in image, calculate the color of image three-component average R of described gray pixels point respectively Ω, G Ω, B Ω;
Average based on the color component of whole pixel obtains the red color of greyscale color method and gain factor Rgw_gain, Bgw_gain of blue color component and obtains the red color of gray world method and gain factor Rgr_gain, Bgr_gain of blue color component based on the average of the color component of whole gray pixels point, and computing formula is as follows:
Rgw_gain=G avg/R avg;
Bgw_gain=G avg/B avg;
Rgr_gain=G Ω/R Ω;
Bgr_gain=G Ω/B Ω;
Calculate the mean value of the gain factor of each color component of described greyscale color method and gray world method, obtain the gain factor of final color component, computing formula is as follows:
Rfinal_gain=avg(Rgw_gain,Rgr_gain);
Bfinal_gain=avg(Bgw_gain,Bgr_gain);
Wherein, Rfinal_gain is the gain factor of final red color component;
Bfinal_gain is the gain factor of final blue color component;
Colour after correcting based on red, the blue color component of the gain factor computed image of described final color component, makes R, B component of image be multiplied with the gain factor of corresponding final color component respectively, obtains image after white balance process, corrects formula as follows:
R_awb=Rfinal_gain*R;
B_awb=Bfinal_gain*B;
Wherein, R_awb is the colour after red color component is corrected;
B_awb is the colour after blue color component is corrected.
2. a kind of auto white balance treatment method of image sensor according to claim 1, is characterized in that, judges that the computational methods of the quantity of all greyscale color points on image comprise:
The chromatic value of computed image pixel and the absolute value of brightness value ratio and whether be greater than Second Threshold T, computing formula is as follows:
If F < is T, then this pixel is greyscale color point;
If F >=T, then this pixel is not greyscale color point.
CN201310477953.2A 2013-10-14 2013-10-14 A kind of auto white balance treatment method of image sensor Active CN103491357B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310477953.2A CN103491357B (en) 2013-10-14 2013-10-14 A kind of auto white balance treatment method of image sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310477953.2A CN103491357B (en) 2013-10-14 2013-10-14 A kind of auto white balance treatment method of image sensor

Publications (2)

Publication Number Publication Date
CN103491357A CN103491357A (en) 2014-01-01
CN103491357B true CN103491357B (en) 2016-04-13

Family

ID=49831281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310477953.2A Active CN103491357B (en) 2013-10-14 2013-10-14 A kind of auto white balance treatment method of image sensor

Country Status (1)

Country Link
CN (1) CN103491357B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103974053B (en) * 2014-05-12 2016-04-13 华中科技大学 A kind of Automatic white balance antidote extracted based on ash point
CN105828058B (en) * 2015-05-29 2019-02-15 维沃移动通信有限公司 A kind of method of adjustment and device of white balance
CN104954772B (en) * 2015-06-26 2017-05-10 济南中维世纪科技有限公司 An Image Near Gray Pixel Selection Algorithm Applied to Automatic White Balance Algorithm
CN107404640B (en) * 2016-05-20 2018-12-25 北京集创北方科技股份有限公司 The white balance correcting and digital imaging device of digital imaging device
CN106303473B (en) * 2016-08-23 2019-01-29 宁波江丰生物信息技术有限公司 A kind of white balance adjusting method and camera
CN108205671A (en) * 2016-12-16 2018-06-26 浙江宇视科技有限公司 Image processing method and device
CN107027017A (en) * 2017-04-25 2017-08-08 建荣半导体(深圳)有限公司 A kind of method of adjustment, device, picture processing chip and the storage device of image white balance
CN109151426B (en) * 2017-06-28 2020-05-22 杭州海康威视数字技术股份有限公司 White balance adjusting method and device, camera and medium
CN107920242B (en) * 2017-12-28 2019-08-16 努比亚技术有限公司 A kind of optimization method of automatic white balance, terminal and computer readable storage medium
CN108093234B (en) * 2017-12-29 2019-10-29 努比亚技术有限公司 A kind of image processing method, terminal and storage medium
CN109561292A (en) * 2018-12-26 2019-04-02 凌云光技术集团有限责任公司 A kind of white balancing treatment method and device for camera system
CN110505459B (en) * 2019-08-16 2020-12-11 域鑫科技(惠州)有限公司 Image color correction method, device and storage medium suitable for endoscope
WO2021051382A1 (en) * 2019-09-20 2021-03-25 深圳市大疆创新科技有限公司 White balance processing method and device, and mobile platform and camera
CN110794599B (en) * 2019-10-23 2021-11-16 联想(北京)有限公司 Color cast detection method, electronic equipment and computer readable storage medium
CN112950635A (en) * 2021-04-26 2021-06-11 Oppo广东移动通信有限公司 Gray dot detection method, gray dot detection device, electronic device, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162078B2 (en) * 2002-12-20 2007-01-09 Fast Link Communication Corp. Automatic white balance correction method for image capturing apparatus
CN103037224A (en) * 2012-12-07 2013-04-10 珠海全志科技股份有限公司 Image white balance processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162078B2 (en) * 2002-12-20 2007-01-09 Fast Link Communication Corp. Automatic white balance correction method for image capturing apparatus
CN103037224A (en) * 2012-12-07 2013-04-10 珠海全志科技股份有限公司 Image white balance processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于灰度世界模型自动白平衡方法;谷元保等;《计算机仿真》;20050930(第09期);全文 *
改进灰度世界颜色校正算法;徐晓昭等;《光子学报》;20100331(第03期);全文 *

Also Published As

Publication number Publication date
CN103491357A (en) 2014-01-01

Similar Documents

Publication Publication Date Title
CN103491357B (en) A kind of auto white balance treatment method of image sensor
CN104796683B (en) A kind of method and system of calibration image color
WO2017024615A1 (en) Image enhancement method
US20150036927A1 (en) Apparatus and method of compensating chromatic aberration of image
CN108282647B (en) Color correcting method and device, computer readable storage medium, terminal
CN112752023A (en) Image adjusting method and device, electronic equipment and storage medium
CN108012134B (en) Photographing method and apparatus, computer-readable storage medium, and computer device
US8698918B2 (en) Automatic white balancing for photography
CN104581105B (en) Based on the auto white balance method of colour temperature range conversion weight map and the correction of block reliability
WO2015141050A1 (en) Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer on which multi-area white balance control program has been recorded, multi-area white balance image processing device, multi-area white balance image processing method, multi-area white balance image processing program, computer on which multi-area white balance image processing program has been recorded, and imaging device provided with multi-area white balance image processing device
CN111107330B (en) A Color Cast Correction Method in Lab Space
WO2014119060A1 (en) Image processing device, image processing method, program, and recording medium
US20070177038A1 (en) Image correction apparatus and method
TWI736599B (en) Method for detection of saturated pixels in an image
CN106550227A (en) A kind of image saturation method of adjustment and device
KR101854432B1 (en) Method and apparatus for detecting and compensating back light frame
JP5899894B2 (en) Imaging apparatus, image processing apparatus, image processing program, and image processing method
KR20090097796A (en) How to correct chromatic aberration
CN113850738A (en) Device and method for correcting purple border of image
TWI479878B (en) Correction of pseudo - color pixels in digital image
CN105208362B (en) Image colour cast auto-correction method based on gray balance principle
US8804025B2 (en) Signal processing device and imaging device
CN101222572A (en) White balance processing equipment
JP5858735B2 (en) Color correction apparatus and color correction method
EP2209298A1 (en) Method for adjusting white balance

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Futian District Shennan Road and the agricultural road at the junction of the northeast side of the Times Technology Building 20 floor, room 2009

Applicant after: Qihan Technology Co.,Ltd.

Address before: 518000 Guangdong city of Shenzhen province Futian District Shennan Road and the agricultural road at the junction of the northeast side of the Times Technology Building 20 floor, room 2009

Applicant before: QIHAN TECHNOLOGY Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 518000 Guangdong city of Shenzhen province Futian District Shennan Road and the agricultural road at the junction of the northeast side of the Times Technology Building 20 floor, room 2009

Patentee after: QIHAN TECHNOLOGY Co.,Ltd.

Address before: 518000 Guangdong city of Shenzhen province Futian District Shennan Road and the agricultural road at the junction of the northeast side of the Times Technology Building 20 floor, room 2009

Patentee before: Qihan Technology Co.,Ltd.

PP01 Preservation of patent right

Effective date of registration: 20180131

Granted publication date: 20160413

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20181031

Granted publication date: 20160413

PD01 Discharge of preservation of patent
PP01 Preservation of patent right

Effective date of registration: 20181031

Granted publication date: 20160413

PP01 Preservation of patent right
PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20190514

Granted publication date: 20160413

TR01 Transfer of patent right

Effective date of registration: 20190611

Address after: 518000 Guangdong 28, Shenzhen, Futian District, Huafu street, No. 5001 Huanggang Road, Shenzhen Industrial upper city (two phase of the Southern District)

Patentee after: Shenzhen Sanbao Innovation Intelligence Co.,Ltd.

Address before: 518000 Building No. 209, Times Science and Technology Building, Northeast Side of Junction of Shennan Road and Nongyuan Road, Futian District, Shenzhen City, Guangdong Province

Patentee before: QIHAN TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200521

Address after: Room 2803, building T2, Shenye Shangcheng (South District), No. 5001, Huanggang Road, Lianhua village, Huafu street, Futian District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Sanbao innovation robot Co.,Ltd.

Address before: 518000 Guangdong 28, Shenzhen, Futian District, Huafu street, No. 5001 Huanggang Road, Shenzhen Industrial upper city (two phase of the Southern District)

Patentee before: Shenzhen Sanbao Innovation Intelligence Co.,Ltd.

TR01 Transfer of patent right
PP01 Preservation of patent right

Effective date of registration: 20211119

Granted publication date: 20160413

PP01 Preservation of patent right
PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20241119

Granted publication date: 20160413