Image Processing – Image Similarity Comparison

algorithmimage-processingimage-recognition

I originally asked this question on cstheory.stackexchange.com but was suggested to move it to stats.stackexchange.com.

Is there an existing algorithm that returns to me a similarity metric between two bitmap images? By "similar", I mean a human would say these two images were altered from the same photograph. For example, the algorithm should say the following 3 images are the same (original, position shifted, shrunken).

Same

enter image description here enter image description here enter image description here

I don't need to detect warped or flipped images. I also don't need to detect if it's the same object in different orientations.

Different

enter image description here enter image description here

I would like to use this algorithm to prevent spam on my website. I noticed that the spammers are too lazy to change their spam images. It's not limited to faces. I already know there's already many great facial recognition algorithms out there. The spam image could be anything from a URL to a soccer field to a naked body.

Best Answer

There is a discussion of image similarity algorithms at stack overflow. Since you don't need to detect warped or flipped images, the histogram approach may be sufficient providing the image crop isn't too severe.

Related Question