Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Matching Binary Files

by Zero_Flop (Pilgrim)
on Jan 10, 2004 at 22:29 UTC ( [id://320390]=note: print w/replies, xml ) Need Help??


in reply to Matching Binary Files

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://320390]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found