-6

**hello, i'm trying to develop new web site for special purpose, i have list of images in uploaded in sever, i need to upload image from pc and doing search in list of images in server and return list of images has best similarity of uploaded image depend on image color not face all of those using php this link describe my problem but no codes thanks **

1 Answers1

0

This is a very complex task you are trying to do (and especially hard, because you want to do it in PHP).

What I can think of (in general) to achieve this contains the following sub-tasks:

  • Recognize colours
  • Recognize shapes
  • Recognize the connections of the upper two

In PHP the last two is nearly impossible (and makes no sense as PHP is not an image processing library, there are only basic functions in it). But you can do the first one using this library:

https://github.com/thephpleague/color-extractor

You can make the comparison as fine as you want. Get the most used colours (eg. 1000 one) and compare them as an array. Obviously you won't get an exact match, but if you compare the first 1000 and you find 500 match than that picture is somewhat similar to the other. However you could get completely false results, so this is rather a programmatic solution than a logical one.

mark.sagikazar
  • 1,032
  • 8
  • 19
  • i will explain all , i will develop android application take pic from mobile camera ,send this pic to server and doing search there and return related images and android app server i will use php , Is the possible alternative contribute in solving the problem? – Ahmed shabaan Mar 24 '15 at 15:50
  • You should probably choose another programming language which has better image support. – mark.sagikazar Mar 25 '15 at 21:44