• 沒有找到結果。

A Novel Automatic White Balance Method For Digital Still Cameras

N/A
N/A
Protected

Academic year: 2022

Share "A Novel Automatic White Balance Method For Digital Still Cameras"

Copied!
6
0
0

加載中.... (立即查看全文)

全文

(1)

A Novel Automatic White Balance Method For Digital Still Cameras

Ching-Chih Weng1, Homer Chen1,2, and Chiou-Shann Fuh3

Department of Electrical Engineering, 2Graduate Institute of Communication Engineering 3 Department of Computer Science and Information Engineering National Taiwan University, Taipei,

Taiwan

Email: b89901135@ntu.edu.tw, homer@cc.ee.ntu.edu.tw, fuh@csie.ntu.edu.tw

Abstract—Automatic white balance is an important function of digital still cameras. The goal of white balance is to adjust the image such that it looks as if it is taken under canonical light. We proposed a novel technique to detect reference white points in an image. Our algorithm uses dynamic threshold for white point detection and is more flexible than other existing ad hoc algorithms. We have tested the algorithm on 50 images taken under various light sources. The results show that the algorithm is superior or comparable to other methods in both objective and subjective evaluations. The complexity of the algorithm is quite low, which makes it attractive for real-world applications.

I. INTRODUCTION

When an image of a scene is captured by a digital camera, the sensor response at each pixel depends on the illumination [1]. That is, each pixel value recorded by the sensor is related to the color temperature of the light source. When a white object is illuminated under a low color temperature, it will appear reddish in the recorded image. Similarly, it will appear bluish under a high color temperature. The goal of white balance is to process the image such that it looks as if it is taken under canonical light [3], [6].

Generally, white balance algorithms consist of two steps. They first estimate the illumination, and then use the result obtained to compensate the image [4].

To maintain the color constancy of an image taken under different light sources, computational color constancy algorithms have been applied to accomplish white balance for digital cameras. There are various computational color constancy algorithms [1], [2], [4], [5], [8] proposed in the literature, including grey world, perfect reflector, gamut mapping, and color by correlation. Most of these algorithms make certain assumptions of the color distribution of the image. They differ in the way the illumination is estimated. Illumination estimation is a challenging issue because the sensor response is controlled by many different factors such as object shape, illumination geometry, etc. These factors are difficult to separate in the illumination estimation step.

In the image adjustment step, methods such as the Von Kries diagonal model can be used to scale the R, G, and B channels separately [4], [7]. The diagonal model holds when the frequency responses of R, G, and B components are narrow band and do not overlap with each other, and the error of diagonal model is much smaller than that of the illumination estimation [4].

In this paper, we present a novel technique that uses image statistics instead of ad hoc assumptions to estimate the reference white points. Our method performs better than existing algorithms in chromaticity test.

II. EXISTING AUTOMATIC WHITE BALANCE ALGORITHMS

In this section we will discuss several popular existing automatic white balance algorithms.

A. Gray World Method

The gray world algorithm works under the assumption that, given an image with sufficient color variations, the average of reflectance of a scene is achromatic [4]. The gray world method is one of the oldest and simplest and is still a popular technique. It basically works well. However it fails when there are large objects with uniform color in an image.

(2)

B. Perfect Reflector Method

The perfect reflector algorithm is based on the assumption that the brightest pixel in an image corresponds to an object point on a glossy or specular surface, which conveys a great amount of information about the illumination of the scene [4]. Specular or glossy surfaces reflect the actual color of the light source because their reflectance functions are constant over a wide range of wavelengths.

The perfect reflector algorithm exploits this property for image adjustment. It locates the brightest pixel and assigns it as the reference white point.

C. Fuzzy Rule Method

In the fuzzy rule method (FRM) [3], the image is analyzed in the CbCr color space. Fig. 1 shows the deviations of various colors from their nominal positions under different light sources. It is also found that bright colors deviate more than dark colors and that the to ratio of the white object is between -1.5 to -0.5. Several fuzzy rules are set based on the characteristics discussed above. FRM at first divides the image into 8 segments. The averages of and within each segment are calculated. Then the weighting factors for each segments are determined, based on the fuzzy control means, to calculate the evaluating and

Cr Cb

Cr Cb

C′r C′b of the whole image frame. The C′r and indicate the deviation of the image color from the white balance point. These values are employed to obtain the gains for and adjustment of each pixel. The procedure stated above will be performed iteratively until the results of and

C′b

Cr Cb

C′r C′b are close to that of white balance point [3].

Fig. 1. The color deviation under high and low color temperature in the CbCr space. A: The deflected direction of high color temperature. B: The deflected direction oflow color temperature.

