Abstract: This thesis is devoted to automatic location of landmarks (mouth and eyes) in images of faces using templates. There is an unsatisfactory experience with existing software because of its high sensitivity to small rotations of the face. The weighted correlation coeficient as a similarity measure between the template and the image turns out to outperform the classical correlation. It is presented how to choose the weights to increase the discrimination of the parts of the face which correspond to the template from those which do not. Optimization without constraints tends to degenerate and to obtain a robust version we bound the in uence of single pixels. In a similar way the template can be optimized to improve the discrimination further. The results are compared for different initial choices of weights and their robustness to different size or rotation of the face is examined. The method does not use any special properties of the mouth or eyes and can be classified as a robust nonparametric disrimination technique.