Movatterモバイル変換


[0]ホーム

URL:


CN103227928A - White balance adjusting method and device - Google Patents

White balance adjusting method and device
Download PDF

Info

Publication number
CN103227928A
CN103227928ACN2013101099185ACN201310109918ACN103227928ACN 103227928 ACN103227928 ACN 103227928ACN 2013101099185 ACN2013101099185 ACN 2013101099185ACN 201310109918 ACN201310109918 ACN 201310109918ACN 103227928 ACN103227928 ACN 103227928A
Authority
CN
China
Prior art keywords
light source
green
coefficient
source point
pixel
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.)
Granted
Application number
CN2013101099185A
Other languages
Chinese (zh)
Other versions
CN103227928B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN201310109918.5ApriorityCriticalpatent/CN103227928B/en
Publication of CN103227928ApublicationCriticalpatent/CN103227928A/en
Application grantedgrantedCritical
Publication of CN103227928BpublicationCriticalpatent/CN103227928B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明公开了一种白平衡的调整方法及装置,涉及图像处理领域。本发明通过区分绿色像素点和灰色像素点以获取相应的RGB像素值后,分别根据绿色像素点和灰色像素点各自对应的RGB像素值确定可能的光源点,再根据可能的光源点进行综合判定,以确定准确的实际光源点颜色比例系数,并依据这个准确的实际光源点颜色比例系数计算白平衡增益值,然后进行白平衡调整。

The invention discloses a white balance adjustment method and device, and relates to the field of image processing. In the present invention, after obtaining corresponding RGB pixel values by distinguishing green pixels and gray pixels, possible light source points are respectively determined according to the respective RGB pixel values corresponding to the green pixel points and gray pixel points, and then a comprehensive judgment is made based on possible light source points , to determine the accurate actual light source point color scale coefficient, and calculate the white balance gain value according to the accurate actual light source point color scale coefficient, and then perform white balance adjustment.

Description

Translated fromChinese
白平衡的调整方法及装置Method and device for adjusting white balance

技术领域technical field

本发明涉及图像处理领域,尤其涉及一种白平衡的调整方法及装置。The invention relates to the field of image processing, in particular to a white balance adjustment method and device.

背景技术Background technique

由于人眼与摄像机图像传感器感知颜色的原理上的差异,导致对同一种物体在不同的光源下,摄像机无法呈现出相同的颜色,会出现偏色的情况。为了使摄像机能够得到与人眼所见到的色彩一致,需要引入自动白平衡对摄像机的图像进行处理。自动白平衡其目的在于不管在任何光源下,都能将白色物体还原为白色。Due to the difference in the principle of color perception between the human eye and the camera image sensor, the camera cannot display the same color for the same object under different light sources, and there will be color cast. In order for the camera to obtain the same color as the human eye sees, it is necessary to introduce automatic white balance to process the image of the camera. The purpose of automatic white balance is to restore white objects to white regardless of the light source.

由于某些光源下灰色物体的颜色与其它光源下非灰色物体的颜色可能发生混淆,这个问题对于自动白平衡算法的性能会产生不利影响。比如在室外日光下的绿色物体的颜色与室内荧光灯下的灰色物体颜色非常相似,室内荧光灯下的肤色与白炽灯下灰色物体颜色非常接近;这些情况都会导致自动白平衡算法发生误判,得到错误的白平衡结果。This problem can adversely affect the performance of the automatic white balance algorithm because the color of gray objects under some light sources may be confused with the color of non-gray objects under other light sources. For example, the color of a green object under outdoor sunlight is very similar to the color of a gray object under indoor fluorescent light, and the color of skin color under indoor fluorescent light is very similar to that of a gray object under incandescent light; these situations will lead to misjudgments by the automatic white balance algorithm and error white balance result.

目前,现有技术中存在以下白平衡的实现方案,包括:采用绿色与蓝色、绿色与红色之间的差值来判断当前像素点分别是绿色植物还是非绿色植物,并且分别找到绿色、非绿色像素中亮度最大值或者亮度平均值;认为当非绿色部分亮度高时,当前光源为日光,而绿色亮度高时当前光源为荧光灯。上述方法虽然能给出当前光源的类型是荧光灯还是日光,但未进一步考虑日光的具体因素,且容易受到像素点的亮度强度的影响,采用上述方法进行白平衡的调整往往容易对光源造成误判。At present, the following white balance implementation schemes exist in the prior art, including: using the difference between green and blue, green and red to determine whether the current pixel is a green plant or a non-green plant, and finding the green and non-green plants respectively. The maximum brightness or the average brightness of green pixels; it is considered that when the brightness of the non-green part is high, the current light source is sunlight, and when the green brightness is high, the current light source is a fluorescent lamp. Although the above method can tell whether the type of the current light source is fluorescent lamp or sunlight, it does not further consider the specific factors of sunlight, and is easily affected by the brightness intensity of pixels. Using the above method to adjust the white balance often easily leads to misjudgment of the light source .

发明内容Contents of the invention

本发明的实施例提供一种白平衡的调整方法及装置,能够得到正确的白平衡点,进而实现自动白平衡。Embodiments of the present invention provide a method and device for adjusting white balance, which can obtain a correct white balance point, and then realize automatic white balance.

为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:

第一方面,本发明实施例提供了一种白平衡的调整方法,包括:In a first aspect, an embodiment of the present invention provides a white balance adjustment method, including:

获取输入图像中像素点的RGB像素值;Obtain the RGB pixel value of the pixel in the input image;

根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点;Determining green pixels and gray pixels from the pixels according to the RGB pixel values of the pixels;

根据绿色像素点的RGB像素值确定第一光源点颜色比例系数,并根据灰色像素点的RGB像素值确定第二光源点颜色比例系数;Determine the first light source point color scale coefficient according to the RGB pixel value of the green pixel point, and determine the second light source point color scale coefficient according to the RGB pixel value of the gray pixel point;

根据所述第一光源点颜色比例系数和第二光源点颜色比例系数确定实际光源点颜色比例系数;determining an actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient;

根据所述实际光源点颜色比例系数确定当前的自动白平衡增益值;Determine the current automatic white balance gain value according to the actual light source point color scale coefficient;

使用所述当前的白平衡增益值进行白平衡调整。Use the current white balance gain value to perform white balance adjustment.

结合第一方面,在第一种可能的实现方式中,所述根据所述输入图像中像素点的RGB像素值,从所述像素点中确定绿色像素点包括:With reference to the first aspect, in a first possible implementation manner, the determining the green pixel from the pixels according to the RGB pixel values of the pixels in the input image includes:

根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数以及亮度值;Calculate according to the RGB pixel value of the pixel point, and obtain the red-green ratio coefficient, blue-green ratio coefficient and brightness value of the pixel point;

当确定像素点的红绿比例系数和蓝绿比例系数的组合为预设的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合中的一个,并且,所述像素点的亮度值在亮度阈值范围内时,则将所述像素点确定为绿色像素点。When it is determined that the combination of the red-green ratio coefficient and the blue-green ratio coefficient of the pixel point is one of all combinations of the preset green object’s red-green ratio coefficient and blue-green ratio coefficient value, and the brightness value of the pixel point When the brightness is within the threshold range, the pixel is determined as a green pixel.

结合第一方面,在第二种可能的实现方式中,所述根据所述像素点的RGB像素值,从所述像素点中确定灰色像素点包括:With reference to the first aspect, in a second possible implementation manner, the determining gray pixels from the pixels according to the RGB pixel values of the pixels includes:

根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数;Calculate according to the RGB pixel value of the pixel point to obtain the red-green ratio coefficient and the blue-green ratio coefficient of the pixel point;

当确定所述像素点的红绿比例系数为预设的灰色物体的红绿比例系数集合中的一个,并且所述像素点的蓝绿比例系数为预设的灰色物体的蓝绿比例系数集合中的一个时,则将所述像素点确定为灰色像素点。When it is determined that the red-green scale coefficient of the pixel is one of the preset red-green scale coefficient sets of gray objects, and the blue-green scale coefficient of the pixel is one of the preset blue-green scale coefficient sets of gray objects When , the pixel is determined as a gray pixel.

结合第一方面的第二种可能的实现方式,所述根据绿色像素点的RGB像素值确定第一光源点颜色比例系数包括:With reference to the second possible implementation of the first aspect, the determining the color scale coefficient of the first light source point according to the RGB pixel value of the green pixel point includes:

对所有绿色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值;Perform mean value processing on the red-green scale coefficient and blue-green scale coefficient of all green pixels, respectively, to obtain the mean value of the red-green scale coefficient and the mean value of the blue-green scale coefficient;

根据红绿比例系数均值、蓝绿比例系数均值以及预设的绿色物体色温线进行计算,得到红绿比例系数投影值、蓝绿比例系数投影值;According to the average value of the red-green ratio coefficient, the average value of the blue-green ratio coefficient and the preset color temperature line of the green object, the projection value of the red-green ratio coefficient and the projection value of the blue-green ratio coefficient are obtained;

根据所述红绿比例系数投影值以及预设的红绿比例系数映射关系进行计算,得到第一光源点红绿比例系数,并根据所述蓝绿比例系数投影值以及预设的蓝绿比例系数映射关系进行计算,得到第一光源点蓝绿比例系数;Calculate according to the projection value of the red-green scale coefficient and the preset mapping relationship of the red-green scale coefficient to obtain the red-green scale coefficient of the first light source point, and calculate according to the projection value of the blue-green scale coefficient and the preset blue-green scale coefficient Calculate the mapping relationship to obtain the blue-green ratio coefficient of the first light source point;

根据所述第一光源点红绿比例系数和所述第一光源点蓝绿比例系数的组合,确定第一光源点颜色比例系数。The first light source point color scale coefficient is determined according to the combination of the first light source point red-green scale coefficient and the first light source point blue-green scale coefficient.

结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述根据灰色像素点的RGB像素值确定第二光源点颜色比例系数包括:With reference to the third possible implementation of the first aspect, in a fourth possible implementation, the determining the color scale coefficient of the second light source point according to the RGB pixel value of the gray pixel includes:

对所有灰色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值;Perform mean value processing on the red-green scale coefficient and blue-green scale coefficient of all gray pixels, respectively, to obtain the mean value of the red-green scale coefficient and the mean value of the blue-green scale coefficient;

将所述红绿比例系数均值确定为第二光源点红绿比例系数,并将所述蓝绿比例系数均值确定为第二光源点蓝绿比例系数;Determining the mean value of the red-green ratio coefficient as the red-green ratio coefficient of the second light source point, and determining the mean value of the blue-green ratio coefficient as the blue-green ratio coefficient of the second light source point;

根据所述第二光源点红绿比例系数和所述第二光源点蓝绿比例系数的组合,确定第二光源点颜色比例系数。The second light source point color scale coefficient is determined according to the combination of the second light source point red-green scale coefficient and the second light source point blue-green scale coefficient.

结合第一方面或第一方面的前四种中任意一种可能的实现方式,在第五种可能的实现方式中,所述根据所述第一光源点颜色比例系数和第二光源点颜色比例系数确定实际光源点颜色比例系数包括:In combination with the first aspect or any one of the first four possible implementations of the first aspect, in a fifth possible implementation, the color scale coefficient of the first light source point and the second light source point color scale The coefficients determine the actual light source point color scale coefficients include:

