1. A template matching processing apparatus comprising: a first calculating device for calculating a plurality of correlation values, each of which indicates a correlation between an inputted detection image and a predetermined template image, by a pixel unit while shifting the template image by the pixel unit with respect to the detection image; and a second calculating device for subtracting a predetermined reference value from each of the plurality of correlation values and then calculating a coordinate position of the detection image on the basis of a coordinate position of a center of gravity of the plurality of correlation values from each of which the reference value is subtracted.