1. A camera, comprising: an imaging unit that captures an image of a subject and obtains image data; a similarity level calculation unit that calculates a similarity level indicating a level of similarity of an image within a search frame to a template image in correspondence to each search frame position assumed as the search frame is shifted within a search target area set in each of frames input in time series from the imaging unit; a subject position determining unit that determines as a subject position a position assumed by the search frame, at which the similarity level calculated by the similarity level calculation unit is highest, in correspondence to each frame; a subject tracking unit that tracks the subject position determined by the subject position determining unit from frame to frame; and a rangefinding unit that measures a distance (subject distance) from the camera to the subject present in each of the frames input in time series, wherein: the similarity level calculation unit calculates the similarity level for each of the frames input in time series by factoring in rangefinding results provided by the rangefinding unit.