views:

13

answers:

0

hello,

searching a photo by dominant colors using mysql is quite simple. assuming that the r,g,b values of the most dominant colors of the photo is already stored in the database, this could be achieved for example by something like:

SELECT * FROM colors
WHERE    ABS(dominant_r - :r) < :threshold
AND      ABS(dominant_g - :g) < :threshold
AND      ABS(dominant_b - :b) < :threshold

i wonder, if it's anyhow possible to store the colors in sphinx and perform the querying using the sphinx search engine?

thanks!