1. A digital image processing apparatus having a tracking function for tracking a location variation of a set tracking area on a plurality of frame images, the apparatus comprising: a processor comprising a similarity calculation unit having a frame image input, a template input, and a similarity output, the similarity calculation unit configured to calculate the similarity output by: (a) varying a location of a template on one frame image, wherein the similarity calculation unit (i) calculates a second direction similarity by holding a first direction location of the template constant in a first direction on the one frame image and varying a second direction location of the template in a second direction on the one frame image, the second direction being perpendicular to the first direction, and (ii) then calculates a first direction similarity by holding the second direction location of the template constant at a location where the second direction similarity is the highest and varying the first direction location of the template in the first direction on the one frame image; and (b) outputting the first direction similarity and the second direction similarity via the similarity output.