1. A pattern matching method of detecting an image of a detection target from a search image obtained by imaging the detection target by performing pattern matching between the search edge image and a model edge image concerning the detection target, comprising: obtaining a reference image of the detection target; generating the model edge image on a basis of the reference image; generating the edge extraction domain that is specified as a portion where the model edge image can exist by overlying a plurality of the model edge images obtained with at least one of (i) a rotation process of rotating the model edge image within a predetermined range around a rotation center of the model edge image, (ii) an enlargement/reduction process of enlarging/reducing the model edge image within a predetermined range around the rotation center, and (iii) a translation process of translating the model edge image within a predetermined range; and performing pattern matching between the model edge image and the search edge image generated by performing edge extraction process for the edge extraction domain in the search image; a first step of rotating the model edge image on the search edge image by a given angle or enlarging/reducing the model edge image on the search edge image by a given enlargement/reduction ratio, and calculating a similarity between the model edge image and the search edge image based on edge directions of the model edge image and the search edge image; a second step of moving a center of the model edge image on the search image by a given pixel, and calculating a similarity between the model edge image and the search edge image based on the edge directions of the model edge image and the search edge image; repeating the first and second steps; and outputting a position and rotation angle or enlargement/reduction ratio in the search edge image of the model edge image having a highest similarity as pattern matching results.