Hi everyone, I have been asked to create a "color search" in which customers enter a desired color like #ffaabb and we will search about 250,000 JPG photos and return best-match images. Search results will rank higher based on how closely the colors match (a few percent of fuzziness is okay) and on how much of the JPG is covered by the desired color.
Question 1 of 2: does anyone have experience with this sort of thing & could they offer suggestions? Are there tools other than ImageMagick that are better at this? Question 2 of 2: left to my own devices, I could think of two ways to handle it. One is to break the image into a grid of 100 squares and use Identify() to learn the average r,g,b of each small square, and then store these 100 data points in a database. One problem with this approach would be the nonsensical average colors derived when I average over areas that are the boundaries between different real objects in the photo. Another way would be to call Histogram() and get a distribution of all colors. Problems here are generating too much data and also getting too many "hits" on transitional colors in boundary areas. Are there other tools or techniques that I am missing? I looked at calling Segment() on the image, to try to break into into its natural objects, prior to caling Histogram(), but I cannot get Segment to do anything other than whiten the image and destroy data. Maybe I'm calling Segment incorrectly or misunderstand what it does -- there didn't seem to be many examples of how to use it. Any feedback would be helpful. I have searched on Google and found a few discussions of color searching but not the detailed algorithms or code samples that I would need. Thanks! _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