D. Chikane's Method

Chikane's method [6] is based on the concept of pre-processing. This method first applies histogram equalization on the input image to enhance the contrast of the image pixels. Then it determines the reference white points by using pre-defined threshold values. Chikane's method performs well for most images but it degrades when images have a relatively small number of white points.

III. OUR PROPOSED METHOD

In our method, we use a dynamic threshold (as opposed to predefined threshold in previous approaches) to detect white points in an image. Similar to previous approaches, our method consists of two steps: white point detection and white point adjustment. First, the image is converted from to color space. Based on the color characteristics illustrated in Fig. 1, we define a near-white region that consists of the candidate reference white points, as shown in Fig. 2(a). The candidate

RGB

b r

YC C

(3)

reference white points are chosen as follows: First we calculate the mean values Mb and Mr of and , respectively. Then we calculate the average absolute differences and as follows:

Cb

Cr Db Dr

( )

,

( , ) /

b b b

i j

D =

C i jM N (1)

( )

,

( , ) /

r r r

i j

D =

C i jM N (2)

Where and are the chromaticity values of pixel ( , , and N is the number of pixels used in calculation. To enhance the robustness of our method, we partition the image into 12 regions, as shown in Fig. 2(b), and calculate

( , )

C i jb C i jr( , ) i j)

Mb, Mr, , and for each region. If the and values of a region are too small, the region is discarded because it does not have enough color variation. This additional step helps preventing large uniform objects from affecting the result. The final

Db Dr Db Dr

Mb, and Mr, , and are obtained by taking the average of those regions that pass this additional step.

Db Dr

The near-white region is composed of pixels that satisfy the following relationships:

( , ) ( ( )) 1.5

b b b b

C i jM +D ×sign M < ×Db (3)

( , ) (1.5 ( )) 1.5

r r r r

C i j − ×M +D ×sign M < ×Dr (4)

(a) (b) Fig. 2. (a) The near white region of the image in CbCr space. (b) The 12 divisions of an image.

The idea behind these equations is similar to that of the gray world method. That is, the mean values of chromaticity, Mb and Mr, manifest the color deviation of whole image. However, the white color deviate the most in response to different color temperatures, as can be seen from Fig.1. This is why we introduce Db, and Dr in the two equations.

Then, based on the brightness value, the top 10% of the candidate reference white points in near- white region are selected as reference white points. Fig. 3 shows an example result of this process.

Again, the near white region is the collection of ( , ’s whose corresponding pixels satisfy (3) and (4).

r b) C C

(4)

(a) (b)

(c) (d) Fig. 3. Aquarium image. (a) The original image. (b) Non-black pixels in the image correspond to members of the

near-white region in the Cb r space. (c) Non-black pixels in the image represent reference white points. (d) White balanced image generated by our method.

C

After the reference white points are determined, the Von Kries model is used to adjust the image.

The channel gains are derived from the mean values of the reference white points. To maintain the luminance of the whole image at the same level, the maximum luminance value is used in deriving the channel gains. The channel gains Rgain, Ggain, and Bgainare computed by:

max/

gain avew

R =Y R (5)

max/

gain avew

G =Y G (6)

max/

gain avew

B =Y B (7)

where , , and are the mean values of the reference white points for the three channels. is the maximum luminance value of the image pixels. According to the Von Kries diagonal model, the pixel value of each pixel in the image is adjusted by:

Ravew Gavew Bavew Ymax

R′ = ×R Rgain (8)

G′ = ×G Ggain (9)

B′ = ×B Bgain (10)

where R, B, and G are the original values of pixels in the image, and R′, , and G are the adjusted pixel values.

B′

IV. EXPERIMENTAL RESULTS

We tested our method against Chikane’s method, the fuzzy rule method (FRM), the grey world method (GWM), and the perfect reflector method (PRM). A total of 50 test images were captured under five different light sources produced in the lab and under several household light sources. The objective evaluation method described in [6] is used for performance comparison. It is based on the average chromaticity value

(

Cb2+Cr2

)

of the achromatic patches of the ColorChecker.

(5)

