Downloads:
- Image Comparison (647 kb zip)
- Source
The idea for image comparison was born on a lazy sunday morning when I was reading the Sunday
comics, trying to solve those darned "picture difference" puzzles (not that I can't solve them
but murphy says you're always gonna miss one).
Having nothing much to do at the time (yes I was
unemployed at that time), I decided to see if I could get the computer to find the differences
for me (thus saving me 10 minutes of every sunday for the rest of my life). And so, Image Comparison
was created. Although I never got around to dusting off the old scanner to actually scan on the
sunday comics, this program does (to an extent) what I had inteded to do in the first place.
Unfortunately, I only had minimal computer programming skills at the time (as opposed to now? lol), and
the program runs on a rather rudimentary search pattern. Never the less, it is fun to play around with.
For example, can you spot all the differences between the two pictures below? (without cheating and scrolling to the solution!)
Original |
![]() |
Comparison |
![]() |
Solution as generated by Image Comparison |
![]() |
Pretty neat no? Well, regardless of whether you thought so or not, here are some application details:
Details
- Language: Java
- Size: 10348b (jar)
Readme (PLEASE read this if you plan on testing the program!)
- download self extracting archive, then run any of the batch files (if windows user)
- usage: java ImageComparison.jar [original image] [comparison image] [pixel offset] [rgb deviation percent] (more on these terms below)
- first things first, the images must be of the same size, they may be different images, but resize them (in MSPaint or whatever) before running this program (not that anything bad will happen).
- the only possible formats are GIF, PNG, JPG which are natively supported by Java.
- with the above said, keep in mind that PNG is the best of the lot, JPG compresses using lossy compression, this means you will get artifacts that the program will not distinguish from differences.
- NOTE! the higher the [pixel offset] the longer it takes to search! (could be up to a minute!)
- in the archive, I have included three sample sets for you to try this program on (as well as batch files for windows users).
- download in Projects page.
- CLICK on the original images and comparison images to show the differences in each.
- have fun!
FAQ
- always read the README before asking questions!
Technical
- [pixel offset] - when you are scanning in files (as originally intended), obviously there will
be differences as to how the image is placed. Therefore looking at the scanned images, you can
assign an offset of
n
pixels for which each pixel can be offset in anxn
area. - [rgb deviation percent] - a percentage (no need to put %) from 0 to 100 for which the image may differ. (also originally inteded for scanning fixes). For example, if you put a deviation of 100% you will get no differences because every pixel's rgb value is within 100% of another pixel's rgb value.