1. A non-transitory computer program product that stores a program executed by a computer for tracking the movement of a photographic subject over an image consisting of a plurality of frames inputted in time series, the program comprising: a template matching instruction for performing template matching upon each frame of an input image with each of a plurality of template images and extracting a plurality of regions whose similarities with each of the template images are the highest from within the input image; a classification instruction for classifying the extracted regions into regions that are to be used for specifying a photographic subject position within the input image and another region, on the basis of the mutual distances between the extracted regions within the input image; a specification instruction for specifying the photographic subject position, on the basis of the positions of the regions that have been classified by the classification instruction as the regions that are to be used for specifying the photographic subject position within the input image; and a photographic subject tracking instruction for tracking the movement of the photographic subject over the image consisting of a plurality of frames, by tracking the photographic subject position between frames.