根据所述像素点的RGB像素值进行计算,得到所述像素点的亮度均值;performing calculations according to the RGB pixel values of the pixel points to obtain the average brightness value of the pixel points;

根据所述像素点的亮度均值、曝光增益值和快门时间进行计算,得到场景亮度估计值;Calculate according to the brightness average value of the pixel, the exposure gain value and the shutter time to obtain the estimated value of the scene brightness;

当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值。When the estimated scene brightness value is greater than the first brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is smaller than the second number threshold, the first light source point color scale coefficient is determined as the actual light source point color scale coefficient, And calculate the current automatic white balance gain value according to the red-green ratio coefficient and the blue-green ratio coefficient of the third light source point.

结合第一方面的第五种可能的实现方式,在第六种可能的实现方式,所述根据所述第一光源点颜色比例系数和第二光源点颜色比例系数确定实际光源点颜色比例系数还包括:With reference to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner, the determining the actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient is further include:

当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、灰色像素点数量大于等于第二数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数;When the estimated scene brightness value is greater than the first brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is greater than or equal to the second number threshold, judge whether the current light source is a fluorescent light source according to the second light source point color ratio coefficient; when When it is determined that the current light source is a fluorescent light source, the first light source point color scale coefficient is determined as the actual light source point color scale coefficient;

其中,所述绿色像素点数量和灰色像素点数量为执行步骤根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点的同时累加得到。Wherein, the number of green pixels and the number of gray pixels are obtained by accumulating while determining green pixels and gray pixels from the pixels according to the RGB pixel values of the pixels during the execution step.

结合第一方面的第五种可能的实现方式,在第七种可能的实现方式,所述根据所述第一光源点颜色比例系数和第二光源点颜色比例系数确定实际光源点颜色比例系数还包括:With reference to the fifth possible implementation manner of the first aspect, in a seventh possible implementation manner, determining the actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient is further include:

当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数。When the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is less than the second number threshold, determine the first light source point color scale coefficient is the actual light source point color scale coefficient.

结合第一方面的第五种可能的实现方式,在第八种可能的实现方式,所述根据所述第一光源点颜色比例系数和第二光源点颜色比例系数确定实际光源点颜色比例系数还包括:With reference to the fifth possible implementation manner of the first aspect, in an eighth possible implementation manner, the determining the actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient is further include:

当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,根据第一光源点颜色比例系数和第二光源点颜色比例系数中的红绿比例系数进行加权计算,将经过加权计算的第一光源点颜色比例系数和第二光源点颜色比例系数中的红绿比例系数作为第三光源点的红绿比例系数,并根据第一光源点颜色比例系数和第二光源点颜色比例系数中的蓝绿比例系数进行加权计算,将经过加权计算的第一光源点颜色比例系数和第二光源点颜色比例系数中的蓝绿比例系数作为第三光源点的蓝绿比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数确定实际光源点颜色比例系数。When the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, and the number of green pixels is greater than the first number threshold, judge whether the current light source is a fluorescent light source according to the second light source point color ratio coefficient; when determining the current light source When the light source is a fluorescent light, the weighted calculation is carried out according to the red and green ratio coefficients in the first light source point color ratio coefficient and the second light source point color ratio coefficient, and the weighted calculation of the first light source point color ratio coefficient and the second light source point color ratio The red-green ratio coefficient in the coefficient is used as the red-green ratio coefficient of the third light source point, and the weighted calculation is performed according to the color ratio coefficient of the first light source point and the blue-green ratio coefficient in the second light source point color ratio coefficient, and the weighted calculated The blue-green scale coefficient of the first light source point color scale coefficient and the second light source point color scale coefficient is used as the blue-green scale coefficient of the third light source point, and the actual Light source point color scale factor.

结合第一方面的第五种可能的实现方式,在第九种可能的实现方式,所述根据所述第一光源点颜色比例系数和第二光源点颜色比例系数确定实际光源点颜色比例系数还包括:With reference to the fifth possible implementation manner of the first aspect, in a ninth possible implementation manner, the determining the actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient is further include:

当场景亮度估计值小于第二亮度阈值,灰色像素点数量大于等于第二数量阈值时,将第二光源点颜色比例系数确定为实际光源点颜色比例系数。When the estimated scene brightness value is less than the second brightness threshold and the number of gray pixels is greater than or equal to the second number threshold, the second light source point color scale coefficient is determined as the actual light source point color scale coefficient.

第二方面,本发明实施例提供了一种白平衡的调整装置,包括:In a second aspect, an embodiment of the present invention provides a white balance adjustment device, including:

获取单元,用于获取输入图像中像素点的RGB像素值;An acquisition unit, configured to acquire the RGB pixel value of the pixel in the input image;

第一确定单元,用于根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点;A first determining unit, configured to determine green pixels and gray pixels from the pixels according to the RGB pixel values of the pixels;

第二确定单元,用于根据绿色像素点的RGB像素值确定第一光源点颜色比例系数,并根据灰色像素点的RGB像素值确定第二光源点颜色比例系数;The second determining unit is configured to determine the first light source point color scale coefficient according to the RGB pixel value of the green pixel point, and determine the second light source point color scale coefficient according to the RGB pixel value of the gray pixel point;

第三确定单元,用于根据所述第一光源点颜色比例系数和第二光源点颜色比例系数,确定实际光源点颜色比例系数。The third determining unit is configured to determine an actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient.

第四确定单元,用于根据所述实际光源点颜色比例系数确定当前的自动白平衡增益值;A fourth determining unit, configured to determine the current automatic white balance gain value according to the actual light source point color scale coefficient;

调整单元,用于根据所述当前的白平衡增益值进行白平衡调整。An adjustment unit, configured to perform white balance adjustment according to the current white balance gain value.

结合第二方面,在第一种可能的实现方式中,所述第一确定单元包括:With reference to the second aspect, in a first possible implementation manner, the first determination unit includes:

第一计算模块,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数以及亮度值;The first calculation module is used to calculate according to the RGB pixel value of the pixel point, and obtain the red-green ratio coefficient, blue-green ratio coefficient and brightness value of the pixel point;

第一确定模块,用于在像素点的红绿比例系数和蓝绿比例系数的组合为预设的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合中的一个,并且,像素点的亮度值在亮度阈值范围内,将像素点确定为绿色像素点。The first determination module is used for the combination of the red-green ratio coefficient and the blue-green ratio coefficient at the pixel point to be one of all combinations of the preset red-green ratio coefficient and the blue-green ratio coefficient value of the green object, and the pixel If the luminance value of the point is within the range of the luminance threshold, the pixel is determined as a green pixel.

结合第二方面,在第二种可能的实现方式中,所述第一确定单元包括:With reference to the second aspect, in a second possible implementation manner, the first determination unit includes:

第二计算模块,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数;The second calculation module is used to calculate according to the RGB pixel value of the pixel point to obtain the red-green ratio coefficient and the blue-green ratio coefficient of the pixel point;

第二确定模块,用于当确定像素点的红绿比例系数为预设的灰色物体的红绿比例系数集合中的一个,并且像素点的蓝绿比例系数为预设的灰色物体的蓝绿比例系数集合中的一个时,则将像素点确定为灰色像素点。The second determining module is used to determine that the red-green ratio coefficient of the pixel point is one of the preset red-green ratio coefficient sets of the gray object, and the blue-green ratio coefficient of the pixel point is the blue-green ratio of the preset gray object When it is one of the coefficient sets, the pixel is determined as a gray pixel.

结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第二确定单元包括:With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner, the second determining unit includes:

第一均值处理模块,用于对所有绿色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值;The first mean value processing module is used to perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all green pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients;

第三计算模块,用于根据红绿比例系数均值、蓝绿比例系数均值以及预设的绿色物体色温线进行计算,得到红绿比例系数投影值、蓝绿比例系数投影值;以及用于根据所述红绿比例系数投影值以及预设的红绿比例系数映射关系进行计算,得到第一光源点红绿比例系数,并根据所述蓝绿比例系数投影值以及预设的蓝绿比例系数映射关系进行计算,得到第一光源点蓝绿比例系数;The third calculation module is used to calculate according to the mean value of the red-green scale coefficient, the mean value of the blue-green scale coefficient and the preset color temperature line of the green object to obtain the projection value of the red-green scale coefficient and the projection value of the blue-green scale coefficient; The projection value of the red-green ratio coefficient and the preset mapping relationship of the red-green ratio coefficient are calculated to obtain the red-green ratio coefficient of the first light source point, and according to the projection value of the blue-green ratio coefficient and the preset mapping relationship of the blue-green ratio coefficient Perform calculation to obtain the blue-green ratio coefficient of the first light source point;

第一组合模块,用于根据所述第一光源点红绿比例系数和所述第一光源点蓝绿比例系数的组合,确定第一光源点颜色比例系数。The first combination module is configured to determine the first light source point color scale coefficient according to the combination of the first light source point red-green scale coefficient and the first light source point blue-green scale coefficient.

结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述第二确定单元包括:With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner, the second determining unit includes:

第二均值处理模块,用于对所有灰色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值;The second mean value processing module is used to perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all gray pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients;

第三确定模块,用于将所述红绿比例系数均值确定为第二光源点红绿比例系数,并将所述蓝绿比例系数均值确定为第二光源点蓝绿比例系数;A third determining module, configured to determine the mean value of the red-green ratio coefficient as the red-green ratio coefficient of the second light source point, and determine the mean value of the blue-green ratio coefficient as the blue-green ratio coefficient of the second light source point;

第二组合模块,用于根据所述第二光源点红绿比例系数和所述第二光源点蓝绿比例系数的组合,确定第二光源点颜色比例系数。The second combination module is configured to determine a second light source point color scale coefficient according to a combination of the second light source point red-green scale coefficient and the second light source point blue-green scale coefficient.

结合第二方面或第二方面的前四种中任意一种可能的实现方式,在第五种可能的实现方式中,所述第三确定单元包括:In combination with the second aspect or any one of the first four possible implementation manners of the second aspect, in a fifth possible implementation manner, the third determination unit includes:

第四算模块,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的亮度均值;以及用于根据所述像素点的亮度均值、曝光增益值和快门时间进行计算,得到场景亮度估计值;以及用于根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值;The fourth calculation module is used to calculate according to the RGB pixel value of the pixel point to obtain the average brightness value of the pixel point; and is used to perform calculation according to the average brightness value, exposure gain value and shutter time of the pixel point to obtain an estimated value of scene brightness; and used for calculating the current automatic white balance gain value according to the red-green ratio coefficient and the blue-green ratio coefficient of the third light source point;

第四确定模块,用于在场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数;The fourth determination module is configured to determine the color scale coefficient of the first light source point as The actual light source point color scale factor;

其中,所述绿色像素点数量和所述灰色像素点数量由所述第一确定单元在根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点的同时累加得到。Wherein, the number of green pixels and the number of gray pixels are accumulated by the first determination unit while determining green pixels and gray pixels from the pixels according to the RGB pixel values of the pixels get.

