Organizing images by color

You may have noticed, but Google Image search now has a feature that lets you narrow down results by color. Does anyone know how they do it? Obviously, they indexed information about each image.

I am curious what the best methods of analyzing the color data of an image are to do a simple color search.

Thanks for any ideas!

+2


source to share


3 answers


Color averaging is a great start. Just scale down the image to 10% of its original size using a bicubic or bilinear filter (or something advanced). This will significantly reduce color noise and give you a result that is closer to how people perceive the image. That is, a pixelated raster consisting solely of yellow and blue pixels will become pure green.



If you don't blur or downscale the image, you can still get the average green, but the variance will be huge.

+3


source


Google's feature offers 12 colors to match images. So I would calculate the Lab coordinate of each of these samples and plot the coordinate of (a*, b*)

each of these colors in 2D space. I would reset the component L*

, because the brightness (luminance) of the pixel should be ignored. Using 12 points in space (a*, b*)

, I computed the partitioning using a Voronoi diagram . Then, for a given image, I'll take each pixel by calculating its coordinate (a*, b*)

. Do this for each pixel in the image and create a histogram of counts in each Voronoi section. The section that contains the most pixels will then be considered the color of the image.



This would serve as the basis for the algorithm, although there would be refinements to ignore areas of black and white backgrounds that are not considered to be part of the subject of the image.

+1


source


Average color of all pixels? Make a histogram and find the average of the peaks "n"?

0


source







All Articles