An image processing apparatus configured to search a similar area to a previously registered model from an input image, the model being defined by a plurality of first positions on an edge extracted from a model image and a tangential direction of the edge in each of the first positions, the image processing apparatus comprising: a first calculator configured to calculate a tangential direction of an edge in a second position of the input image corresponding to the first position of the model image; an acceptor configured to accept an instruction associated with one of a plurality of deformation permission levels of the tangential direction of the edge; a second calculator configured to calculate a similarity degree of the two edges in the first position and the second position corresponding to the first position of the model image based on the accepted instruction, the tangential direction of the edge in the first position and the tangential direction of the edge in the second position; and a first determining unit configured to determine whether a specific area in the input image is similar to the model or not based on the calculated similarity degrees of the two edges in the first and the second positions, wherein the acceptor is configured to accept, as the instruction, an instruction for designating any one of a plurality of data sets associating information representing a difference between tangential directions of two edges with a similarity degree of the two edges and the deformation permission level, and the second calculator is configured to calculate the similarity degree of the two edges in the first position and the second position corresponding to the first position of the model image based on the designated data sets and a calculated angular difference between the two edges. a first calculator configured to calculate a tangential direction of an edge in a second position of the input image corresponding to the first position of the model image; an acceptor configured to accept an instruction associated with one of a plurality of deformation permission levels of the tangential direction of the edge; a second calculator configured to calculate a similarity degree of the two edges in the first position and the second position corresponding to the first position of the model image based on the accepted instruction, the tangential direction of the edge in the first position and the tangential direction of the edge in the second position; and a first determining unit configured to determine whether a specific area in the input image is similar to the model or not based on the calculated similarity degrees of the two edges in the first and the second positions, wherein the acceptor is configured to accept, as the instruction, an instruction for designating any one of a plurality of data sets associating information representing a difference between tangential directions of two edges with a similarity degree of the two edges and the deformation permission level, and the second calculator is configured to calculate the similarity degree of the two edges in the first position and the second position corresponding to the first position of the model image based on the designated data sets and a calculated angular difference between the two edges.