结合第二方面的第五种可能的实现方式,在第六种可能的实现方式,所述第四确定模块还用于当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、灰色像素点数量大于等于第二数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数。With reference to the fifth possible implementation of the second aspect, in a sixth possible implementation, the fourth determination module is further configured to: when the estimated scene brightness value is greater than the first brightness threshold and the number of green pixels is greater than the first number When the threshold and the number of gray pixels are greater than or equal to the second number threshold, judge whether the current light source is a fluorescent light source according to the color scale coefficient of the second light source point; when it is determined that the current light source is a fluorescent light source, determine the color scale coefficient of the first light source point as the actual Light source point color scale factor.

结合第二方面的第五种可能的实现方式,在第七种可能的实现方式,所述第四确定模块还用于当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数。With reference to the fifth possible implementation manner of the second aspect, in a seventh possible implementation manner, the fourth determination module is further configured to: when the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, When the number of green pixels is greater than the first number threshold and the number of gray pixels is smaller than the second number threshold, the first light source point color scale coefficient is determined as the actual light source point color scale coefficient.

结合第二方面的第五种可能的实现方式,在第八种可能的实现方式,所述第四确定模块还用于当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,根据第一光源点颜色比例系数和第二光源点颜色比例系数的红绿比例系数进行加权计算,将经过加权计算的所述第一光源点颜色比例系数和第二光源点颜色比例系数中的红绿比例系数作为第三光源点的红绿比例系数,并根据第一光源点颜色比例系数和第二光源点颜色比例系数的蓝绿比例系数进行加权计算,将经过加权计算的所述第一光源点颜色比例系数和第二光源点颜色比例系数中的蓝绿比例系数作为第三光源点的蓝绿比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数确定实际光源点颜色比例系数。With reference to the fifth possible implementation manner of the second aspect, in an eighth possible implementation manner, the fourth determining module is further configured to: when the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, When the number of green pixels is greater than the first quantity threshold, judge whether the current light source is a fluorescent light source according to the color ratio coefficient of the second light source point; The red-green scale coefficient of the scale coefficient is weighted and calculated, and the red-green scale coefficient in the weighted first light source point color scale coefficient and the second light source point color scale coefficient is used as the red-green scale coefficient of the third light source point, And carry out weighted calculation according to the blue-green scale coefficient of the first light source point color scale coefficient and the second light source point color scale coefficient, the weighted calculation of the first light source point color scale coefficient and the second light source point color scale coefficient in The blue-green ratio coefficient is used as the blue-green ratio coefficient of the third light source point, and the actual light source point color ratio coefficient is determined according to the red-green ratio coefficient and the blue-green ratio coefficient of the third light source point.

结合第二方面的第五种可能的实现方式,在第九种可能的实现方式,所述第四确定模块还用于当场景亮度估计值小于第二亮度阈值,灰色像素点数量大于等于第二数量阈值时,将第二光源点颜色比例系数确定为实际光源点颜色比例系数。With reference to the fifth possible implementation of the second aspect, in the ninth possible implementation, the fourth determination module is further configured to: when the estimated scene brightness value is less than the second brightness threshold, the number of gray pixels is greater than or equal to the second When the quantity threshold is set, the second light source point color scale coefficient is determined as the actual light source point color scale coefficient.

本发明实施例提供的一种白平衡的调整方法及装置,通过区分绿色像素点和灰色像素点以获取相应的RGB像素值后,分别根据绿色像素点和灰色像素点各自对应的RGB像素值确定可能的光源点,再根据可能的光源点进行综合判定,以确定准确的实际光源点颜色比例系数,相比于现有技术中只能给出当前光源的类型是荧光灯还是日光的技术方案来说,本发明实施例提供的方法能够为设备提供准确的增益值,以保证对每一帧图像都能够进行自动的白平衡。In the method and device for adjusting white balance provided by the embodiments of the present invention, after obtaining the corresponding RGB pixel values by distinguishing between green pixels and gray pixels, the values are determined according to the respective RGB pixel values corresponding to the green pixels and the gray pixels. Possible light source points, and then make a comprehensive judgment based on possible light source points to determine the accurate color ratio coefficient of the actual light source point. Compared with the technical scheme in the prior art, which only gives the current light source type, whether it is a fluorescent lamp or sunlight , the method provided by the embodiment of the present invention can provide an accurate gain value for the device, so as to ensure automatic white balance for each frame of image.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例提供的一种白平衡的调整方法流程图;FIG. 1 is a flowchart of a white balance adjustment method provided by an embodiment of the present invention;

图2为本发明实施例提供的另一种白平衡的调整方法流程图;FIG. 2 is a flow chart of another white balance adjustment method provided by an embodiment of the present invention;

图3为本发明实施例提供的另一种白平衡的调整方法流程图;FIG. 3 is a flow chart of another white balance adjustment method provided by an embodiment of the present invention;

图4为本发明实施例提供的另一种白平衡的调整方法流程图;FIG. 4 is a flowchart of another white balance adjustment method provided by an embodiment of the present invention;

图5为本发明实施例提供的色温线示意图;Fig. 5 is a schematic diagram of the color temperature line provided by the embodiment of the present invention;

图6为本发明实施例提供的绿色物体与灰色物体的像素值转换线的示意图;6 is a schematic diagram of a pixel value conversion line between a green object and a gray object provided by an embodiment of the present invention;

图7为本发明实施例提供的另一种白平衡的调整方法流程图;FIG. 7 is a flow chart of another white balance adjustment method provided by an embodiment of the present invention;

图8为本发明实施例提供的另一种白平衡的调整方法流程图;FIG. 8 is a flow chart of another white balance adjustment method provided by an embodiment of the present invention;

图9为本发明实施例提供的一种白平衡的调整装置的组成框图;FIG. 9 is a block diagram of a white balance adjustment device provided by an embodiment of the present invention;

图10为本发明实施例提供的另一种白平衡的调整装置的组成框图;FIG. 10 is a block diagram of another white balance adjustment device provided by an embodiment of the present invention;

图11为本发明实施例提供的另一种白平衡的调整装置的组成框图;FIG. 11 is a block diagram of another white balance adjustment device provided by an embodiment of the present invention;

图12为本发明实施例提供的另一种白平衡的调整装置的组成框图;FIG. 12 is a block diagram of another white balance adjustment device provided by an embodiment of the present invention;

图13为本发明实施例提供的另一种白平衡的调整装置的组成框图;FIG. 13 is a block diagram of another white balance adjustment device provided by an embodiment of the present invention;

图14为本发明实施例提供的另一种白平衡的调整装置的组成框图;FIG. 14 is a block diagram of another white balance adjustment device provided by an embodiment of the present invention;

图15为本发明实施例提供的一种电子终端的组成框图。FIG. 15 is a block diagram of an electronic terminal provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例提供了一种白平衡的调整方法,如图1所示,包括:An embodiment of the present invention provides a white balance adjustment method, as shown in FIG. 1 , including:

101、获取输入图像中像素点的RGB像素值。101. Acquire RGB pixel values of pixels in an input image.

其中,所述像素点为设备采集的同一帧输入图像上的像素点,并且,在本发明实施例中,所述RGB像素值均采用RGB格式进行表示。Wherein, the pixel points are the pixel points on the input image of the same frame collected by the device, and, in the embodiment of the present invention, the RGB pixel values are expressed in RGB format.

102、根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点。102. Determine a green pixel point and a gray pixel point from the pixel points according to the RGB pixel values of the pixel points.

其中,根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点的实现方式以及根据所述像素点的RGB像素值,从所述像素点中确定灰色像素点的实现方式可分别参照如图2、图3所示的方法流程。Wherein, according to the RGB pixel value of the pixel, the implementation of determining the green pixel from the pixel and the implementation of determining the gray pixel from the pixel according to the RGB pixel value of the pixel can be Refer to the method flow shown in FIG. 2 and FIG. 3 respectively.

如图2所示的方法流程包括:The method flow shown in Figure 2 includes:

a1021、根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数以及亮度值。a1021. Perform calculation according to the RGB pixel value of the pixel point to obtain the red-green ratio coefficient, blue-green ratio coefficient and brightness value of the pixel point.

在本发明实施例中,所述像素点的RGB像素值均可表示为R值、G值和B值,则红绿比例系数rx为R/G,蓝绿比例系数bx为B/G,亮度值L为R+2*G+B。In the embodiment of the present invention, the RGB pixel values of the pixel points can be expressed as R value, G value and B value, then the red-green ratio coefficient rx is R/G, the blue-green ratio coefficient bx is B/G, and the brightness The value L is R+2*G+B.

a1022、当定像素点的红绿比例系数和蓝绿比例系数的组合为预设的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合中的一个,并且,像素点的亮度值在亮度阈值范围内时,则将像素点确定为绿色像素点。a1022. When the combination of the red-green ratio coefficient and the blue-green ratio coefficient of a fixed pixel is one of all the combinations of the preset green object's red-green ratio coefficient and blue-green ratio coefficient, and the brightness value of the pixel When the brightness is within the threshold range, the pixel is determined to be a green pixel.

具体的,在本发明实施例中,亮度值在亮度阈值范围内可表示为Lmin<L<Lmax,像素点的红绿比例系数和蓝绿比例系数的组合为预设的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合中的一个可表示为(rx-rx_c)2+(bx-bx_c)2<rad2,其中,Lmin,Lmax,rx_c,bx_c,rad均为设定好的数值,Lmin,Lmax用于表征正常亮度的取值范围,一般为正整数,rx_c,bx_c,rad用于限定在不同光源下的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合。若该全部组合形成的点构成一个圆,则rx_c,bx_c,为圆心坐标,rad为半径。Specifically, in the embodiment of the present invention, the luminance value can be expressed as Lmin<L<Lmax within the luminance threshold range, and the combination of the red-green ratio coefficient and the blue-green ratio coefficient of the pixel is the preset red-green ratio of the green object One of all combinations of coefficients and blue-green ratio coefficient values can be expressed as (rx-rx_c)2 +(bx-bx_c)2 <rad2 , where Lmin, Lmax, rx_c, bx_c, and rad are all set The values of Lmin and Lmax are used to characterize the value range of normal brightness, which are generally positive integers. rx_c, bx_c, and rad are used to limit the value of the red-green ratio coefficient and blue-green ratio coefficient of green objects under different light sources. combination. If all the points formed by the combination form a circle, then rx_c, bx_c are the coordinates of the center of the circle, and rad is the radius.

如图3所示的方法流程包括:The method flow shown in Figure 3 includes:

b1021、根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数。b1021. Perform calculation according to the RGB pixel values of the pixel to obtain a red-green ratio coefficient and a blue-green ratio coefficient of the pixel.

其中,步骤b1021的计算方法和表达式可参照步骤a1021的相关描述。For the calculation method and expression of step b1021, reference may be made to the relevant description of step a1021.

