1. An image processing method comprising: searching for areas matching each other between a plurality of input images, the plurality of input images comprising a reference image and a target image; generating hierarchical image structures formed of a plurality of hierarchical images having different resolutions for the matching areas between the plurality of input images; repeatedly performing image processing based on a similarity of values of pixels matching each other in the plurality of hierarchical images of the same level by using the hierarchical image structures generated for the matching areas; and generating, using at least one processor, an output image by using pixel values according to the repeated image processing.