1. An image processing method, the method comprising: a first process of generating a first pyramid by hierarchizing a plurality of template images having different resolutions from each other in an order of resolution; a second process of generating a second pyramid by hierarchizing a plurality of search target images having different resolutions from each other corresponding to the same resolutions of the template images in the first pyramid in the order of resolution; and a search process of performing search processing for searching for a feature image included in each of the template images in the first pyramid from the corresponding search target image of the same resolution in the second pyramid, wherein the first process includes setting a number of stages of the first pyramid in a manner that a size of the feature image included in each of the template images in the first pyramid is not smaller than a previously set threshold, wherein the first process includes generating a plurality of template image candidates having different resolutions from each other and setting a template image candidate of the plurality of template image candidates including a feature image having a size larger than or equal to the threshold as a template image constituting the first pyramid, wherein the feature image included in the template image candidate includes a contour set constituted by one or more contours extracted from an original reference image, and wherein the size of the feature image included in the template image candidate is a size of the contour set.