b1022、当确定像素点的红绿比例系数为预设的灰色物体的红绿比例系数集合中的一个,并且像素点的蓝绿比例系数为预设的灰色物体的蓝绿比例系数集合中的一个时,则将像素点确定为灰色像素点。b1022. When it is determined that the red-green scale coefficient of the pixel is one of the preset red-green scale coefficient sets of gray objects, and the blue-green scale coefficient of the pixel is one of the preset blue-green scale coefficient sets of gray objects , the pixel is determined as a gray pixel.

具体的,像素点的红绿比例系数在预设的灰色物体的红绿比例系数集合中可表示为rx_gray1<rx<rx_gray2,像素点的蓝绿比例系数在预设的灰色物体的蓝绿比例系数集合中bx_gray1<bx<bx_gray2。其中,rx_gray1,rx_gray2,bx_gray1,bx_gray2均为设定好的参数用以表示灰色物体的红绿比例系数和蓝绿比例系数的可能取值。Specifically, the red-green ratio coefficient of a pixel can be expressed as rx_gray1<rx<rx_gray2 in the preset red-green ratio coefficient set of a gray object, and the blue-green ratio coefficient of a pixel is equal to the preset blue-green ratio coefficient of a gray object In the set, bx_gray1<bx<bx_gray2. Among them, rx_gray1, rx_gray2, bx_gray1, and bx_gray2 are all set parameters to represent the possible values of the red-green ratio coefficient and blue-green ratio coefficient of the gray object.

103、根据绿色像素点的RGB像素值进行计算,得到第一光源点颜色比例系数,并根据灰色像素点的RGB像素值进行计算,得到第二光源点颜色比例系数。103. Calculate according to the RGB pixel values of the green pixels to obtain the first light source point color scale coefficient, and perform calculation according to the RGB pixel values of the gray pixels to obtain the second light source point color scale coefficient.

其中,根据绿色像素点的RGB像素值确定第一光源点颜色比例系数,以及根据灰色像素点的RGB像素值确定第二光源点颜色比例系数可分别有图4和图5所示的方法流程实现。Wherein, determining the color scale coefficient of the first light source point according to the RGB pixel value of the green pixel point, and determining the color scale coefficient of the second light source point according to the RGB pixel value of the gray pixel point can be realized by the method flow shown in Fig. 4 and Fig. 5 respectively .

如图4所示的方法流程包括:The method flow shown in Figure 4 includes:

a1031、对所有绿色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值。a1031. Perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all green pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients.

在本发明实施例中,绿色像素点的红绿比例系数均值和蓝绿比例系数均值可表示为rx_avg,bx_avg。In the embodiment of the present invention, the average value of the red-green scale coefficient and the average value of the blue-green scale coefficient of the green pixel can be expressed as rx_avg, bx_avg.

a1032、根据红绿比例系数均值、蓝绿比例系数均值以及预设的绿色物体色温线进行计算,得到红绿比例系数投影值、蓝绿比例系数投影值。a1032. Calculate according to the mean value of the red-green proportional coefficient, the mean value of the blue-green proportional coefficient and the preset color temperature line of the green object, and obtain the projected value of the red-green proportional coefficient and the projected value of the blue-green proportional coefficient.

具体的,预设的绿色物体色温线为预先设定好的,在本发明实施例中,仅在此列举一种可能的设定方法,包括在亮度均匀的场景中,拍摄目标为x-rite公司colorchecker24色卡,在不同色温的光源下拍摄多张图像。取所拍摄图像中的绿色物体像素点的r/g,b/g值,并以r/g为输入,b/g为输出计算得到一条预设的绿色物体色温线,即图5中的拟合直线。Specifically, the preset green object color temperature line is pre-set. In the embodiment of the present invention, only one possible setting method is listed here, including in a scene with uniform brightness, the shooting target is x-rite The company'scolorchecker 24 color cards take multiple images under light sources with different color temperatures. Take the r/g and b/g values of the pixels of the green object in the captured image, and use r/g as the input and b/g as the output to calculate a preset green object color temperature line, which is the simulated color temperature line in Figure 5. fit straight.

基于上述预设的绿色物体色温线的设置,红绿比例系数投影值、蓝绿比例系数投影值的计算方法可参照如下公式:Based on the above-mentioned preset setting of the color temperature line of the green object, the calculation method of the projection value of the red-green ratio coefficient and the projection value of the blue-green ratio coefficient can refer to the following formula:

rx_p=(bx_avg+(rx_avg/k_line-b_line))/(k_line+1/k_line)rx_p=(bx_avg+(rx_avg/k_line-b_line))/(k_line+1/k_line)

bx_p=k_line*rx_p+b_linebx_p=k_line*rx_p+b_line

其中,k_line和b_line分别为预设的绿色物体色温线在以rx为横坐标、以bx为纵坐标的直接坐标系中的斜率和截距。Wherein, k_line and b_line are the slope and intercept of the preset green object color temperature line in the direct coordinate system with rx as the abscissa and bx as the ordinate, respectively.

a1033、根据所述红绿比例系数投影值以及预设的红绿比例系数映射关系进行计算,得到第一光源点红绿比例系数。a1033. Perform calculation according to the projection value of the red-green ratio coefficient and the preset mapping relationship of the red-green ratio coefficient to obtain the red-green ratio coefficient of the first light source point.

具体的,在本发明实施例中,第一光源点红绿比例系数rx_w为k_r_line*rx_p+b_r_line。其中,k_r_line和b_r_line即为预设的红绿比例系数映射关系的特征值,其设置方法为需要把在同一场景下的绿色物体RGB像素值与灰色物体RGB像素值所对应的r/g值进行一一对应,以绿色物体RGB像素值的r/g值作为输入,灰色物体RGB像素值的r/g值作为输出,拟合直线则对应的直线特征值为k_r_line,b_r_line,可参照如图6所示的直线。Specifically, in the embodiment of the present invention, the red-green ratio coefficient rx_w of the first light source point is k_r_line*rx_p+b_r_line. Among them, k_r_line and b_r_line are the characteristic values of the preset red-green ratio coefficient mapping relationship, and the setting method is to compare the r/g value corresponding to the RGB pixel value of the green object and the RGB pixel value of the gray object in the same scene. One-to-one correspondence, the r/g value of the RGB pixel value of the green object is used as the input, and the r/g value of the RGB pixel value of the gray object is used as the output, and the fitting straight line corresponds to the eigenvalues of the straight line k_r_line, b_r_line, as shown in Figure 6 The straight line shown.

a1034、根据所述蓝绿比例系数投影值以及预设的蓝绿比例系数映射关系进行计算,得到第一光源点蓝绿比例系数。a1034. Perform calculation according to the blue-green proportional coefficient projection value and the preset blue-green proportional coefficient mapping relationship to obtain the blue-green proportional coefficient of the first light source point.

具体的,在本发明实施例中,第一光源点蓝绿比例系数bx_w为k_b_line*bx_p+b_b_line。其中,k_b_line和b_b_line即为预设的红绿比例系数映射关系的特征值,其设置方法为需要把在同一场景下的绿色物体RGB像素值与灰色物体RGB像素值所对应的b/g值进行一一对应,以绿色物体RGB像素值的b/g值作为输入,灰色物体RGB像素值的b/g值作为输出,拟合直线则对应的直线特征值为k_b_line,b_b_line。Specifically, in the embodiment of the present invention, the blue-green ratio coefficient bx_w of the first light source point is k_b_line*bx_p+b_b_line. Among them, k_b_line and b_b_line are the characteristic values of the preset red-green ratio coefficient mapping relationship, and the setting method is to compare the b/g value corresponding to the RGB pixel value of the green object and the RGB pixel value of the gray object in the same scene. One-to-one correspondence, the b/g value of the RGB pixel value of the green object is used as the input, and the b/g value of the RGB pixel value of the gray object is used as the output, and the fitted straight line corresponds to the eigenvalues of the line k_b_line, b_b_line.

a1035、根据所述第一光源点红绿比例系数和所述第一光源点蓝绿比例系数的组合,确定第一光源点颜色比例系数。a1035. Determine the first light source point color scale coefficient according to the combination of the first light source point red-green scale coefficient and the first light source point blue-green scale coefficient.

其中,参照上述图5和图6可知,对于一像素值来说,由其红绿比例系数和蓝绿比例系数在直角坐标系中唯一确定。因此,第一光源点颜色比例系数也为像素值的条件下,将所述第一光源点红绿比例系数和所述第一光源点蓝绿比例系数进行组合,可唯一确定第一光源点颜色比例系数。5 and 6 above, it can be seen that for a pixel value, it is uniquely determined by its red-green proportional coefficient and blue-green proportional coefficient in the Cartesian coordinate system. Therefore, under the condition that the color scale coefficient of the first light source point is also a pixel value, the color of the first light source point can be uniquely determined by combining the red-green scale coefficient of the first light source point and the blue-green scale coefficient of the first light source point Scale factor.

如图7所示的方法流程包括:The method flow shown in Figure 7 includes:

b1031、对所有灰色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值。b1031. Perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all gray pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients.

b1032、将所述红绿比例系数均值确定为第二光源点红绿比例系数,并将所述蓝绿比例系数均值确定为第二光源点蓝绿比例系数。b1032. Determine the mean value of the red-green ratio coefficient as the red-green ratio coefficient of the second light source point, and determine the mean value of the blue-green ratio coefficient as the blue-green ratio coefficient of the second light source point.

b1033、根据所述第二光源点红绿比例系数和所述第二光源点蓝绿比例系数的组合,确定第二光源点颜色比例系数。b1033. Determine a second light source point color scale coefficient according to a combination of the second light source point red-green scale coefficient and the second light source point blue-green scale coefficient.

104、根据所述第一光源点颜色比例系数和第二光源点颜色比例系数,确定实际光源点颜色比例系数。104. Determine an actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient.

具体的,在本发明实施例中,步骤104的具体实现方法可参照如图8所示的方法流程。Specifically, in the embodiment of the present invention, the specific implementation method ofstep 104 may refer to the method flow shown in FIG. 8 .

如图8所示的方法流程包括:The method flow shown in Figure 8 includes:

1041、根据所述像素点的RGB像素值进行计算,得到所述像素点的亮度均值。1041. Perform calculation according to the RGB pixel values of the pixel point to obtain the average brightness value of the pixel point.

在本实施例中,需要说明的是,根据像素点的RGB像素值来得到像素点的亮度值是公知的,例如可以采用Y(亮度)=(0.299*R)+(0.587*G)+(0.114*B)的公式来得到像素点的亮度值,然后再对所有像素点的亮度求均值即可得到亮度均值。本发明实施例并不排除其他得到亮度均值的方式。In this embodiment, it should be noted that it is known to obtain the brightness value of a pixel point according to the RGB pixel value of the pixel point, for example, Y (brightness)=(0.299*R)+(0.587*G)+( 0.114*B) formula to obtain the brightness value of the pixel, and then average the brightness of all pixels to obtain the average brightness. The embodiment of the present invention does not exclude other ways of obtaining the average brightness value.

