Is applied to a window of the image.
The window is then passed through a neural network, which decides whether the window contains a face.
The preprocessing first attempts to equalize the intensity values across the window.
We fit a function which varies linearly across the window to the intensity values in an oval region inside the window.
Pixels outside the oval (shown in Fig. 2a) may represent the background, so those intensity values are ignored in computing the lighting variance across the face.
The linear function will approximate the overall brightness of each part of the window, and can be subtracted from the window to compensate for a variety of lighting conditions.
Then histogram equalization is performed, which non-linearly maps the intensity values to expand the range of intensities in the window. The histogram is computed for pixels inside an oval region in the window.
This compensates for differences in camera input gains, as well as improving contrast in some cases.