Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

comparing 2 images in PHP

I am aware that there is one more question like mine, but I just thought mine was after all a bit different.

I have to be able to establish if the images are very similar or entirely different...
have a look at the following two images:
lighter imagedarker image

The first image is a bit lighter than the second image. You can see that on black striped fish in the middle.

So, comparing the md5 hashes doesn't really help. Is there anyother clever way to do it?
thanks!

like image 912
Marci-man Avatar asked Sep 07 '11 00:09

Marci-man


1 Answers

try that function

http://www.php.net/manual/en/function.imagick-compareimages.php

you will need to google for usage since the doc seems to be empty ...

like image 190
Tarek Avatar answered Oct 13 '22 11:10

Tarek