1042、根据所述像素点的亮度均值、曝光增益值和快门时间进行计算,得到场景亮度估计值。当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,则执行步骤1043a;当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、灰色像素点数量大于等于第二数量阈值时,则执行步骤1043b;当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,则执行步骤1043c;当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值时,则执行步骤1043d;当场景亮度估计值小于第二亮度阈值,灰色像素点数量大于等于第二数量阈值时,则执行步骤1043e。1042. Perform calculation according to the average brightness value of the pixels, the exposure gain value, and the shutter time to obtain an estimated scene brightness value. When the scene brightness estimate is greater than the first brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is less than the second number threshold,step 1043a is performed; when the scene brightness estimate is greater than the first brightness threshold, green When the number of pixels is greater than the first number threshold and the number of gray pixels is greater than or equal to the second number threshold, then executestep 1043b; when the estimated scene brightness is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, the number of green pixels is greater than When the first number of thresholds and the number of gray pixels is less than the second number of thresholds, then performstep 1043c; when the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, the number of green pixels is greater than the first number of thresholds , then executestep 1043d; when the estimated scene brightness value is less than the second brightness threshold and the number of gray pixels is greater than or equal to the second number threshold, then executestep 1043e.

其中,在本实施例中,所述绿色像素点数量和所述灰色像素点数量是执行步骤102根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点的同时进行累加得到。Wherein, in this embodiment, the number of green pixels and the number of gray pixels are determined by performingstep 102 according to the RGB pixel values of the pixels to determine the green pixels and the gray pixels from the pixels Accumulated at the same time.

具体的,在本发明实施例中,场景亮度估计值I=L_avg/(gain*shutter),其中gain,shutter分别为曝光增益及快门时间值。在优选的条件下,要求曝光必须准确,以保证曝光增益和快门时间的准确。Specifically, in the embodiment of the present invention, the scene brightness estimation value I=L_avg/(gain*shutter), where gain and shutter are exposure gain and shutter time values respectively. Under optimal conditions, the exposure must be accurate to ensure the accuracy of exposure gain and shutter time.

在本实施例中,需要说明的是,场景亮度与该图像的拍摄环境的光强度紧密相关,在相同的光通量和相同的时间内,光强越强,则表示光线中包含的光能量就越大,到达感光元件上的光能量也就越大,由此产生的图像就越亮;光强越弱,则表示光线中包含的光能量就越小,到达感光元件上的光能量也就越小,由此产生的图像就越暗。In this embodiment, it should be noted that the brightness of the scene is closely related to the light intensity of the shooting environment of the image. In the same luminous flux and the same time, the stronger the light intensity, the greater the light energy contained in the light. The larger the light intensity, the greater the light energy reaching the photosensitive element, and the brighter the resulting image; the weaker the light intensity, the smaller the light energy contained in the light, and the more light energy reaching the photosensitive element. The smaller the value, the darker the resulting image.

在本实施例中,需要说明的是,快门时间是指快门打开,成像芯片感光的时间。在相同的场景光强和相同的光通量(也即相同的光圈值)下,快门时间越大,则图像就越亮;快门时间越小,则图像就越暗。因此,为了能得到一个合适的图像亮度,成像系统需要设置一个合适的快门时间。In this embodiment, it should be noted that the shutter time refers to the time when the shutter is opened and the imaging chip receives light. Under the same scene light intensity and the same luminous flux (that is, the same aperture value), the longer the shutter time, the brighter the image; the shorter the shutter time, the darker the image. Therefore, in order to obtain an appropriate image brightness, the imaging system needs to set an appropriate shutter time.

在本实施例中,需要说明是,曝光增益是指由感光芯片输出的模拟图像信号在达到ADC采集转换之间这段电信号的放大器增益。曝光增益越大,则图像就越亮,信号增益越小,则图像就越暗。In this embodiment, it should be noted that the exposure gain refers to the amplifier gain of the electrical signal during the period between the analog image signal output by the photosensitive chip and the ADC acquisition conversion. The larger the exposure gain, the brighter the image, and the smaller the signal gain, the darker the image.

在本实施例中,需要说明的是,实际光源点颜色比例系数为参考白点(whitepoint)的颜色比例系数,该参考白点在技术文档中常被称作参考白色(referencewhite)或目标白色(target white),被用来在图像捕获、编码和再现时定义白色。白点的数值不是恒定的,需要按照使用场合的不同对它的数值做出相应的更改。例如在室内摄影时常用白炽灯来照明,而白炽灯的光线色温相对日光较低,因而呈现出偏橙的颜色。倘若在这种情况下依然使用以日光为准的白点数值来定义白色,摄影的结果就会出现偏色的问题。In this embodiment, it should be noted that the actual light source point color scale coefficient is the color scale coefficient of the reference white point (whitepoint), which is often referred to as reference white (reference white) or target white (target white) in technical documents. white), is used to define white during image capture, encoding and rendering. The value of the white point is not constant, and it needs to be changed accordingly according to different usage occasions. For example, incandescent lamps are often used for lighting in indoor photography, and the color temperature of incandescent lamps is lower than that of sunlight, so it presents an orange color. If you still use the white point value based on sunlight to define white in this case, the result of photography will have a color cast problem.

在本实施例中,需要说明的是,利用色温来判断光源是公知的。例如常用光源的色温为:标准烛光为1930K(开尔文温度单位);钨丝灯为2760-2900K;荧光灯为3000K;闪光灯为3800K;中午阳光为5600K;电子闪光灯为6000K;蓝天为12000-18000K。In this embodiment, it should be noted that it is known to use color temperature to determine a light source. For example, the color temperature of commonly used light sources is: standard candlelight is 1930K (Kelvin temperature unit); tungsten lamp is 2760-2900K; fluorescent lamp is 3000K;

1043a、将第一光源点颜色比例系数确定为实际光源点颜色比例系数。1043a. Determine the first light source point color scale coefficient as an actual light source point color scale coefficient.

1043b、根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数。1043b. Determine whether the current light source is a fluorescent light source according to the second light source point color scale coefficient; when it is determined that the current light source is a fluorescent light source, determine the first light source point color scale coefficient as the actual light source point color scale coefficient.

1043c、将第一光源点颜色比例系数确定为实际光源点颜色比例系数。1043c. Determine the first light source point color scale coefficient as the actual light source point color scale coefficient.

1043d、根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,根据第一光源点颜色比例系数和第二光源点颜色比例系数的红绿比例系数进行加权计算,将经过加权计算的所述第一光源点颜色比例系数和第二光源点颜色比例系数中的红绿比例系数作为第三光源点的红绿比例系数,并根据第一光源点颜色比例系数和第二光源点颜色比例系数的蓝绿比例系数进行加权计算,将经过加权计算的所述第一光源点颜色比例系数和第二光源点颜色比例系数中的蓝绿比例系数作为第三光源点的蓝绿比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数确定实际光源点颜色比例系数。1043d. Determine whether the current light source is a fluorescent light source according to the color scale coefficient of the second light source point; when it is determined that the current light source is a fluorescent light source, perform weighting according to the red-green scale coefficient of the first light source point color scale coefficient and the second light source point color scale coefficient Calculate, using the red-green ratio coefficient in the first light source point color ratio coefficient and the second light source point color ratio coefficient after weighted calculation as the red-green ratio coefficient of the third light source point, and according to the first light source point color ratio coefficient Perform weighted calculation with the blue-green ratio coefficient of the second light source point color ratio coefficient, and use the blue-green ratio coefficient in the weighted first light source point color ratio coefficient and the second light source point color ratio coefficient as the third light source point The blue-green scale coefficient of the third light source point is used to determine the actual light source point color scale coefficient according to the red-green scale coefficient and the blue-green scale coefficient of the third light source point.

具体的,在本发明实施例中,第三光源点的红绿比例系数rx_final为(rx_g*w1+rx_w*w2)/(I_out-I_in),第三光源点的蓝绿比例系数为bx_final=(bx_g*w1+bx_w*w2)/(I_out-I_in)。其中,I_out为第一亮度阈值,用于表征在日光照射下室外亮度,I_in为第二亮度阈值,用于表征在日光照射下室内亮度。加权计算时使用的权重为w1=I-I_in,w2=I_out-I。Specifically, in the embodiment of the present invention, the red-green ratio coefficient rx_final of the third light source point is (rx_g*w1+rx_w*w2)/(I_out-I_in), and the blue-green ratio coefficient of the third light source point is bx_final=( bx_g*w1+bx_w*w2)/(I_out-I_in). Wherein, I_out is the first brightness threshold, which is used to represent the outdoor brightness under sunlight, and I_in is the second brightness threshold, which is used to represent the indoor brightness under sunlight. The weights used in weight calculation are w1=I-I_in, w2=I_out-I.

1043e、将第二光源点颜色比例系数确定为实际光源点颜色比例系数。1043e. Determine the second light source point color scale coefficient as the actual light source point color scale coefficient.

值得说明的是,在上述步骤1043a到1043e中均使用相同的参数设置,也就是说,第一亮度阈值、第二亮度阈值、第一数量阈值、第二数量阈值进行统一设置。It is worth noting that the same parameter settings are used in theabove steps 1043a to 1043e, that is, the first brightness threshold, the second brightness threshold, the first number threshold, and the second number threshold are uniformly set.

105、根据所述实际光源点颜色比例系数确定当前的自动白平衡增益值。105. Determine the current automatic white balance gain value according to the actual light source point color scale coefficient.

进一步的,根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值的具体实现可参照一下公式:Further, the specific implementation of calculating the current automatic white balance gain value according to the red-green ratio coefficient and blue-green ratio coefficient of the third light source point can refer to the following formula:

R_gain=1/rx_final,G_gain=1,B_gain=1/bx_final。R_gain=1/rx_final, G_gain=1, B_gain=1/bx_final.

106、使用所述当前的白平衡增益值进行白平衡调整。106. Use the current white balance gain value to perform white balance adjustment.

本发明实施例提供的一种白平衡的调整方法,通过区分绿色像素点和灰色像素点以获取相应的RGB像素值后,分别根据绿色像素点和灰色像素点各自对应的RGB像素值确定可能的光源点,再根据可能的光源点进行综合判定,以确定准确的实际光源点颜色比例系数,相比于现有技术中只能给出当前光源的类型是荧光灯还是日光的技术方案来说,本发明实施例提供的方法能够为设备提供准确的增益值,以保证对每一帧图像都能够进行自动的白平衡。In the method for adjusting white balance provided by the embodiment of the present invention, after obtaining the corresponding RGB pixel values by distinguishing between green pixels and gray pixels, possible white balances are determined according to the respective RGB pixel values corresponding to the green pixels and the gray pixels. The light source point, and then make a comprehensive judgment based on the possible light source points to determine the accurate color ratio coefficient of the actual light source point. The method provided by the embodiment of the invention can provide an accurate gain value for the device, so as to ensure automatic white balance for each frame of image.

本发明实施例提供了一种白平衡的调整装置,可用于实现如图1至图8的所有方法流程,如图9所示,该装置包括:An embodiment of the present invention provides a white balance adjustment device, which can be used to implement all the method processes shown in Figure 1 to Figure 8, as shown in Figure 9, the device includes:

获取单元21,用于获取所述像素点的RGB像素值,所述RGB像素值为RGB格式。The acquiringunit 21 is configured to acquire the RGB pixel value of the pixel point, and the RGB pixel value is in RGB format.

