# Is there software that compares pictures?

**URL:** <https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292>\
**Category:** Factual Questions\
**Created:** [February 22, 2005, 4:03am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292 "2005-02-22T04:03:44Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.Blue\_Sky](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@Mr.Blue\_Sky](https://boards.straightdope.com/u/Mr.Blue_Sky)\
**Post date:** [February 22, 2005, 4:03am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/1 "2005-02-22T04:03:44Z")

</div>

Let’s say you like pictures of cats. You collect them from all over the web (free, of course). You’ve lost track of the pictures you already have.

You find a new picture, but you think you may already have it, but you don’t want to go searching through hundreds of pictures to see.

Is there software that could do this? You show the picture to the software and it searches the specified directory for it’s match.

Is this possible or is it Hollywood fantasy?

---

<div class="post-metadata">

**Author:** ![iamthewalrus\_3](https://avatars.discourse-cdn.com/v4/letter/i/258eb7/32.png) [@iamthewalrus\_3](https://boards.straightdope.com/u/iamthewalrus_3)\
**Post date:** [February 22, 2005, 4:07am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/2 "2005-02-22T04:07:06Z")

</div>

Well, iPhoto does that automatically when you add pictures. But I imagine you’re on Windows. I’d guess that most photobook applications will do this, considering how easy it would be to implement.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 22, 2005, 7:25am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/3 "2005-02-22T07:25:20Z")

</div>

To clarify: Are you looking for identical files, or equivalent pictures? The former is not too hard, but the latter is an AI problem. Suppose, for instance, someone puts up the same picture, but with a small logo in the corner identifying the website. Are you considering that the same picture? Or if they crop or resize the picture?

Of course, one might also point out that if you have so many pictures that you’ve lost track of which ones you have, does it really matter if you already have a particular picture? By that point, you’re unlikely to go through your entire collection viewing all of them.

---

<div class="post-metadata">

**Author:** ![rainy](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rainy](https://boards.straightdope.com/u/rainy)\
**Post date:** [February 22, 2005, 3:42pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/4 "2005-02-22T15:42:41Z")

</div>

Lots of pictures of…“cats”…downloaded from the Internet. Right.

---

<div class="post-metadata">

**Author:** ![Dead\_Badger](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@Dead\_Badger](https://boards.straightdope.com/u/Dead_Badger)\
**Post date:** [February 22, 2005, 4:38pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/5 "2005-02-22T16:38:29Z")

</div>

> [@Chronos](#):
>
> To clarify: Are you looking for identical files, or equivalent pictures? The former is not too hard, but the latter is an AI problem.

It’s certainly more difficult than checking for identical files, but I’m not sure I’d call it an AI problem. Checking for image correlation is a pretty simple mathematical function, and a simple threshold would account for lossy recompression, digital tags and wotnot. You could probably make it amazingly quick, too, if you used some sort of fourier analysis technique, and just generate a unique ID for each picture.

As for existing programs that do this, at the moment I can only find [ImageMagick](http://www.imagemagick.org/www/compare.html), which has a command-line tool that computes a kind of difference function on two images and spits out a third image showing where the originals match. Not really what you want. I’ll have a proper look around, since this seems like such a trivial thing to do that I’d be very surprised if there’s nothing that does it.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 22, 2005, 7:08pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/6 "2005-02-22T19:08:12Z")

</div>

It’s not too hard to generate a correlation function between images of the same size and field, and that could probably work well enough for differing corner logos or watermarks. But now suppose that two images are cropped differently: In order to get the appropriate corellation function, you’ve got to overlap them correctly, and even if you do that, it’s ambiguous whether you want to consider those the same image or not (they might be two different close-ups of a large scene, focusing on two different cats, or they might be one cat with different amounts of background). One of the images might be resized, or even resized and cropped. You might have things like captures from adjacent frames of a movie, or shots at the same time from two different cameras next to each other, which are probably going to be close enough that a human wouldn’t want copies of both, but which might not look the same to the computer. And even if you do determine that two pictures are functionally the same (though not identical), how do you decide which one to keep?

---

<div class="post-metadata">

**Author:** ![Mr.Blue\_Sky](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@Mr.Blue\_Sky](https://boards.straightdope.com/u/Mr.Blue_Sky)\
**Post date:** [February 22, 2005, 11:51pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/7 "2005-02-22T23:51:17Z")

</div>

I didn’t think it would be easy. I was just curious if it could be done.

Thanks for the input.

---

<div class="post-metadata">

**Author:** ![Stana\_Claus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/stana_claus/32/13874_2.png) [@Stana\_Claus](https://boards.straightdope.com/u/Stana_Claus)\
**Post date:** [February 22, 2005, 11:58pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/8 "2005-02-22T23:58:12Z")

</div>

I’ve been using Duplicate Image Finder from Running Man Software ([http://www.rmsft.com](http://www.rmsft.com)) for a while now, and it works very well. It will find matches of different file sizes, resolutions, similar but not exact duplicates, etc. It also keeps a database of analyzed images for future comparisons. You can also specify multiple paths to have it search for duplicates. All in all, it’s really a pretty full featured program. You can download a 14-day trial version and if you like it you can buy the registration key for $29.

SC

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [February 24, 2005, 9:36pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/9 "2005-02-24T21:36:27Z")

</div>

There’s also [imgSeek](http://imgseek.python-hosting.com/), which is available free for Windows and Linux. It’s still in beta, but it works quite well. You can search either by comparing to a file, or by drawing a sketch of the image you’re looking for on screen (the former works better than the latter, it has to be said).

---

<div class="post-metadata">

**Author:** ![rackensack](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@rackensack](https://boards.straightdope.com/u/rackensack)\
**Post date:** [February 25, 2005, 1:53am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/10 "2005-02-25T01:53:24Z")

</div>

Of course, if you have a spare $100K lying around, you could buy MediaBin, full-blown enterprise Digital Asset Management system that includes among its many features one called Content-Based Image Recognition (CBIR), a patented technology that allows you to select an image and find the other images in the database that are most visually similar to it. This is done by building a set of mathematical descriptors of the visual content along different axes (distribution of color, orientation of edge detail, etc.) for each image as it’s added to the database and then comparing that to the other images when such a search is performed. It’s based on work originally done for the DOD on target recognition.

I’d include the standard disclaimer about having no connection to the product, except that I’m a employee of the company that produces MediaBin, and spend most of my time traveling around the country implementing the product at major corporations.

Doing this sort of thing is conceptually fairly easy, but the quality of the results is obviously highly dependent on the quality of the algorithms that build the descriptors – ours are the result of a dozen or more years of work by several math Ph.D.s and image scientists.

If you have Photoshop, you can use the “Calculations…” item in the “Image” menu to compare two images: open both, select “Calculations…”, select one image as “Source 1” and the other as “Source 2”, select the gray channel for each, select “Difference” in the “Blending” section, and specify “New Document” in the “Result” section. You’ll get a new file that will be black wherever the two images are the same, and varying shades of gray where they’re different. If the images are different sizes, however, you’ll have to resample one of them to match the size of the other first.

---

<div class="post-metadata">

**Author:** ![Mr.Blue\_Sky](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@Mr.Blue\_Sky](https://boards.straightdope.com/u/Mr.Blue_Sky)\
**Post date:** [February 25, 2005, 3:40am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/11 "2005-02-25T03:40:19Z")

</div>

> [@Stana Claus](#):
>
> I’ve been using Duplicate Image Finder from Running Man Software ([http://www.rmsft.com](http://www.rmsft.com)) for a while now, and it works very well.

I downloaded this and started fiddling around with it and I must say I’m impressed. I’m definitely going to buy it.

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![IGJoe](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/igjoe/32/5420_2.png) [@IGJoe](https://boards.straightdope.com/u/IGJoe)\
**Post date:** [February 25, 2005, 4:03am UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/12 "2005-02-25T04:03:50Z")

</div>

I’ve been using [Unique Filer](http://www.uniquefiler.com/) for years, and have always been impressed with it. I haven’t tried any of the others mentioned so far, though, so I couldn’t say how it does comparitively.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [February 25, 2005, 1:19pm UTC](https://boards.straightdope.com/t/is-there-software-that-compares-pictures/291292/13 "2005-02-25T13:19:21Z")

</div>

> [@Mr. Blue Sky](#):
>
> I downloaded this and started fiddling around with it and I must say I’m impressed. I’m definitely going to buy it.
> 
> Thanks for the help.

After you get all your cats organized, could you please post links to a couple of your favorites? I bet many of us would like to see some nicely organized cat photos. 😃
