How to Compare the Difference Between Two Identical Looking Images

Posted By Raymond In Category: Computer

Oct
15
2009
Donate

Have you ever had 2 images that looked exactly the same with your naked eye but the file size is different? Well I had such experience and even after zooming up to 400% and the pixels still looked the same. I am no image expert and I don’t know how JPG, PNG, GIF or any other image format works but if the size is different, logically something is missing or added in there. It’s just that we can’t see it with our eyes and again have to depend on technology to detect the difference. Here’s an example. Try comparing this first JPG image with the second JPG image.

This picture is taken with a 5MP Canon PowerShot S50 camera and is scaled to 2592 x 1944 pixels. The second image is after re-saving which causes some information loss in the JPEG image. Most probably you won’t even notice any difference. I’ve found some software such as Image Comparer that cost money to find exact or close matches by actual photo content but I personally prefer to use this free method with ImageMagick.


ImageMagick is a free software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. ImageMagick can translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. The functionality of ImageMagick is typically utilized from the command line so be ready to type commands.

There is a tool called compare.exe in ImageMagick that I will be using it to compare the two images for difference.

1. Download ImageMagick. I prefer to use the portable version ImageMagick-6.5.6-Q16-windows.zip so I don’t need to install.

2. Extract the ZIP file and you should see a compare.exe file in the archive.

3. The most basic command to use ImageMagick’s compare.exe is:

compare.exe image1.jpg image2.jpg difference.jpg

4. After a few seconds when ImageMagick’s compare.exe has finished comparing the images, you should get a new file called difference.jpg. Open that file and it’ll tell you what has changed.
ImageMagick compare difference

You can learn about more advance usages of ImageMagick’s compare program from the official website.


Related posts:
  • How To Enlarge Images Without Loosing Quality or Pixelated
  • Scan and Convert Images to Text with FREE OCR, Optical Character Recognition
  • How to Burn images on a CD/DVD
  • Repair and Fix Corrupted Images
  • 4 Free Tools to Optimize and Compress PNG Images Without Losing Quality
    • William Gunn

      Welcome back to the internet raymond, i hope you had a great honemoon

    • http://i-pays.blogspot.com vTechTip

      Interesting, thanks Raymond!

    • Raju

      welcome back Raymond

    • Ahmad Saleem

      Thanks Ray………………..

    • jazz365

      hi raymond welcome back!!!
      I have one query pls tell the soln to it.
      I am unable to install norton 2010 on my pc the error “install file cannot be properly validated”is coming when i extracts the setup file.
      pls help me.

    • Sp

      WOW, THANKS !!! Great app if it works what it says!

    • http://www.newpridegrafix.com/gfx Lateralus

      Well, I guess this can be useful to some people. Any graphics program can do the difference overlay mode and there are many ways to easily tell this difference with different overlay blending modes. The best free program for this is GIMP, which I have, alhtough I use CS4 mostly. Not sure what the problem with installing is though, even the cheapest computers now have massive amounts of hard drive space, RAM and processing power so people really don’t have to worry about that anymore and portable, non-registered applications fragment your drive unnecessarily.

    • JF

      Thanx Raymond… You are on track now… let the IT information flow as like before…

    • http://kenchoi.co.cc Ken

      Welcome back ray

    • http://www.newpridegrafix.com/gfx Lateralus

      Sorry if that last message sounded rude, I forget sometimes that not everyone is a graphic designer and I am sure it can be used in many situations.

    • Kamal Mehta…

      Thx raymond… for coming Back ==
      i eagrely waiting for ur posts,,,,

    • http://www.zoombits.fr Accessoire Mobile Phone

      Hi Raymond. You always gives good ideas.
      Thanks for this new one. It is nice to visit this site. I like to post here.

    • Tuan Long-Viet Nam

      wow
      thank RayMond

    • http://www.ficforlife.com Hok

      Some other way if you have Photoshop is using blend mode of difference or exclusion. If the result still quite the same than try to change the level.

    • Ed

      @Lateralus

      [quote]
      and portable, non-registered applications fragment your drive unnecessarily.[/quote]

      Where did you see such information? Makes no sense to me.

    • http://www.visualexif.com/blog ms

      interesting article, ray…

    • http://www.ambienteslimpios.com Erick Segura

      Welcome back, Raymond!

    • safeguy

      I am no image expert myself but this tool seems handy. I don’t need this now but it’s useful info nevertheless. The two pics really didn’t seem any different. If you hadn’t tell, I wouldn’t have guessed.

    • steve

      welcome back raymond!!!!!

    • J. Buchanan

      Welcome back. I hope everything went so well that you will want to remember it for a life time. I say this as 2 types of people. One who trulty hopes you did enjoy it. The other as a married man. As a married man I’ll give you a little advice. Remember !! What do I mean by that?
      Remember:
      1 – Where you first met.
      2 – When and where you first kissed
      3 – Where you first held her hand
      4 – Where you first took her out to supper
      5 – Any “first”s should be remembered because they “will” remember.
      6 – Your most enjoyable times (with her, of course and I don’t mean “contact” wise)
      7 – Your anniversary – For Heaven’s sake – DON’T forget that. Major major problems can result
      8 – Tell her often how you feel about her {the good times, that is :)}
      ——– Just REMEMBER ——– Life will be so much easier
      Enjoy life and enjoy each other

    • http://kenjiria.blogspot.com Leonardo Kenji

      Hi

      interesting post

      but I still depend on some human judgement to check if it´s the same image or not

      one thing I´d like is a way to automatically compare and say something like “this is 99% similar to each other” for example, or combine several intelligent ways to compare and try to guess if it´s the same image in different resolutions or if they´re completely different imagens

      notice that face recognition brings quite the same problem ;-) so maybe what you are looking for is up there

    • findmehere.genius

      Nice,
      Its all this thing that makes me more attracted towards Digiworld……Thanks Ray

    • minhas

      Hi Raymond. You always gives good ideas.
      Thanks for this new one. It is nice to visit this site. I like your post
      .

    • Pravin Loke

      This is really very good utility………

    • amon

      Nice to see that you are back again on the line. Being an IT student, I see your site as second to my instructors.
      I check it everyday to read those nice and fresh articles.

      May God increase your knowledge so that you teach us.

    • Michael

      This is a pretty handy app, but i could tell the difference between the two pics, the second one has alot more detail that had been combined in the first.

    • ritchi

      The king is back!!!!

    • David

      Welcome back Raymond!

    • Walter

      Welcome Back dude!!

    • norman

      this application is very interesting.let me try this one.thank u very much ray.welcome back

    • Alessandro

      hi!
      but to make a comparison with different resolutions, I must not use the command compare?
      I want to compare two pictures with different resolution
      I think that the command works only with the quality of compression

    • Alessandro

      … I await your response

    • rasputin

      The portable version is unavailable. Could you please upload it to say, Rapidshare? Thanks.

    • Alto

      Thanx Raymond

    • SLA

      Thank you! :)
      I couldn’t find ANY image differencing software for windows. You helped me :)

      “Image Defferencing” is something so unknown, so unpopular, that even Wikipedia’s article is VERY SHORT:
      http://en.wikipedia.org/wiki/Image_differencing

    • SLA

      Lateralus, thank you too!

    Copyright © 2005-2012 - Raymond.CC Blog