I need matlab code for correlation coefficient.

In Elastic Body Spline Technique for feature point generation and face modeling, I am in need to locate a face from test image(with background).

To locate face only,Correlation coefficient is used for similarity measure between facial template and test image(with background). but I don't know wich one the index i,j in correlation formulae refers ?