Welcome to WebmasterWorld Guest from 54.198.118.102

Forum Moderators: bakedjake

Message Too Old, No Replies

Compare two images

Bash solution needed

     
3:52 pm on Jan 10, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 11, 2002
posts:2024
votes: 0


In order to program a watchdog-timer for a perpetual screenshot, I need to compare the image content from the command line. Even with identical content, diff and cmp report that two consecutive files are different. So I need to look at the image content itself, best with some fuzzyness.

Any suggestions?

5:47 pm on Jan 10, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 6, 2006
posts:63
votes: 0



When I use "md5sum" on binaries, it works pretty well in distinguishing two files...

except on java .class files. I found that even when the code changed, sometimes the compiled .class file was the same as before.

george

8:37 am on Jan 11, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 11, 2002
posts:2024
votes: 0


Yes, I tried that too, but since the images DO differ on a binary basis (though not by visual inspection) md5sum gives of course different hashes.

I found a tool called jpegdiff which can get a "fuzziness parameter". Maybe this works.