A
A
Andrey Dudukin2015-12-26 23:52:41
Programming
Andrey Dudukin, 2015-12-26 23:52:41

How to search for images on a computer by the dominant color?

Are there similar programs? The functionality is similar to Google image search by color.
If there are no programs, is it difficult to write such a program in C#? What libraries do you recommend?
Such a program exists from our compatriot: Color Search
It suits me perfectly, but its success in determining the predominant color is lame (especially for low-resolution images).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nirvimel, 2015-12-27
@Program23

I wrote something similar in Python (not for looking up images on disk, but as part of another more complex task). Finding a specific dominant color (one out of over 16 million) is pointless, since a nearly identical image may not have a single pixel of that particular color at all. Perhaps this is the problem with Color Search.
I went the other way. I had something like this algorithm:

  1. Construction of a three-dimensional (in RGB space) histogram.
  2. Approximation of this distribution by some function (I took the Gaussian distribution).
  3. When comparing two images, it is not the colors of the pixels that are compared, but the parameters that approximate the histogram, the function (for a Gaussian distribution - (mu, sigma) * 3 measurements == 6 parameters; for mu and sigma, different weight coefficients when comparing). The Cartesian distance in three-dimensional RGB space between the parameter values ​​for two images is the measure of the difference between their color gamuts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question