PHP: similar images

11/21/2010 03:39 TheSpy#1
I'm pretty sure that most of you already used iqdb.org or tineye.com. What I'm currently trying to do is to write a script that will take two images (resized to the same size), do some stuff and return the similarity percentage. Right now I have 2 versions, but neither of them works good enough, I still get totally unrelated images with 85%+.

[Only registered and activated users can see links. Click Here To Register...]
Found this one on the internet, but mixes up images.

[Only registered and activated users can see links. Click Here To Register...]
Modified the above version to compare colours separately (R, G, B). Sometimes it's better than the one above, sometimes it totally messed up.

Does anyone have any idea HOW I could compare images to get better results? Been googling for the past one or two hours, but didn't find anything that could be useful.

Edit: the colours are being detected correctly, it's just the "shape/object" on the image that doesn't get "recognized". Two images can have the same colour average, but one could be a picture of a cat, the other of a dog. The above script only check if the average colour matches.
11/22/2010 13:35 backo#2
try [Only registered and activated users can see links. Click Here To Register...]
11/22/2010 18:43 TheSpy#3
That's basically the same thing the first script. Except that the result is actually an image, which isn't that useful at all. Anyway, I'm working on something new now, I might eventually get it working.