One way to do this is with Fourier Transform. By comparing the magnitude
and phase of the transform you can determine if one image is the same as
another only under some type of transform such as scale rotation, or translation.
Here are some sites that may be useful:
http://www.dai.ed.ac.uk/HIPR2/fourier.htm
http://www.mathworks.com/access/helpdesk/help/toolbox/images/transfo5.shtml
http://www.cs.unm.edu/~brayer/vision/fourier.html
Google for:
Fourier-Based Image Registration Techniques &
Fourier-Mellin Transforms for Image Registration
I worked a little on this with Matlab, and I think there is a perl -FFT module.
It is popular in research because it has possibilities with image watermarking
as well as image
recognition for robots and the like.
I have collected a volume of examples when I was working on it, If you think
you are interested let me know
and I can try to pull that stuff out and send it. It's far too much to post.
Another thing you could to is simply take one image and subtract the other.
This would probably be the easiest. I know Jimage can do this and I am sure
there are alot of others. (or write one in perl ;) ) basically subtract
pixel for pixel and take the absolutes value of the result. The resultant
image should be white were the images match and colored were the images do
not. Depending on how accurate you want to be, if you write it in perl, then
you can count the non zero points.
If you come up with anything I would love to see it.
ZeroFlop