3

How to calculate mean/average photo color in GIMP?

I have some photo and want to calculate average color - how can I do it?

7

Actually it's very simple. If you open the Histogram tab, there are some basic statistics about the color values, such as mean, standard deviation and median.

I've included some of the surroundings for context.

Depending on the selected tab (RGB, Red, Green, Blue, Value) you'll get different statistics. If you want to know the average color, take the Mean from the three separate channel histograms and enter them in a color picker. You have one by clicking on the colored rectangle in the toolbar.

enter image description here

  • note that it also adapt to the current selection. Very convenient ! – Fabrice NEYRET Dec 26 '15 at 0:03
5

Resize the image to 1x1 and see the color of the pixel you get. :)

2

Since most of all images are shown either in RGB or CMYK mode, calculating an average color value from there is difficult because you have 3 or 4 values per pixel. I would try to convert the image into HSV mode (Hue, Saturation, Value). There you have one specific color value for each pixel which is easier to calculate. See also here: Wikipedia Link HSL and HSV

I am not sure whether there is an option in Gimp to convert your file to this color space. I would try it with Matlab or maybe Octave (free).

  • HSL/HSV space is not good for color processing - much better is CIE Lab or sRGB. More popular is sRGB. HSL is good for artists. – Chameleon Oct 27 '14 at 15:43
  • 2
    Can you give some reasons why it is bad if you only use it for the purpose of calculating the average color ? I thought HSV is useful in industrial image processing since you have direct access to every color with one single value. Maybe I´m missing something. – koocky Oct 27 '14 at 20:24
2

Want something like this ,just figured by chance that you can use (linux only)GPick

go to tools -> Palette From Image ... -> pick the image and set number of colors to one this will give you the exact color if you try @clabacchio solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.