vendredi 27 mai 2016

Would this work for reverse image search?

Hello I've worked on a PHP code which takes two images and does the following:

scale them down to 200x200px

add a grey filter and a contrast which is equal to 50

imagefilter($im, IMG_FILTER_GRAYSCALE);
imagefilter($im, IMG_FILTER_CONTRAST, 50);

then I have two loops which scans the entire image X-Y pixel by pixel and saves the HTML color code to an array. Then compares the first array to the array of the second image.

Then at the end get the percentage of the similar HTML codes at the same X-Y angle. I tried this on three images and compared them with my own profile picture (which has quite a dark tone, I'm not sure if this is why I get such a high percentage which I will show soon)

  • Me vs Picture of Bill Gates: 14% similar
  • Me vs Picture of friend with a dark tone: 66%
  • Me vs Me: 89%

So I won but my friend was dangerously close because we both have a dark background. Now I'm wondering, what's a more accurate way of doing this without e.g pattern recognition?

Besides reverse image search I also want to take two exact same pictures of the same person but on different social medias e.g Instagram + Kik and make sure it's the same person. A friend suggesting putting them both into MD5sum but this won't work because of scaling, styling, filters etc.

I'm new to image manipulation and recognition etc, If anyone is knowledgeable within this subject or has any advice, research-paper or algorithm to look up it would be appreciated! :)

Aucun commentaire:

Enregistrer un commentaire