1. An image processing apparatus for determining a similarity between first image data and second image data conprising: an edge direction unit for determining an edge direction at each pixel of said first image data and an edge direction at each pixel of said second image data; an edge magnitude unit for determining an edge magnitude at each pixel of one of said images; and a similarity unit for determining a similarity between said first and second images by reducing a background contrast by using the edge directions and magnitudes for each pixel of said one image and edge directions for each pixel of the other of said images.