Normalized correlation


Color Space Go back to the indexAutomatic size recognition

The key component of the face detection is the normalized correlation between the photo and each of the components color components of each of the face templates.

For this operation the Matlab function normxcorr() from the image processing toolbox has been used. The result of this function is 1 where the correlation is maximal and -1 when it is minimal. The correlations of the 3 color components are added. Note that, for example, if an area in the photo is similar in one of the color components but different in the others, it will receive a low value, as the negative values from the different components will compensate the high value from the similar one. Therefore, all three components have to be similar to obtain a high value, as desired.

The combined correlations coming from all templates are added, giving high values in those places where a face is present. As example, the following two images show a photo and the result of adding the correlation with all color components of all images. Note the high value in the position of the face.

Color Space Go back to the indexAutomatic size recognition