Patent ID: 8509544

Claim:
A template matching apparatus comprising: a signal input unit configured to input an input signal; a matching unit configured to (1) obtain similarities between the input signal and a template at different search positions on the input signal, the template being an initial template having a predetermined initial size or a scaled template obtained by expanding or reducing the initial template by a given scaling factor, (2) obtain the similarities on the basis of a distribution of amount of characteristics of the template and a distribution of amount of characteristics in a search window on the input signal at respective search positions, and (3) obtain a highest similarity from among the similarities; a limit value calculating unit configured to calculate an upper limit value of expansion or a lower limit value of reduction of the scaling factor of the template from the highest similarity so that the highest similarity obtained when the template is expanded or reduced does not exceed a threshold value; a scaling unit configured to expand or reduce the template on the basis of the scaling factor within the upper limit value of expansion or the lower limit value of reduction; and a repeat control unit configured to expand and reduce the template, by the scaling unit, until a template having a size included in a given range is achieved and repeat searching on the basis of the expanded or reduced template by the matching unit.