第一确定单元22,用于根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点。Thefirst determination unit 22 is configured to determine green pixel points and gray pixel points from the pixel points according to the RGB pixel values of the pixel points.

第二确定单元23,用于根据绿色像素点的RGB像素值确定第一光源点颜色比例系数,并根据灰色像素点的RGB像素值确定第二光源点颜色比例系数。Thesecond determination unit 23 is configured to determine the first light source point color scale coefficient according to the RGB pixel value of the green pixel point, and determine the second light source point color scale coefficient according to the RGB pixel value of the gray pixel point.

第三确定单元24,用于根据所述第一光源点颜色比例系数和第二光源点颜色比例系数,确定实际光源点颜色比例系数。The third determiningunit 24 is configured to determine an actual light source point color scale coefficient according to the first light source point color scale coefficient and the second light source point color scale coefficient.

第四确定单元25,用于根据所述实际光源点颜色比例系数确定当前的自动白平衡增益值。Thefourth determination unit 25 is configured to determine the current automatic white balance gain value according to the actual light source point color scale coefficient.

调整单元26,用于根据所述当前的白平衡增益值进行白平衡调整。Anadjustment unit 26, configured to perform white balance adjustment according to the current white balance gain value.

可选的是,如图10所示,所述第一确定单元22包括:Optionally, as shown in FIG. 10, the first determiningunit 22 includes:

第一计算模块221,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数以及亮度值。Thefirst calculation module 221 is configured to perform calculations according to the RGB pixel values of the pixels to obtain the red-green ratio coefficients, blue-green ratio coefficients and brightness values of the pixels.

第一确定模块222,用于在像素点的红绿比例系数和蓝绿比例系数的组合为预设的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合中的一个,并且,像素点的亮度值在亮度阈值范围内,将像素点确定为绿色像素点。The first determiningmodule 222 is configured to set the combination of the red-green scale coefficient and the blue-green scale coefficient at the pixel point as one of all combinations of the values of the red-green scale coefficient and the blue-green scale coefficient of the green object, and, If the luminance value of the pixel is within the range of the luminance threshold, the pixel is determined to be a green pixel.

可选的是,如图11所示,所述第一确定单元22包括:Optionally, as shown in FIG. 11, the first determiningunit 22 includes:

第二计算模块223,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数。Thesecond calculation module 223 is configured to perform calculations according to the RGB pixel values of the pixels to obtain the red-green ratio coefficients and blue-green ratio coefficients of the pixels.

第二确定模块224,用于当确定像素点的红绿比例系数为预设的灰色物体的红绿比例系数集合中的一个,并且像素点的蓝绿比例系数为预设的灰色物体的蓝绿比例系数集合中的一个时,则将像素点确定为灰色像素点。Thesecond determination module 224 is used to determine that the red-green scale coefficient of the pixel point is one of the preset red-green scale coefficient sets of the gray object, and the blue-green scale coefficient of the pixel point is the preset blue-green scale coefficient of the gray object When it is one of the set of scale coefficients, the pixel is determined as a gray pixel.

可选的是,如图12所示,所述第二确定单元23包括:Optionally, as shown in FIG. 12, the second determiningunit 23 includes:

第一均值处理模块231,用于对所有绿色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值。The first meanvalue processing module 231 is configured to perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all green pixels to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients.

第三计算模块232,用于根据红绿比例系数均值、蓝绿比例系数均值以及预设的绿色物体色温线进行计算,得到红绿比例系数投影值、蓝绿比例系数投影值;以及用于根据所述红绿比例系数投影值以及预设的红绿比例系数映射关系进行计算,得到第一光源点红绿比例系数,并根据所述蓝绿比例系数投影值以及预设的蓝绿比例系数映射关系进行计算,得到第一光源点蓝绿比例系数。Thethird calculation module 232 is used to calculate according to the mean value of the red-green scale coefficient, the mean value of the blue-green scale coefficient and the preset color temperature line of the green object to obtain the projection value of the red-green scale coefficient and the projection value of the blue-green scale coefficient; The red-green proportional coefficient projection value and the preset red-green proportional coefficient mapping relationship are calculated to obtain the first light source point red-green proportional coefficient, and according to the blue-green proportional coefficient projection value and the preset blue-green proportional coefficient mapping The relationship is calculated to obtain the blue-green ratio coefficient of the first light source point.

第一组合模块233,用于根据所述第一光源点红绿比例系数和所述第一光源点蓝绿比例系数的组合,确定第一光源点颜色比例系数。Thefirst combination module 233 is configured to determine a first light source point color scale coefficient according to a combination of the first light source point red-green scale coefficient and the first light source point blue-green scale coefficient.

可选的是,如图13所示,所述第二确定单元23包括:Optionally, as shown in FIG. 13, the second determiningunit 23 includes:

第二均值处理模块234,用于对所有灰色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值。The second meanvalue processing module 234 is used to perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all gray pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients.

第三确定模块235,用于将所述红绿比例系数均值确定为第二光源点红绿比例系数,并将所述蓝绿比例系数均值确定为第二光源点蓝绿比例系数。The third determiningmodule 235 is configured to determine the mean value of the red-green ratio coefficient as the red-green ratio coefficient of the second light source point, and determine the mean value of the blue-green ratio coefficient as the blue-green ratio coefficient of the second light source point.

第二组合模块236,用于根据所述第二光源点红绿比例系数和所述第二光源点蓝绿比例系数的组合,确定第二光源点颜色比例系数。Thesecond combination module 236 is configured to determine a second light source point color scale coefficient according to a combination of the second light source point red-green scale coefficient and the second light source point blue-green scale coefficient.

可选的是,如图14所示,所述第三确定单元24包括:Optionally, as shown in FIG. 14, the third determiningunit 24 includes:

第四计算模块241,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的亮度均值;以及用于根据所述像素点的亮度均值、曝光增益值和快门时间进行计算,得到场景亮度估计值。Thefourth calculation module 241 is used to calculate according to the RGB pixel value of the pixel point to obtain the average brightness value of the pixel point; and is used to perform calculation according to the average brightness value, exposure gain value and shutter time of the pixel point, Get the scene brightness estimate.

第四确定模块242,用于在场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数;以及用于在场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、灰色像素点数量大于等于第二数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数;以及用于在场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数;以及用于在场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,根据第一光源点颜色比例系数和第二光源点颜色比例系数的红绿比例系数进行加权计算,得到第三光源点的红绿比例系数;以及用于在场景亮度估计值小于第二亮度阈值,灰色像素点数量大于等于第二数量阈值时,将第二光源点颜色比例系数确定为实际光源点颜色比例系数。The fourth determining module 242 is configured to determine the color scale coefficient of the first light source point when the estimated scene brightness value is greater than the first brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is smaller than the second number threshold is the actual light source point color scale coefficient; and is used for when the estimated scene brightness value is greater than the first brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is greater than or equal to the second number threshold, according to the second light source point color The scale factor judges whether the current light source is a fluorescent light source; when it is determined that the current light source is a fluorescent light source, the first light source point color scale coefficient is determined as the actual light source point color scale coefficient; and is used when the estimated value of the scene brightness is not greater than the first brightness threshold And when it is greater than or equal to the second brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is less than the second number threshold, the first light source point color scale coefficient is determined as the actual light source point color scale coefficient; and used for When the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, and the number of green pixels is greater than the first quantity threshold, judge whether the current light source is a fluorescent light source according to the second light source point color ratio coefficient; when the current light source is determined When it is a fluorescent light source, weighted calculation is performed according to the red-green scale coefficient of the first light source point color scale coefficient and the second light source point color scale coefficient to obtain the red-green scale coefficient of the third light source point; The second brightness threshold, when the number of gray pixels is greater than or equal to the second quantity threshold, determine the second light source point color scale coefficient as the actual light source point color scale coefficient.

其中,所述绿色像素点数量和所述灰色像素点数量由所述第一确定单元22在根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点的同时累加得到。Wherein, the number of green pixels and the number of gray pixels are determined by thefirst determination unit 22 while determining green pixels and gray pixels from the pixels according to the RGB pixel values of the pixels Accumulated to get.

本发明实施例提供的一种白平衡的调整装置,通过区分绿色像素点和灰色像素点以获取相应的RGB像素值后,分别根据绿色像素点和灰色像素点各自对应的RGB像素值确定可能的光源点,再根据可能的光源点进行综合判定,以确定准确的实际光源点颜色比例系数,相比于现有技术中只能给出当前光源的类型是荧光灯还是日光的技术方案来说,本发明实施例提供的方法能够为设备提供准确的增益值,以保证对每一帧图像都能够进行自动的白平衡。A white balance adjustment device provided by an embodiment of the present invention obtains corresponding RGB pixel values by distinguishing between green pixels and gray pixels, and then determines possible The light source point, and then make a comprehensive judgment based on the possible light source points to determine the accurate color ratio coefficient of the actual light source point. The method provided by the embodiment of the invention can provide an accurate gain value for the device, so as to ensure automatic white balance for each frame of image.

本发明实施例还提供了一种电子终端,如图15所示,其具有至少一个中央处理器31和存储器32,所述存储器32被配置有代码,所述处理器用于调用存储器32内存储的代码,用以实现如图1至图6所示的所有方法流程。并且,所述中央处理器31和存储器32之间通过总线通信。An embodiment of the present invention also provides an electronic terminal, as shown in FIG. The code is used to realize all the method flows shown in Fig. 1 to Fig. 6 . Moreover, theCPU 31 communicates with thememory 32 through a bus.

其中,所述中央处理器31用于获取输入图像中像素点的RGB像素值,所述RGB像素值为RGB格式;根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点;根据绿色像素点的RGB像素值进行计算,得到第一光源点颜色比例系数,并根据灰色像素点的RGB像素值进行计算,得到第二光源点颜色比例系数;根据所述第一光源点颜色比例系数和第二光源点颜色比例系数,确定实际光源点颜色比例系数;根据所述实际光源点颜色比例系数确定当前的自动白平衡增益值;使用所述当前的白平衡增益值进行白平衡调整。Wherein, thecentral processing unit 31 is used to obtain the RGB pixel value of the pixel in the input image, and the RGB pixel value is in RGB format; according to the RGB pixel value of the pixel, determine the green pixel from the pixel and gray pixels; calculate according to the RGB pixel values of the green pixels to obtain the first light source point color scale coefficient, and calculate according to the RGB pixel values of the gray pixels to obtain the second light source point color scale coefficient; according to the first light source point color scale coefficient A light source point color scale coefficient and a second light source point color scale coefficient determine the actual light source point color scale coefficient; determine the current automatic white balance gain value according to the actual light source point color scale coefficient; use the current white balance gain value Make white balance adjustments.

所述存储器32,用于存储所述像素点的RGB像素值、第一光源点颜色比例系数、第二光源点颜色比例系数、自动白平衡增益值。Thememory 32 is used to store the RGB pixel value of the pixel point, the first light source point color scale coefficient, the second light source point color scale coefficient, and the automatic white balance gain value.

