1. An image processing apparatus detecting a plurality of joint positions between a plurality of input images, comprising: a target image generation unit configured to generate a plurality of target images to be searched in a second input image among the input images from a first input image among the input images; a characteristic amount calculation unit configured to calculate a characteristic amount for each of the target images generated by the target image generation unit; and a matching calculation unit configured to calculate a matching between the target image of interest among the target images having the characteristic amounts calculated by the characteristic amount calculation unit, and a part of the second input image, using an evaluation method depending on the characteristic amounts calculated by the characteristic amount calculation unit.