首页 AWB 原理

AWB 原理

举报
开通vip

AWB 原理nullAutomatic White Balance for Digital Still CameraAutomatic White Balance for Digital Still CameraTzann-Sheng Chiounull What is “white balance”? The color of an object recorded by a color sensor varies with the light source used in the process of sensor...

AWB 原理
nullAutomatic White Balance for Digital Still CameraAutomatic White Balance for Digital Still CameraTzann-Sheng Chiounull What is “white balance”? The color of an object recorded by a color sensor varies with the light source used in the process of sensor’s white balance calibration and the light source that illuminates the scene. For many sensors, daylight is the properly calibrating illuminant. The true color of the object is captured only if the proper illuminant illuminates the object.null If the calibrating illuminant is daylight, then a white object illuminated with daylight will show the object in its true white color. When the same white object is illuminated with other light sources, the object would have a slightly reddish or slightly bluish color. White balance ------ Compensate the color difference caused by various light sources.nullCalibration: Daylight Light source: DaylightCalibration: Daylight Light source: CoolwhiteCalibration: Daylight Light source: HorizonnullCalibration: Coolwhite Light source: CoolwhiteCalibration: Coolwhite Light source: DaylightCalibration: Coolwhite Lighsource: Horizonnull White balance adjustment in traditional electronic camera The output signal can be decomposed into the luminance Y, the chrominance Cr and the chrominance Cb. This method is under the assumption that the integrated values of a color picture are at white color. =======Fig. 1=======nullCrCbOABCDFig. 1 Cr, Cb 2-dimension coordinatenull The drawback of this method ------ A large object or background with a uniform color takes place. null Method 1 for white balance Experiment We can transfer a color from RGB color space to YCrCb color space. Where Y is the intensity; Cr and Cb are the color components. Y = 0.299R+0.587G+0.114B Cb = -0.169R-0.331G+0.500B Cr = 0.500R-0.418G-0.08Bnull The light source used in this experiment are listed. =======Table. 1======= The experimental data of colors under different light sources are showed. =======Fig. 2======= nullTable1. Light source names and their codesABABBBBBAAAAPinkMiniateFulvousYellowGreenAeruginousWhiteAxis of low color temperatureAxis of high color temperatureA: The deflected direction of high color temperatureB: The deflected direction of low color temperatureFig. 2 The experimental data of colors under different light sourcesnull The experimental results A dark color has less deviation from nominal position under different light sources, as opposed to the bright color, where the deviation is significant on the Cb and Cr components. null At high luminance the color components are easy to saturated; while at low luminance, the color components become colorless. When a white object is illuminated with different light sources, the slope of deflection, i.e. the ratio of Cr to Cb, r=Cr/Cb, is approximate between –1.5 and –0.5. null Automatic white balance based on the fuzzy rules A frame of image can be divided into 8 segments for weighting. =======Fig. 3a, Fig. 3b======= The averages of Cr and Cb components for all pixels in each segment are calculated, and then weighted under fuzzy control means.null12348765Fig. 3a Division of frame (1)18765432Fig. 3b Division of frame(2)null The fuzzy rules based on experimental results The averages of Cb and Cr for each segment are weighted less for dark colors than bright colors. null At high luminance the color components are easy to be saturated, while at low luminance, the color components become colorless. Hence, the Cb and Cr will be weighted with small value under the conditions of high end and low end luminance. If the slope of deflection, i.e. the ratio of Cr to Cb, r=Cr/Cb, is approximate between –1.5 and –0.5, the given weighting is large.null When a large object or a background occupies more than one segment, its color will dominate that segment. The r value will be similar among adjacent segments. In this case the given weighting for that segment is small in order to compensate color of the picture. ======Fig. 4a, Fig. 4b======null00CbCrCbFig. 4aFig. 4bCrnull Method 2 for white balance The RGB signal can be decomposed into the luminance Y, the chrominance Cr and the chrominance Cb. Divide the image into 16 segments for weighting. If the angle from color temperature change axis is large, then the value is weighted less. =======Fig. 5 =======null CbCrAngleAngleColor temp. change axisFig. 5nullIf the high frequency component is large, a wide focal length is used, and camera to object distance is long, then the weight is set high. The segment might include many different objects. null Method 3 for white balance This method is under Gray World Assumption. Gray World Assumption states that given an image with sufficient amount of color variations, the average value of the Red, Green, and Blue components of the image should average out to a common gray value. null This method is also under Perfect Reflector Hypothesis. Perfect Reflector Hypothesis assumes that the brightness object in an image reflects the best approximation of light sources. The RGB values of the brightest or most reflective spots are used to scale the RGB values of all other objects in the image in order to obtain a relative reading for entire image. null The averages of above R, G and B values are calculated. Measure the ratios of R/G and B/G. If the ratios of R/G and B/G fall on certain setting range, we think the image is at white balance. If the ratios are out of our setting range, we must adjust the R and B gain until the image is at white balance.null Method 4 for white balance The methodology is under RGB color space. Analyze the color image histogram of three color components Red, Green and Blue. Over 95th percentile is selected for each component type. The 5% of component values in the color image having the highest R, G and B values within the 0-255 range are selected to compute the white point. =====Fig. 6 ======nullSet of pixels in 95th percentile of the distribution 2550# of sets of pixels with a given component valueFig. 6The component valuenull The white balance point (R.sub.ave, G.sub.ave, B.sub.ave) is computed from each component type. The white balance point is sought to be adjusted closer to the ideal white point (R’.sub.ave, G’.sub.ave, B’.sub.ave) by adjusting individual R, G and B values according to gr, gg and gb. null R’.sub.ave= gr*R.sub.ave G’.sub.ave= gg*G.sub.ave B’.sub.ave= gb*B.sub.ave White point have the property. R’.sub.ave= G’.sub.ave= B’.sub.ave The luminance of the adjusted white point is unchanged. null Y’.sub.ave= Y.sub.ave Y.sub.ave= ay*R.sub.ave+by*G.sub.ave+cy*B.sub.ave Y’.sub.ave=ay*R’.sub.ave+by*G’.sub.ave+cy*B’.sub.ave ay, by, cy is known coefficients for converting from RGB space to Y gr=Y.sub.ave/([ay+by+cy]*R.sub.ave) gg= Y.sub.ave/([ay+by+cy]*G.sub.ave) gb=Y.sub.ave/([ay+by+cy}*B.sub.ave) The R, G and B values of each set of pixels in the image are multiplied by gr, gg and gb.nullThis method is also adaptive under YUV space The found white point should have a relatively high luminance Y; its U and V components are generally close to 128 which is the middle of the full range of 16-240. The Y group may include all component values over the 95th percentile of the Y population. The U and V groups may include values in the range 128(+-)20.nullConvert from YUV to RGB. Use the method under RGB space. nullCalibration: DaylightLight source: DaylightLight source: CoolwhiteLight source: IncaLight source: HorizonnullnullnullnullnullCalibration: CoolwhiteLight source: DaylightLight source: coolwhiteLight source: IncaLight source: HorizonnullnullnullnullnullOriginalGWBBGWBSGWBLight source: Daylight Calibration:DaylightnullnullLight source: Coolwhite Calibration: DaylightOriginalGWBBGWBSGWBnullOriginalGWBBGWBSGWBLight source: Inca Calibration: DaylightnullOriginalGWBBGWBSGWBLight source: Horizon Calibration: DaylightnullMethod 5 for white balance null null null White balance information extracting unit Partite the picture into M*N blocks. Block maximum-luminance date WP indicates a pixel whose luminance value is the largest among those pixels in one block. Block minimum-luminance date BP indicates a pixel whose luminance value is the smallest among those pixels in one block.null Block average-luminance data AVE indicates a pixel whose value is the average of those pixels in one block. WPy indicates the luminance value of WP. WP(r-y) indicates a first color difference value of WP. WP(b-y) indicates a second color difference value of WP. Describe BPy, BP(r-y), BP(b-y), AVEy, AVE(r-y), and AVE(b-y) as above definition.null WPmax indicates a pixel whose luminance value is the largest among the block maximum- luminance WP of the M*N blocks. WXy indicates the luminance value of WPmax. WX(r-y) indicates a first color difference value of WPmax. WX(b-y) indicates a second color difference value of WPmax.null WXsqc indicates the squared chromaticity of WPmax. WXsqc = WX(r-y).sup.2+WX(b-y).sup.2 WA indicates a pixel whose value is the average of the block maximum-luminance WP of M*N blocks. Describe WAy, WA(r-y), WA(b-y), and WAsqc as above definition. null AVEmax indicates a pixel whose luminance value is the largest among the block average- luminance AVE of the M*N blocks. Describe AXy, AX(r-y), AX(b-y), and AXsqc as above definition. AA indicates a pixel whose value is the average of those block average-luminance AVE of M*N blocks.null Describe AAy, AA(r-y), AA(b-y), and AAsqc as above definition. A chromaticity of a picture in the RGB color space is defined as a distance between an achromatic axis and the picture data. (r-y).sup.2+(b-y).sup.2 is treated as a chromaticity value squared for convenience. null White balance adjustment judging unit A major portion of the colored picture is occupied by a chromatic colored object. WAsqc>=WAth, AXsqc>=AXth and AAsqc>=AAth WAth, AXth and AAth denote the thresholds of the squared chromaticity data. The white balance of the colored picture is sufficiently kept.null WXsqc<=WAXmax, WAsqc<=WAXmax WAXmax denotes an upper limit threshold for the WXsqc and WAsqc. The white region detecting unit A viewer is difficult to feel that the color of the chromatic colored object is not correctly reproduced. Even though an achromatic colored object is slightly colored, the viewer can easily feel that the achromatic object is strange.null The white region judgment is performed by using WPmax or AVEmax. WPmax can be used as a piece of reference data for the white balance adjustment. A top portion of the color distribution in a high luminance direction agrees with WPmax. Block distance dis-wp denotes the distance between WP and the original point of the color space.null Dis-WP= (WPr.sup.2+WPg.sup.2+WPb.sup.2).sup.1/2 Dis-max=max(dis-WP(m,n)) Dis-WX=(WXr.sup.2+WXg.sup.2+WXb.sup.2).sup.1/2 The first condition that Dis-max=Dis-WX is satisfied. The second condition that WXy>WXYmax is satisfied. WXYmax is a prescribed threshold.null WPmax does not indicate the existence of a white region, there is a case that AVEmax indicates the existence of a white region. AVEmax can be also used as a piece of reference data for the white balance adjustment. The first condition that AXsqcWXYmax is satisfied, the first white balance mode is selected. WPmax is transferred to the white balance coefficient calculating unit. In case where the condition AXsqc180 then DEFhue=360-DEFhue DEFhue<=HUE-DEF, where HUE-DEF denotes the hue threshold value. null null SUBy=AVEy-BPy SUBy<=AB-Y-DIF, where AB-Y-DIF denote a prescribed threshold. AVEsqc>=BRMsqc and BPsqc>=BRMsqc BRMsqc denotes a threshold for the squared chromaticity values AVEsqc and BPsqc. The block removal flag is set to “on” when above conditions are satisfied.null Compute GRave-angle and GBave-angle. Compute GRwt-angle and GBwt-angle. GRwt-angle denotes a GR vector of GR plane color distribution (GRvec-g,GRvec-r) GBwt-angle denotes a GB vector of GB plane color distribution (GBvec-g,GBvec-b) null GBwt-angle denotes a GB vector of GB plane color distribution (GBvec-g,GBvec-b) Three-dimensional color distribution axis (GRvec-r,GBvec-g,GBvec-b) GBvec-g=128 GRvec-r=128*tan(GRwt-angle*pi/180) GBvec-b=128*tan(GBwt-angle*pi/180) null null null The second-stage color distribution axis calculating unit Compute Gravity centers of data WP and data AVE placed in a cylindrical region of RGB color space having the first-stage color distribution axis as a central axis. WPDsqr denotes a squared distance between WP and the first-stage color distribution.null WPDsqr=A-B*B/C A=WPr.sup.2+WPg.sup.2+WPb.sup.2 B=Grvec-r.sup.2+Gbvec-g.sup.2+Gbvec-b.sup.2 C=WPr*Grvecr+WPg*Gbvec-g+WPb*Gbvec-b Rcy denotes a radius of the cylindrical region. WPDsqr(m,n)<=Rcy.sup.2 null Describe AVEDsqr<=Rcy.sup.2 as above definition. A WP gravity center (WPgc-r,WPgc-g,WPgc-b) of the data WP placed in the cylindrical region is calculated. An AVE gravity center (AVEgc-r,AVEgc-g,AVEgc-b) of the data AVE placed in the cylindrical region in calculated. null The second-stage color distribution axis vector (WBr,WBg,WBb) is defined as a vector extending from the original point to the average point of the WP gravity center and the AVE gravity center. null null The relaxation factor calculating unit The simplified hue histogram generating unit The histogram type recognizing unit The uneven color distribution type and the normal color distribution type WAsqc is used for the first relaxation factor calculating unit.null AXsqc is used for the second relaxation factor calculating unit. AAsqc is used for the third relaxation factor calculating unit. The relaxation factor Frlx ranges from 0 to 1024. In case of Frlx=0, any relaxation for white balance coefficients is not performed. In case of Frlx=1024, any white balance is not performed in the adjusting unit.null Normal color distribution curve Frlx=1024*{1-((256-Xn)/256).sup.2} Uneven color distribution curve Frlx=1024*{1-((256-Xn)/256).sup.4} WAch denotes an upper limit for WAsqc. WAncl denotes a first lower limit for WAsqc. The first lower limit is used for the normal color distribution type. null WAucl denotes a second lower limit for WAsqc. The second lower limit is used for the normal color distribution type. A value of the squared chromaticity data is lower than the lower limit, a relaxation factor Frlx=0 is set; a value of the squared chromaticity data is higher than the upper limit, the relaxation factor Frlx=1024 is set.null NWAsqc=256*(WAsqc-Wacl)/(WAch-WAcl) Frlx-WA=1024*{1-((256-NWAsqc)/256).sup.2} Describe Frlx-AX and Frlx-AA as above definition. The maximum value selecting unit null null null The white balance coefficient calculating unit In cases where the first white balance adjustment mode is selected, the white balance coefficients is calculated by using the (WXr,WXg,WXb) or (AXr,AXg,AXb). Y=0.3*WXr+0.59*WXg+0.11*WXb WBkr=Y/WXr WBkg=Y/WXg WBkb=Y/WXbnull Y=0.3*AXr+0.59*AXg+0.11*Axb WBkr=Y/AXr WBkg=Y/AXg WBkb=Y/Axb In cases where the second white balance adjustment mode is selected, the white balance coefficients is calculated by using the (WBr,WBg,WBb) null Y=0.3*WBr+0.59*WBg+0.11*WBb WBkr-pr=Y/WBr WBkg-pr=Y/WBg WBkb-pr=Y/WBb WBkr=1+(WBKr-pr-1)*(1024-Frlx)/1024 WBkg=1+(WBKg-pr-1)*(1024-Frlx)/1024 WBkb=1+(WBKb-pr-1)*(1024-Frlx)/1024 null Future
本文档为【AWB 原理】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_082276
暂无简介~
格式:ppt
大小:1020KB
软件:PowerPoint
页数:0
分类:互联网
上传时间:2009-09-09
浏览量:52