Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image comparison module for PHP

Is there any basic (free or not), but usable - not like libpuzzle - image fingerprinting/similarity/compare module for PHP, which works akin to TinEye or Google image upload search? It's basically needed to avoid uploading almost the same (but with watermarks, resized etc.) image twice into a set of 50-300 images.

like image 753
Jauzsika Avatar asked Jul 06 '11 09:07

Jauzsika


People also ask

How do you compare two images for similarity?

The similarity of the two images is detected using the package “imagehash”. If two images are identical or almost identical, the imagehash difference will be 0. Two images are more similar if the imagehash difference is closer to 0.

What is image comparison?

The general idea is very simple - pixel-by-pixel comparison. The comparison engine gets the color of pixels that have the same coordinates within the image and compares this color. If the color of each pixel of both images coincides, TestComplete considers the two images to be identical.


2 Answers

Take a look at http://www.intelliot.com/2008/03/sorted-directory-listing-image-resizing-comparison-and-similarity-in-php/

like image 62
Steeven Avatar answered Oct 16 '22 08:10

Steeven


This is a very interesting educational article about image comparison. It wouldn't be hard at all to adapt to PHP using the GD library or ImageMagick.

http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html

Good luck !

like image 20
Aweb Avatar answered Oct 16 '22 08:10

Aweb