Patent ID: 8131014

Claim:
A non-transitory computer-readable storage medium that stores a computer-executable program for tracking motion of an object between images of a plurality of frames that are input in chronological order, the program comprising instructions for: template matching, wherein template matching of each frame of an input image to a plurality of template images is performed, a template image having a highest similarity with an image within a predetermined region of the input image is selected as a selected template among the plurality of template images and the predetermined region of the input image is extracted as a matched region; object-tracking, wherein, with reference to an image within the matched region that is extracted in the step of template-matching, by tracking motion between frames, motion of an object is tracked between the images of the plurality of frames; determining as to whether or not a result of matching in the step of template-matching satisfies an update condition for updating the plurality of template images; and updating, in a case that the update condition is determined to be satisfied in the step of determining, at least one of the plurality of template images; wherein: the plurality of template images comprises a current selected template image that was selected as the selected template image when the plurality of template images were updated in the step of updating, a former selected template image that had been designated as the current selected template image until the plurality of template were updated in the step of updating, and a new template image which is an image within the matched region at a time that the plurality of template images were updated in the step of updating, and in the step of determining, it is determined as the update condition that one of the former selected template image and the new template image is consecutively selected a predetermined number of times or more as the selected template image.