7 Replies Latest reply on Mar 10, 2013 9:59 AM by JJMack

# Histogram RGB Definition

I know that the histogram show the distribution of the piex in the R value, G value and B value. The x-axis indicate the value of the pixel while the y-axis indicate the amount of the pixel. e.g. The R channel is 8-bit grey-scale image and the range of its color is from 0 to 255. So do the G channel and B channel. The larger the value of pixel is, the more the pixel is distributed in the right side in the histogram. e.g. Ra = 0 while Rb=255, then pixel a and b are distributed respectively at the location of 0 and 255 (x = 0 and x=255). It is easy to understand.

But what about the histogram of RGB Compound Channel?

How to define the the distribution of the pixels with the R, G, B value in the histogram of RGB？

For example, pixel A is RGB(255,0,0) while pixel B is RGB(0,255,0) and how to distribute the two pixel in the histogram of RGB?

In order to make it out, I paint some pure color in the canvas and obverse the histogram carefully. But I feel really puzzled and can't find the relationship between the histograms of RGB compound channel and the R, G, B split channels.

Can you tell me why? Thanks very much.

• ###### 1. Re: Histogram RGB Definition

For example, pixel A is RGB(255,0,0) while pixel B is RGB(0,255,0) and how to distribute the two pixel in the histogram of RGB?

The pixel is not being represented as such, the RGB histogram is just the result of the three channel histograms.

For the RGB histogram it is irrelevant if there are three pixels of 0/0/255, 0/255/0, 255/0/0 respectively or one pixel with 255/255/255 and two with 0/0/0 – the influence is the same.

Two images looking quite different can have the same RGB histogramm.

I hope I understood correctly what your issue was, though …

• ###### 2. Re: Histogram RGB Definition

You may also want to expand the histogram view and use the pull-down to see all the channels.  You see it list six channels I actually think its more like four Red Green Blue and Luminosity for when you control Click on the RGB channel the selection that you get is called the luminosity selection.

• ###### 3. Re: Histogram RGB Definition

Yeah, I was surprised to see the quite differenet images sharing almost the same histogram!

I'm sorry my English is not good enough to express myself accurately.

But the histogram of RGB still confuses me

The interval of horizontal ordinate in histogram of RGB is also [0, 255] (level), which is the same to the histogram of R, G, B. For example, as it's shown in the picture, what pixels does the the level 135 indicate? Is it the the pixel 135/0/0, 0/135/0, 0/0/135 ? or is it the pixel of which the mean of R,G,B is 135? [(R+G+B)/3]

Maybe the histogram of RGB is not very practical and I take unnecessary pains to study an insignificant problem. But I want to know it. Is there any algorithm about the distribution of pixel in the histogram of RGB?

Thank you very much. It's very kind of you to help me on this!

• ###### 4. Re: Histogram RGB Definition

Oh, I forgot the post the image.

• ###### 5. Re: Histogram RGB Definition

It's very kink of you to reply to me immediately and I really appreciate it.

It seemes that the histogram of RGB and luminosity doesn't have a close relationship with the histogram of R, G, B.

The interval of horizontal ordinate in histogram of RGB is also [0, 255] (level), which is the same to the histogram of R, G, B. For example, as it's shown in the picture, what pixels does the the level 135 indicate? Is it the the pixel 135/0/0, 0/135/0, 0/0/135 ? or is it the pixel of which the mean of R,G,B is 135? [(R+G+B)/3]

Thank you very much.

• ###### 6. Re: Histogram RGB Definition

In this example of a file of 1000px x 1000px (so 1000000 pixels as indicated) an area of 500px x 1000px and the color 128/0/0 gets a Count for 128 of 500000; the same area with 128/128/128 gets a count for 128 of 1000000.

So the 128 numbers of the two Channels simply get added.

(255 gets a count of 1500000 incidentally.)

Edit: In the RGB Histogram that is!

And I just noticed that the document’s histogram as addressed via Script is the composite histogram, not the RGB histogram.

• ###### 7. Re: Histogram RGB Definition

First the image you show may be showing wrong numbers as indicated by the triangle with the ! in it you need to click on it to update the cache data.  Also I think what you want to look at is the info palette. As you move the cursor over the image it will give you a readout of the R G and B of the spot the pointer is over you can also set it to show values of other mode values like lab. The histogram is just number count of pixels knowing the contents of the image seeing the shape of the histogram may help you with you exposures especially coupled by blinking exposure problem area in camera image previews.  Many an image may have odd looking histogram depending on color content, exposure  and lighting