Java library to compare image similarity [closed]

You could take a look at two answers on SO itself: this one is about image comparison itself, offering links to stuff in C++ (if I read correctly) while this one offers links to broader approaches, one being in C.

I would suggest starting with the second link since there’s links on that discussion that’ll lead to implementation code of some relevant techniques which you might be able to “translate” into Java yourself.

That’s the best my google skills could do, no Java though – sorry. I hope it’s a good starting point!

EDIT:
Here’s someone with your problem who wrote his own comparison class in Java. I didn’t read the source code though. He expressly states that he couldn’t find Java libraries for that purpose either, so that’s why he wrote it himself.

Oh, and this question on SO has probably the best links on this, all regarding Java libraries of image processing. Hopefully there’s one amongst them that can compare images for similarity.

Ok, last edit:
The Java Image Processing Cookbook shows a Java implementation of a basic algorithm to determine the difference between two pictures. It also has an email to contact the guy who wrote it as well as a host of references. No library though.

EDIT after reading your comment to your question:
Unless you’ve already checked all of the above links, since what you want seems to be checking whether two images are equal, I would suggest starting with the Java Image Processing Cookbook (since that has an implementation of an algorithm in Java to check for equal images) and the last link to an SO question. Also, check PerceptualImageDiff and the source code of that project (C++); it sounds really nifty – it’s apparently supposed to check whether two images look equal to the human visual system.

Leave a Comment