Comparing two very similar images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
paulo

Comparing two very similar images

Post by paulo »

Hi,

I'm trying to get the difference of two very very similar images, but I'm not finding the appropriate commands to do this. I know that I need to use the compare command with -fuzz parameter, but I've tried numerous parameters and none of them help-me. There are 7 minor differences beetween these images and I'm trying to find them. Could someone suggest me any useful parameter to get these differences as clearly as possible? Thanks anyway.

Image Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Comparing two very similar images

Post by fmw42 »

compare erro1l.th.jpg erro2f.th.jpg erro_diff.png

the red areas in erro_diff.png show you where the differences are and they seem extensive probably because you are using jpg images which are compressed slightly differently.

see http://www.imagemagick.org/Usage/compare/#compare

alternately,

convert erro1l.th.jpg erro2f.th.jpg -compose difference -composite -contrast-stretch 0 -threshold 10% erro_diff10pct.png

lower the threshold to see more differences
Post Reply