An apparatus for calculating a normalized correlation coefficient used as
a similarity evaluation measure by using image data values of pixels in a
template image and image data values of pixels in a subimage, included in
a search image, corresponding to the template image, has a memory that
stores image data values of pixels in the search image and calculating
means that calculate a sum of image data values of pixels in the template
image and a sum of image data values of pixels in the first rectangular
region in the search image or a sum of squares of image data values of
pixels in the template image and a sum of squares of image data values of
pixels in the first rectangular region in the search image. Normalized
correlation coefficient calculating means calculate a normalized
correlation coefficient on the basis of the sum of image data values of
pixels in the template image and the sum of image data values of pixels
in the first rectangular region in the search image, or the sum of
squares of image data values of pixels in the template image and the sum
of squares of image data values of pixels in the first rectangular region
in the search image.