进一步的,所述中央处理器31,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数以及亮度值;当像素点的红绿比例系数和蓝绿比例系数的组合为预设的绿色物体的红绿比例系数和蓝绿比例系数取值的全部组合中的一个,并且,像素点的亮度值在亮度阈值范围内时,则将像素点确定为绿色像素点。Further, thecentral processing unit 31 is configured to perform calculations according to the RGB pixel values of the pixel points to obtain the red-green ratio coefficient, blue-green ratio coefficient and brightness value of the pixel point; when the red-green ratio of the pixel point The combination of the coefficient and the blue-green ratio coefficient is one of all the combinations of the preset red-green ratio coefficient and blue-green ratio coefficient value of the green object, and when the brightness value of the pixel is within the brightness threshold range, the pixel The points are determined as green pixels.

所述存储器32,还用于存储所述像素点的红绿比例系数、蓝绿比例系数以及亮度值。Thememory 32 is also used to store the red-green scale coefficient, blue-green scale coefficient and brightness value of the pixel.

进一步的,所述中央处理器31,用于根据所述像素点的RGB像素值进行计算,得到所述像素点的红绿比例系数、蓝绿比例系数;当确定像素点的红绿比例系数为预设的灰色物体的红绿比例系数集合中的一个,并且像素点的蓝绿比例系数为预设的灰色物体的蓝绿比例系数集合中的一个时,则将像素点确定为灰色像素点。Further, thecentral processing unit 31 is configured to perform calculations according to the RGB pixel values of the pixel points to obtain the red-green ratio coefficient and the blue-green ratio coefficient of the pixel point; when the red-green ratio coefficient of the pixel point is determined to be When one of the preset red-green scale coefficient sets of the gray object and the blue-green scale coefficient of the pixel point is one of the preset blue-green scale coefficient set of the gray object, the pixel point is determined as a gray pixel point.

进一步的,所述中央处理器31用于对所有绿色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值;根据红绿比例系数均值、蓝绿比例系数均值以及预设的绿色物体色温线进行计算,得到红绿比例系数投影值、蓝绿比例系数投影值;根据所述红绿比例系数投影值以及预设的红绿比例系数映射关系进行计算,得到第一光源点红绿比例系数,并根据所述蓝绿比例系数投影值以及预设的蓝绿比例系数映射关系进行计算,得到第一光源点蓝绿比例系数;根据所述第一光源点红绿比例系数和所述第一光源点蓝绿比例系数的组合,确定第一光源点颜色比例系数。Further, thecentral processing unit 31 is used to perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all green pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients; according to the mean value of the red-green scale coefficients , the average value of the blue-green ratio coefficient and the preset color temperature line of the green object are calculated to obtain the projection value of the red-green ratio coefficient and the projection value of the blue-green ratio coefficient; according to the projection value of the red-green ratio coefficient and the preset red-green ratio coefficient mapping The relationship is calculated to obtain the red-green ratio coefficient of the first light source point, and calculated according to the projection value of the blue-green ratio coefficient and the preset blue-green ratio coefficient mapping relationship to obtain the blue-green ratio coefficient of the first light source point; according to the The combination of the red-green ratio coefficient of the first light source point and the blue-green ratio coefficient of the first light source point determines the color ratio coefficient of the first light source point.

所述存储器32,还用于存储预设的绿色物体色温线、红绿比例系数投影值、蓝绿比例系数投影值、预设的蓝绿比例系数映射关系。Thememory 32 is also used to store preset green object color temperature lines, red-green scale coefficient projection values, blue-green scale coefficient projection values, and preset blue-green scale coefficient mapping relationships.

进一步的,所述中央处理器31用于对所有灰色像素点的红绿比例系数和蓝绿比例系数分别进行均值处理,得到红绿比例系数均值和蓝绿比例系数均值;将所述红绿比例系数均值确定为第二光源点红绿比例系数,并将所述蓝绿比例系数均值确定为第二光源点蓝绿比例系数;根据所述第二光源点红绿比例系数和所述第二光源点蓝绿比例系数的组合,确定第二光源点颜色比例系数。Further, thecentral processing unit 31 is used to perform mean value processing on the red-green scale coefficients and blue-green scale coefficients of all gray pixels, respectively, to obtain the mean value of the red-green scale coefficients and the mean value of the blue-green scale coefficients; The mean value of coefficients is determined as the red-green ratio coefficient of the second light source point, and the mean value of the blue-green ratio coefficient is determined as the blue-green ratio coefficient of the second light source point; according to the red-green ratio coefficient of the second light source point and the second light source point The combination of point blue and green scale coefficients determines the point color scale coefficient of the second light source.

进一步的,所述中央处理器31用于根据所述像素点的RGB像素值进行计算,得到所述像素点的亮度均值;根据所述像素点的亮度均值、曝光增益值和快门时间进行计算,得到场景亮度估计值;当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值;当场景亮度估计值大于第一亮度阈值、绿色像素点数量大于第一数量阈值、灰色像素点数量大于等于第二数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值;当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值、并且灰色像素点数量小于第二数量阈值时,将第一光源点颜色比例系数确定为实际光源点颜色比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值;当场景亮度估计值不大于第一亮度阈值且大于等于第二亮度阈值、绿色像素点数量大于第一数量阈值时,根据第二光源点颜色比例系数判断当前光源是否为荧光灯光源;当确定当前光源为荧光灯光源时,根据第一光源点颜色比例系数和第二光源点颜色比例系数的红绿比例系数进行加权计算,将经过加权计算的所述第一光源点颜色比例系数和第二光源点颜色比例系数中的红绿比例系数作为第三光源点的红绿比例系数,并根据第一光源点颜色比例系数和第二光源点颜色比例系数的蓝绿比例系数进行加权计算,将经过加权计算的所述第一光源点颜色比例系数和第二光源点颜色比例系数中的蓝绿比例系数作为第三光源点的蓝绿比例系数,根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值;当场景亮度估计值小于第二亮度阈值,灰色像素点数量大于等于第二数量阈值时,将第二光源点颜色比例系数确定为实际光源点颜色比例系数,并根据第三光源点的红绿比例系数和蓝绿比例系数计算当前的自动白平衡增益值。Further, the central processing unit 31 is used to calculate according to the RGB pixel value of the pixel to obtain the average brightness of the pixel; to perform calculation according to the average brightness of the pixel, exposure gain value and shutter time, Obtain the estimated value of scene brightness; when the estimated value of scene brightness is greater than the first brightness threshold, the number of green pixels is greater than the first number threshold, and the number of gray pixels is less than the second number threshold, the first light source point color scale coefficient is determined as the actual The color scale coefficient of the light source point, and calculate the current automatic white balance gain value according to the red-green scale coefficient and blue-green scale coefficient of the third light source point; when the estimated scene brightness value is greater than the first brightness threshold and the number of green pixels is greater than the first number When the threshold and the number of gray pixels are greater than or equal to the second number threshold, judge whether the current light source is a fluorescent light source according to the color scale coefficient of the second light source point; when it is determined that the current light source is a fluorescent light source, determine the color scale coefficient of the first light source point as the actual The color scale coefficient of the light source point, and calculate the current automatic white balance gain value according to the red-green scale coefficient and blue-green scale coefficient of the third light source point; when the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, When the number of green pixels is greater than the first number threshold and the number of gray pixels is less than the second number threshold, the first light source point color scale coefficient is determined as the actual light source point color scale coefficient, and according to the red-green scale coefficient of the third light source point Calculate the current automatic white balance gain value with the blue-green ratio coefficient; when the estimated scene brightness value is not greater than the first brightness threshold and greater than or equal to the second brightness threshold, and the number of green pixels is greater than the first number threshold, according to the second light source point color The proportional coefficient judges whether the current light source is a fluorescent light source; when it is determined that the current light source is a fluorescent light source, the weighted calculation is performed according to the red and green proportional coefficients of the first light source point color scale coefficient and the second light source point color scale coefficient, and the weighted calculated The first light source point color scale coefficient and the red-green scale coefficient in the second light source point color scale coefficient are used as the red-green scale coefficient of the third light source point, and according to the first light source point color scale coefficient and the second light source point color scale coefficient The blue-green ratio coefficient of the weighted calculation is carried out, and the blue-green ratio coefficient in the first light source point color ratio coefficient and the second light source point color ratio coefficient after weighted calculation is used as the blue-green ratio coefficient of the third light source point, according to the first light source point color ratio coefficient The red-green ratio coefficient and blue-green ratio coefficient of the three light source points calculate the current automatic white balance gain value; when the estimated scene brightness value is less than the second brightness threshold and the number of gray pixels is greater than or equal to the second number threshold, the second light source point The color scale coefficient is determined as the actual light source point color scale coefficient, and the current automatic white balance gain value is calculated according to the red-green scale coefficient and blue-green scale coefficient of the third light source point.

其中,所述绿色像素点数量和灰色像素点数量为所述中央处理器31执行步骤根据所述像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点的同时累加得到。Wherein, the number of green pixels and the number of gray pixels are determined by thecentral processing unit 31 according to the RGB pixel values of the pixels and accumulated from the pixels while determining the green pixels and the gray pixels .

所述存储器32还用于存储所述像素点的亮度均值、曝光增益值、快门时间、场景亮度估计值、第一亮度阈值、第二亮度阈值、第一数量阈值、第二数量阈值。Thememory 32 is also used to store the brightness average value, exposure gain value, shutter time, scene brightness estimation value, first brightness threshold, second brightness threshold, first number threshold, and second number threshold of the pixel.

本发明实施例提供的一种电子终端,通过区分绿色像素点和灰色像素点以获取相应的RGB像素值后,分别根据绿色像素点和灰色像素点各自对应的RGB像素值确定可能的光源点,再根据可能的光源点进行综合判定,以确定准确的实际光源点颜色比例系数,相比于现有技术中只能给出当前光源的类型是荧光灯还是日光的技术方案来说,本发明实施例提供的方法能够为设备提供准确的增益值,以保证对每一帧图像都能够进行自动的白平衡。An electronic terminal provided by an embodiment of the present invention obtains corresponding RGB pixel values by distinguishing between green pixels and gray pixels, and then determines possible light source points according to the respective RGB pixel values corresponding to the green pixels and the gray pixels, Then make a comprehensive judgment based on possible light source points to determine the accurate color ratio coefficient of the actual light source point. Compared with the technical solution in the prior art that can only give the current light source type whether it is a fluorescent lamp or sunlight, the embodiment of the present invention The provided method can provide accurate gain value for the device to ensure automatic white balance for each frame of image.

本发明涵盖本文所述的方法及设备可构建于例如(但不限于)以下各种各样的具有图像、视频处理功能的电子装置中或与其相关联:移动电话,无线装置,个人数据助理(PDA),手持式或便携式计算机,白平衡检测及调整装置、照相机,摄录机,电视监视器,平板显示器,计算机监视器,电子照片等。本文所述的装置可以配置为自身为非显示装置、但为单独的显示装置输出显示信号,也可以配置为与显示装置的结合。The present invention contemplates that the methods and devices described herein can be implemented in or associated with, for example (but not limited to), various electronic devices with image and video processing functions: mobile phones, wireless devices, personal data assistants ( PDA), handheld or portable computers, white balance detection and adjustment devices, cameras, camcorders, TV monitors, flat panel displays, computer monitors, electronic photos, etc. The devices described herein may be configured as non-display devices themselves, but output display signals for a separate display device, or as a combination with a display device.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘,硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be realized by means of software plus necessary general-purpose hardware, and of course also by hardware, but in many cases the former is a better embodiment . Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , a hard disk or an optical disk, etc., including several instructions for enabling a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (20)

