PHash - open source perceptual hash library. image/video fingerprints
phash.org
phash.org
However, if the images have different cropping, slight rotation or different brightness/contrast setting pHash didn't seem to work well enough. I got better results with http://www.imgseek.net/ for my image set.
An overview of some StackOverflow questions: http://stackoverflow.com/questions/4196453/simple-and-fast-m...