T
T
Temi2016-01-14 13:40:42
PHP
Temi, 2016-01-14 13:40:42

How to find dominant colors in an image?

Greetings!
In general, I need to find out a certain number of dominant colors in the image, find the colors most similar to them from the list, and then iterate over this image by pixels and replace it with the most similar color from the resulting list.
I did everything, it seems to work, but not perfect. As I understand (found) an error in finding the dominant colors (the only thing that I did not write myself, but installed someone else's class).
Used: colorsofimage.class.php , getImageColor.php . the second works well, but not perfectly (sorry for the tautology);
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Temi, 2016-01-14
@Temi

It seems that I found a solution - colors.inc.php

R
red_led, 2016-01-14
@red_led

https://github.com/ksubileau/color-thief-php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question