
The two methods seem pretty good at first glance. You can find several known palettes in the "examples" folder, to check the algorithms accuracy How efficient are the two algorithms ? To check, I just had to test my tool on images and well-known palettes.


The image is filtered in HSL color space: 'Filter grays': what is really meant is gray AND near-blacks AND near-whites, which are after all different kinds of grays! It helps getting only colors in the resulting palette.You can choose to filter the image before quantizing in two ways that can be combined:

If the number of colors you wanted exceeds the number of colors in the image, the number of colors is adjusted and shown in red after computation The elapsed time is shown on the LCD display K-means: a well-known algorithm to aggregate significant data - source: Ĭlick QUANTIZE to finish: you end up with a 3D view, a quantized image and a palette.Eigen vectors: the fastest - source: (was limited to 128 colors, I extended that).How many dominant colors do you want? Choose wisely, bigger values take greater time to compute (you have a timer but not in real-time) The solution is to apply a 3x3 Gaussian blur that helps smooth surfaces Gaussian blur: you might not want to reduce the image, but image noise can affect results VS what you really perceive.Reduce size: the bigger the image, the longer you wait! Tests have shown that reducing the image to 512 pixels doesn't affect much the dominant colors distribution.All is on one window, the tool is pretty simple once acquainted.Help is available within the GUI, with each element's tooltip.This software should also work under Microsoft Windows: if you tried it successfully please contact me, I'd like to offer compiled Windows executables OpenGL - I used deprecated functions starting from v3.1, but it works under Ubuntu with my GeForce 1080 Ti.openCV 4.1 compiled with openCV-contribs - should work with 3.x versions without much editing.This is exactly what you will get in the improved version ot my Color Wheel software here: This software lacks an important feature that wouldn't make sense in 3D color spaces: analyzing how the colors in an image/painting/photo interact with each other. 'The first version was only a color wheel". now you can visualize the results in full 3D, in the most-known color spaces + a 3D color wheel! The first version was only a color wheel. I tried to find tools on the internet, but none of them had all I wanted, so I started coding once again. I wanted to analyze how the colors in my photos were distributed.

Delicately tuning colors can greatly improve an already good photo, to make it stunning! Lately I paid great attention to colors in my photo editing process. I used bits of code from several sources, which are cited when possible within the code The present code is under GPL v3 license, that means you can do almost whatever you want with it! v0.1 - more accurate and several color spaces added.v1 - checked conversion formulas against online calculators: all good!.v2 - added interesting color spaces + lettered axes and visible specter boundaries in 3d view + color conversion button + select/hide colors + bug-fixed Eigen method that was limited to 128 levels + palette cleaning + many other bug fixes.v2.1 - GUI improvements + added filters when quantizing (greys, percents) + added CMYK in palette CSV file + save palettes for popular graphics software like Photoshop, Corel Draw and Paintshop Pro.Dominant-colors-3d-color-space Find dominant colors in images with QT and OpenCV, with a nice GUI to show results in 3D color spaces v2.1.