The original picture of ColorChecker taken under daylight and the result generated by the five tested methods are shown in Fig. 4. The test results of a natural image are shown in Fig. 5. (All test results are available on http://www2.ee.ntu.edu.tw/~b9901135/awbpaper.htm ).

(a) (b) (c)

(d) (e) (f) Fig. 4. (a) The original image under daylight. (b)-(f) Images generated by our method, Chikane’s method, FRM,

GWM, and PRM, respectively.

(a) (b) (c)

(d) (e) (f) Fig. 5. (a) The original image. (b)-(f) Images generated by our method, Chikane’s method, FRM, GWM, and

PRM, respectively.

The results of objective evaluation are summarized in Table. 1, where a lower score means a better result. The results show that our method performs better than the other methods in most cases. The subjective evaluation shows that the image quality is much improved after applying our method.

The superiority of our method is rooted on the fact that our method uses a dynamic threshold to determine the reference white points. It adapts to the image statistics and hence is able to capture the reference white points better than other techniques that use ad hoc rules.

(6)

Table 1. CHROMATICITY EVALUATIONS

Image Original GMW PRM FRM Chikane’s Ours Daylight1 23.47 1.71 2.06 15.62 1.71 1.05 Coolwhite1 16.57 1.43 1.42 11.50 1.42 1.28 INCA1 20.07 1.05 3.44 14.40 2.08 2.55 TL841 16.35 1.47 1.42 11.66 1.29 1.22 Daylight5 20.29 3.38 6.27 13.39 6.55 4.50 H-7 32.96 14.77 15.35 25.67 4.60 5.84 Horizon5 34.85 3.61 13.90 16.99 5.06 4.60 Horizon1 33.19 0.65 8.66 22.28 0.76 2.14 Coolwhite5 20.21 3.83 6.19 7.44 1.05 1.08 INCA5 20.88 5.48 8.22 13.83 4.23 3.07

V. CONCLUSIONS

A novel automatic white balance method for digital still cameras is described. This method detects reference white points by using the statistical characteristics of images. We have tested the algorithm on 50 images taken under various light sources. Compared to other ad hoc techniques, our method performs better for most cases in the objective evaluation. The subjective test results also show that the algorithm is superior or comparable to other methods. The complexity of the algorithm is quite low, thus it is suitable for real-world implementation.

ACKNOWLEDGMENT

The authors would like to thank Mrs. Varsha Chikane for providing the test images and the chromaticity evaluation software and for offering helpful discussions.

REFERENCES

[1] K. Barnard, V. Cardei, and B. Funt, “A comparison of computational color constancy algorithms - part I:

methodology and experiment with synthesized data,” IEEE Trans. on Image Processing, vol. 11, pp. 985-996, Sept. 2002.

[2] K. Barnard, V. Cardei, and B. Funt, “A comparison of computational color constancy algorithms - part II:

experiments with image data,” IEEE Trans. on Image Processing, vol. 11, pp. 985-996, Sept. 2002.

[3] Y.C. Cheng, W.H. Chen, and Y.Q. Chen, “Automatic white balance for digital still camera,” IEEE Trans.

Consumer Electronics, vol. 41, pp. 460-466, 1995.

[4] K. Barnard, Practical color constancy, PhD thesis, Simon Fraser University, School of Computing, 1999.

[5] G.D. Finlayson, S.D. Hordley, and P.M. Hubel, “Color by correlation: a simple, unifying framework for color constancy,” IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 23, pp. 1209-1221, Nov. 2001.

[6] V. Chikane, and C.S. Fu, “Automatic white balance for digital still camera,” presented in Conference on Computer Vision Graphics and Image Processing, Hualien, Taiwan, Aug. 2004.

[7] R.C. Gonzales, and R.E. Woods, Digital Image Processing, Addison Wesley, Reading, MA, 1992.

[8] D. Forsyth, “A novel algorithm for color constancy,” Int. J. Comput. Vis., vol. 5, pp. 5-36, 1990.

參考文獻

相關文件

The scientists selected three different kinds of light named primary light with specific wavelength as sources to compare with the test lamp.. 5 Different

To compute the scale factor of each color component in an image, in the white balance judging unit we have set the different adjusting mode value to in- dicate different

This paper introduces a dynamic color restora- tion method for real time image systems with digital image sensors. Our method restores image colors by a two-step procedure and it

From a visual comparison, we observe that based on the same demosaicing algorithm, the demosaiced images, which use the zoomed mosaic images created by our proposed zooming algorithm

Using the solution U of Riemann problem to obtain an e approximate solution for the solution U of balance laws..

In addition to the model of black/ white pieces, we further investigate the multiple color cases and its corresponding cycle.. We divide the multiple color case into

To simplify the procedures for timely disbursement of subsidy to eligible drivers and nannies applying for the “School Bus Service Providers Subsidy Scheme” under AEF 6.0, schools

03/2011 receiving certificate of Honorary Chair Professor from National Taiwan University of Science &amp; Technology... 05/2013 receiving certificate of Honorary Chair Professor