A method for determining a correction for a spectra of scene illumination
based on analysis of color content of a video image, in which average
image colors are obtained by considering only those image pixels that
have significantly different color from any of its neighboring pixels
resulting in selection of only those pixels that lay on the boundaries of
monochrome image segments, while avoiding their inner areas. Therefore,
the white balance method is not only tolerant to the presence of large
non-gray monochrome areas in the image, but also avoids the image areas
that have small chrominance values and appear to be gray due to specific
illumination spectra, while not actually corresponding to the grey areas
of the scene.