An image processing method for detecting an object from an input image
using a template image, including inputting a specified image with
respect to both a template image and an input image, calculating an edge
normal direction vector of said specified image, generating an evaluation
vector from said edge normal direction vector, subjecting the evaluation
vector to orthogonal transformation, a step of performing a product sum
calculation of corresponding spectral data with respect to each
evaluation vector that has been subjected to orthogonal transformation
and has been obtained for each of said template image and said input
image, and a step of subjecting it to inverse orthogonal transformation
and generating a similarity value map. The formula of the similarity
value, the orthogonal transformation, and the inverse orthogonal
transformation each have linearity. The pattern recognition is one in
which the component of the similarity value is not subjected to
positive/negative reversal through variations in brightness of the
background.