When scene brightness estimated value is not more than first luminance threshold and during greater than first amount threshold, judges according to secondary light source point color-ratio coefficient whether current light source is fluorescent light more than or equal to second luminance threshold, green pixel number of spots; When definite current light source is fluorescent light, be weighted calculating according to the red green proportionality coefficient in the first light source point color-ratio coefficient and the secondary light source point color-ratio coefficient, will be through the described first light source point color-ratio coefficient of weighted calculation and the red green proportionality coefficient in the secondary light source point color-ratio coefficient red green proportionality coefficient as the 3rd light source point, and be weighted calculating according to the bluish-green proportionality coefficient in the first light source point color-ratio coefficient and the secondary light source point color-ratio coefficient, will be through the described first light source point color-ratio coefficient of weighted calculation and the bluish-green proportionality coefficient in the secondary light source point color-ratio coefficient bluish-green proportionality coefficient as the 3rd light source point, and determine actual light source point color-ratio coefficient according to the red green proportionality coefficient and the bluish-green proportionality coefficient of the 3rd light source point.
The 3rd computing module is used for calculating according to red green proportionality coefficient average, bluish-green proportionality coefficient average and default green object colour temperature line, obtains red green proportionality coefficient projection value, bluish-green proportionality coefficient projection value; And be used for calculating according to described red green proportionality coefficient projection value and default red green proportionality coefficient mapping relations, obtain the red green proportionality coefficient of first light source point, and calculate according to described bluish-green proportionality coefficient projection value and default bluish-green proportionality coefficient mapping relations, obtain the bluish-green proportionality coefficient of first light source point;
19. device according to claim 16, it is characterized in that, described the 4th determination module also is used for being not more than first luminance threshold and during greater than first amount threshold, judging according to secondary light source point color-ratio coefficient whether current light source is fluorescent light more than or equal to second luminance threshold, green pixel number of spots when scene brightness estimated value; When definite current light source is fluorescent light, red green proportionality coefficient according to the first light source point color-ratio coefficient and secondary light source point color-ratio coefficient kind is weighted calculating, will be through the described first light source point color-ratio coefficient of weighted calculation and the red green proportionality coefficient in the secondary light source point color-ratio coefficient red green proportionality coefficient as the 3rd light source point, and be weighted calculating according to the bluish-green proportionality coefficient in the first light source point color-ratio coefficient and the secondary light source point color-ratio coefficient, will be through the described first light source point color-ratio coefficient of weighted calculation and the bluish-green proportionality coefficient in the secondary light source point color-ratio coefficient bluish-green proportionality coefficient as the 3rd light source point, and determine actual light source point color-ratio coefficient according to the red green proportionality coefficient and the bluish-green proportionality coefficient of the 3rd light source point.
CN201310109918.5A2013-03-292013-03-29White balance adjusting method and deviceActiveCN103227928B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310109918.5ACN103227928B (en)2013-03-292013-03-29White balance adjusting method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310109918.5ACN103227928B (en)2013-03-292013-03-29White balance adjusting method and device

Publications (2)

Publication NumberPublication Date
CN103227928Atrue CN103227928A (en)2013-07-31
CN103227928B CN103227928B (en)2015-04-29

Family

ID=48838165

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310109918.5AActiveCN103227928B (en)2013-03-292013-03-29White balance adjusting method and device

Country Status (1)

CountryLink
CN (1)CN103227928B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103546732A (en)*2013-10-182014-01-29广州市浩云安防科技股份有限公司Image processing method and system
CN104954772A (en)*2015-06-262015-09-30济南中维世纪科技有限公司Image adjacent-grey pixel selection algorithm applied to automatic white balance algorithm
CN105100764A (en)*2015-06-262015-11-25小米科技有限责任公司Photographing method and device
CN105635593A (en)*2014-10-132016-06-01广达电脑股份有限公司Multiple exposure imaging system and white balance method thereof
CN105872510A (en)*2016-04-252016-08-17浙江大华技术股份有限公司Image white balance processing method and device
CN105898263A (en)*2016-05-242016-08-24厦门美图之家科技有限公司Method and device for white balance of image and computing device
CN107564047A (en)*2017-09-122018-01-09北京小米移动软件有限公司Image processing method and device, electronic equipment and computer-readable recording medium
CN107801012A (en)*2017-10-302018-03-13广东欧珀移动通信有限公司White balancing treatment method and device, electronic installation and computer-readable recording medium
CN109215612A (en)*2017-06-302019-01-15北京小米移动软件有限公司Adjusting method and device that screen is shown, electronic equipment, storage medium
US10805588B2 (en)2016-04-252020-10-13Zhejiang Dahua Technology Co., Ltd.Methods, systems, and media for image white balance adjustment
CN111955004A (en)*2018-06-182020-11-17Jvc建伍株式会社 color correction device
CN117998070A (en)*2024-04-032024-05-07宁波舜宇光电软件开发有限公司Brightness and white balance regulating method for image and image display equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1863321A (en)*2005-05-112006-11-15索尼公司White balance controlling apparatus, method, program and image pickup apparatus
CN1953561A (en)*2006-11-272007-04-25北京中星微电子有限公司A system and method to correct white balance
CN101072365A (en)*2006-05-112007-11-14奥林巴斯映像株式会社White balance control method, imaging apparatus and storage medium storing white balance control program
CN101159879A (en)*2006-10-082008-04-09普立尔科技股份有限公司Digital image acquisition device and white balance adjustment method thereof
CN102300100A (en)*2010-06-282011-12-28比亚迪股份有限公司White balance control device and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1863321A (en)*2005-05-112006-11-15索尼公司White balance controlling apparatus, method, program and image pickup apparatus
CN101072365A (en)*2006-05-112007-11-14奥林巴斯映像株式会社White balance control method, imaging apparatus and storage medium storing white balance control program
CN101159879A (en)*2006-10-082008-04-09普立尔科技股份有限公司Digital image acquisition device and white balance adjustment method thereof
CN1953561A (en)*2006-11-272007-04-25北京中星微电子有限公司A system and method to correct white balance
CN102300100A (en)*2010-06-282011-12-28比亚迪股份有限公司White balance control device and method

Cited By (20)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103546732B (en)*2013-10-182016-05-18广州市浩云安防科技股份有限公司Image processing method and system
CN103546732A (en)*2013-10-182014-01-29广州市浩云安防科技股份有限公司Image processing method and system
CN105635593B (en)*2014-10-132018-09-11广达电脑股份有限公司Multiple exposure imaging system and white balance method thereof
CN105635593A (en)*2014-10-132016-06-01广达电脑股份有限公司Multiple exposure imaging system and white balance method thereof
CN104954772A (en)*2015-06-262015-09-30济南中维世纪科技有限公司Image adjacent-grey pixel selection algorithm applied to automatic white balance algorithm
CN105100764A (en)*2015-06-262015-11-25小米科技有限责任公司Photographing method and device
CN105872510A (en)*2016-04-252016-08-17浙江大华技术股份有限公司Image white balance processing method and device
US10805588B2 (en)2016-04-252020-10-13Zhejiang Dahua Technology Co., Ltd.Methods, systems, and media for image white balance adjustment
US11363244B2 (en)2016-04-252022-06-14Zhejiang Dahua Technology Co., Ltd.Methods, systems, and media for image white balance adjustment
CN105898263A (en)*2016-05-242016-08-24厦门美图之家科技有限公司Method and device for white balance of image and computing device
CN105898263B (en)*2016-05-242017-08-25厦门美图之家科技有限公司A kind of image white balance method, device and computing device
CN109215612A (en)*2017-06-302019-01-15北京小米移动软件有限公司Adjusting method and device that screen is shown, electronic equipment, storage medium
CN107564047A (en)*2017-09-122018-01-09北京小米移动软件有限公司Image processing method and device, electronic equipment and computer-readable recording medium
CN107564047B (en)*2017-09-122020-10-20北京小米移动软件有限公司Image processing method and device, electronic equipment and computer readable storage medium
US10674128B2 (en)2017-10-302020-06-02Guangdong Oppo Mobile Telecommunications Corp., Ltd.White balance processing method, electronic device and computer readable storage medium
US10616544B2 (en)2017-10-302020-04-07Guangdong Oppo Mobile Telecommunications Corp., Ltd.White balance processing method, electronic device and computer readable storage medium
CN107801012A (en)*2017-10-302018-03-13广东欧珀移动通信有限公司White balancing treatment method and device, electronic installation and computer-readable recording medium
CN111955004A (en)*2018-06-182020-11-17Jvc建伍株式会社 color correction device
CN117998070A (en)*2024-04-032024-05-07宁波舜宇光电软件开发有限公司Brightness and white balance regulating method for image and image display equipment
CN117998070B (en)*2024-04-032024-06-11宁波舜宇光电软件开发有限公司Brightness and white balance regulating method for image and image display equipment

Also Published As

Publication numberPublication date
CN103227928B (en)2015-04-29

Similar Documents

PublicationPublication DateTitle
CN103227928B (en)White balance adjusting method and device
CN108024055B (en)White balance processing method and device, mobile terminal and storage medium
CN108174172B (en)Photographing method and apparatus, computer-readable storage medium, and computer device
CN109151426B (en)White balance adjusting method and device, camera and medium
JP5497151B2 (en) Automatic backlight detection
CN110572637B (en)Image anomaly detection method, terminal device and storage medium
CN108234971B (en)White balance parameter determines method, white balance adjustment method and device, storage medium, terminal
CN105578166B (en)A kind of colour temperature determines method and device
CN104618702B (en)A kind of digital camera auto white balance method supposed based on white block
CN108012134B (en)Photographing method and apparatus, computer-readable storage medium, and computer device
JP5162905B2 (en) Imaging device
CN101957988B (en)Method and device for obtaining probability distribution of image grey spots and white balance method and device
US9307213B2 (en)Robust selection and weighting for gray patch automatic white balancing
CN103546732A (en)Image processing method and system
CN113329217B (en)Automatic white balance parameter processing method and device, and computer readable storage medium
CN105554489A (en)White balance adjusting method and shooting terminal
CN104735362A (en)Picture taking method and device
JP5482850B2 (en) Imaging device
CN107464225A (en) Image processing method, device, computer readable storage medium and mobile terminal
CN107396079A (en) Method and device for adjusting white balance
US9030575B2 (en)Transformations and white point constraint solutions for a novel chromaticity space
CN106713775A (en)Method and apparatus for shooting based on mobile device
CN107580205A (en) Method and device for adjusting white balance
CN108063934A (en)Image processing method and device, computer readable storage medium and computer device
US20200029016A1 (en)Moving object monitoring device and moving object monitoring system

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp