Four descriptor templates are passed over the image to acquire the normalisation parameters. The templates are produced by averaging descriptors for a small number of training images.
Manual eye location is used to normalise thirty faces. The eyes of a normalised image are set in fixed positions 120 pixels apart. Using a first derivative operator two further images are derived, one recording the magnitude of the gradient vector and the other the orientation of the gradient vector.
To reduce computation the images are reduced by 0.25 so that the eyes are 30 pixels apart. The templates are based on a square area of 60x60 pixels. The mid-point between the eyes is 20 pixels from the top of the template and 30 pixels from the sides. Essentially the templates cover the internal face features.
For each descriptor an average template is constructed from 30 normalised learning images. These are the first training images for each person from the University of Manchester database .
Templates are prepared from four image descriptors:
Ranking is based on a local grey-level comparison and is a variation on such schemes as the median filter .
A circular operator is passed over the image which ranks each pixel according to the grey-level spectrum of its neighbourhood. The rank of the pixel at the centre of the operator is found by comparing its intensity to the other pixels within the operator. Let be the number of pixels whose intensity is less than that of the central pixel, and be the number of pixels whose intensity is more than the central pixel. The rank of the central pixel is given by:
The diameter of the operator used is approximately equal to the eye width.
Local ranking is applied using the procedure above.
The 60x60 images are smoothed and sub-sampled to produce 15x15 images. Thus 15x15 templates are produced.
The two templates produced using local ranking are globally ranked, to improve template contrast, according to the following procedure:
The values of the 225 pixels of the image are sorted in ascending order. Each pixel is then assigned a value between 1 and 225 according to the position of its original value in the sorted list.
For comparison with ranked gradient magnitudes a fifth template is prepared based simply on the gradient magnitude. This template is not used in combination with the other templates.
A face is normalised by finding four parameters:
The face image is subject to the processing used for template preparation. In addition the image is transformed using a number of combinations of rotation and magnification.
The parameters are found by template matching using the least sum of squares. Matches are found for locations within images rotated by and magnified by m.
If the templates are used in combination, values are normalised to give each template equal weight. This is achieved by finding the minimum and maximum matches for a particular template for all combinations of x, y, and m. These values are then used to normalise all the matches for this template. Finally the normalised values for each of the four templates are added for each combination of x, y, and m.
If the best match is found at a location for an image rotated by and magnified by m, the parameters are given by .