Patent ID: 7889245

Claim:
A method for automatic white balancing of a full-color input image, the method comprising the acts of using a processor to: select pixels of the input image according to one or more predetermined criteria; determine global gain values for R and B components of the input image using the selected pixels; determine local gain values for the R and B components of each individual pixel of the input image based on characteristics of each individual pixel; determine a final gain value for the R and B components of each individual pixel of the input image based on contributions of the local and global gain values; and produce a white-balanced output image by adjusting the R and B components of each pixel in the input image using the corresponding final gain value; and wherein producing a white-balanced output image by adjusting the R and B components of each pixel in the input image using the corresponding final gain value comprises producing a white-balanced output image Y made up of pixels y (r,s) =[y (r,s)1 , y (r,s)2 , y (r,s)3 ] T according to the following equations: y (r,s)1 =ƒ( x (r,s)1 ,λg ( x (r,s)2 ,x (r,s)1 )+(1−λ) g ( x 2 , x 1 )); y (r,s)2 =x (r,s)2 ; and y (r,s)3 =ƒ( x (r,s)3 ,λg ( x (r,s)2 ,x (r,s)3 )+(1−λ) g ( x 3 , x 1 )); where: ƒ(•) denotes an adjustment operation and g(•) denotes a gain formulation: x _ k = ( ∑ r = 1 K 1 ⁢ ∑ s = 1 K 2 ⁢ ( x ( r , s ) ⁢ k ⁢ Φ ( r , s ) ) ) / ∑ r = 1 K 1 ⁢ ∑ s = 1 K 2 ⁢ Φ ( r , s ) or x _ k = 1 K 1 ⁢ K 2 ⁢ ∑ r = 1 K 1 ⁢ ∑ s = 1 K 2 ⁢ x ( r , s ) ⁢ k , for ⁢ ⁢ k = 1 , 2 , 3 ; x (r,s) =[x (r,s)1 ,x (r,s)2 ,x (r,s)3 ] T with components x (r,s)k is a pixel of the input image X; x =[ x 1 , x 2 , x 3 ] T with components x k is the global reference vector; K 1 is the number of rows in the input image X; K 2 is the number of columns in the input image X; r=1, 2, . . . , K 1 and s=1, 2, . . . , K 2 ; k=1, 2, 3 correspond to the R, G, and B components of a pixel, respectively; η is the threshold; Φ (r,s) =1 if all x (r,s)k ≧η for k=1, 2, 3; and Φ (r,s) =0 if any x (r,s)k <η for k=1, 2, 3.