This disclosure describes image processing techniques that facilitate the
determination of the lighting condition associated with an image. Once
the lighting condition is determined, white balance can be performed on
the image such as by applying white balance gains defined for the
lighting condition. According to the techniques of this disclosure, gray
point lines are defined and plotted for the different lighting
conditions, and cylindrical bounding volumes are defined around the gray
point lines, e.g., in a three-dimensional color space. The image is then
analyzed with respect to each of the cylindrical bounding volumes to
determine how many pixels of the image fall within the respective
cylindrical bounding volumes formed around the gray point lines for the
different lighting conditions. Based on this analysis, the actual
lighting condition can be determined. The use of cylindrical bounding
volumes can significantly improve the process of determining lighting
conditions relative to conventional techniques.