Automatic white balancing via illuminant scoring
Automatic white balancing and/or autoexposure as useful in a digital camera extracts color channel gains from comparisons of image colors with reference colors under various color temperature illuminants and/or extracts exposure settings from illuminance mean, illuminance variance, illuminance minimum, and illuminance maximum in areas of an image with a trained neural network.
1. A method of white balancing, comprising:
(a) extracting prototype colors from an image;
(b) for a first of said prototype colors comparing said first prototype color with a plurality of reference colors under a plurality of illuminants to select an illuminant;
(c) repeating step (b) for each of said prototype colors extracted in step (a); and
(d) combining the selected illuminants of steps (b)–(c) to determine color gains for said image.
2. The method of claim 1 , wherein:
(a) said prototype colors are in a two-dimensional color space.
3. The method of claim 1 , wherein:
(a) said extracting prototype colors of step (a) of claim 1 includes:
(i) convolving a smoothing kernel with a histogram of the colors of said input image;
(ii) finding local maxima of the results of step (i);
(iii) repeating steps (i) and (ii) with a plurality of smoothing kernels; and
(iv) selecting said prototype colors from the results of steps (i)–(iii).
4. The method of claim 3 , wherein:
(a) said selecting of step (a)(iv) of claim 3 includes evaluating the number of local maxima for said plurality of smoothing kernels.
5. The method of claim 1 , wherein:
(a) said comparing of step (b) of claim 1 includes finding the distances in a sector of color space between said prototype color and each of said reference colors under each of said illuminants.
6. The method of claim 1 , further comprising:
(a) repeating steps (a)–(d) of claim 1 for a second image; and
(b) adjusting said color gains of said step (d) of claim 1 for said image with the results of preceding step (a) for said second image.
7. An image pipeline, comprising:
a white balancer operative to (i) extract prototype colors from an input image, (ii) for each of said prototype colors compare said prototype color with stored reference colors under a plurality of illuminants, (iii) combine the selected illuminants of steps (i)–(ii) to determine color channel gains for said image.