Patent ID: 7418135

Claim:
An image processing apparatus which decides a comparison position for performing similarity comparison between a comparison source image and a comparison destination image, comprising: designation means for designating a block division count representing a division count for dividing an image; dividing means for dividing each of the comparison source image and the comparison destination image into a plurality of blocks by the block division count designated by said designation means; feature amount calculation means for calculating feature amounts of the comparison source image and the comparison destination image for each block divided by said dividing means; storing means for storing a plurality of types of position shifting patterns for shifting comparison positions of the comparison source image and the comparison destination image; similarity distance calculation means for calculating, on the basis of feature amounts of corresponding blocks in the comparison source image and the comparison destination image, a similarity distance between the comparison source image and the comparison destination image after the comparison positions are shifted by using the plurality of types of position shifting patterns; position correction amount calculation means for calculating a position correction amount for correcting the comparison positions of the comparison source image and the comparison destination image that are used in performing next similarity comparison, on the basis of a size of the block and a position shifting pattern corresponding to a smallest similarity distance among similarity distances calculated by said similarity distance calculation means; correction means for correcting the comparison positions of the comparison source image and the comparison destination image by the position correction amount; executing means for, every time the position correction amount is calculated by said position correction amount calculation means, incrementing the block division count designated by said designation means, and recursively executing said means from said dividing means to said correction means; determination means for determining whether to end recursive processing; and finalizing means for, when the recursive processing is to be ended on the basis of a determination result by said determination means, finalizing a comparison position at that time as final comparison positions of the comparison source image and the comparison destination image.