Questions about Photoshop's Histograms

"reprints" of selected articles from Usenet and other forums
-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:10 pm

This is an excerpt from a thread started by Karl Vitti on the adobe.photoshop.windows Usenet group.  Please feel free to add your own comments at any time.

Original Post:
I've been learning Photoshop for quite a while, I've done lots of tutorials and read a few books, but I can't find the answer to this simple thing: In the histogram palette menu there are red, green and blue histograms to give the saturation of those colors, and a luminosity histogram to give the overall ( greyscale) brightness. There is also an RGB option, presumably to give a composite version of the red, green and blue saturation.

In Levels, however we have the same thing, except there is no luminosity option, only RGB. But RGB in this case cannot be a composite of the three color channels, as we use it to adjust brightness and contrast; in other words it is presumably the same as Luminosity in the histogram palette. Despite this, when I do adjustments to an image the RGB histogram in Levels looks identical to the RGB histogram in the histogram palette. I'm obviously missing something, but I don't know what. Can anyone help?...I'm using PS 3 Extended.

- Karl

-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:10 pm

You seem to have answered most of your own question.  Levels does use a
composite RGB histogram, the "OR" of the individual rgb histograms. 

Perhaps the confusion is with how levels operates  There is no luminosity
calculation.  Levels operates directly on individual channel values.  The
values of the RGB sliders are applied directly to the individual channels.

This is why adjusting the RGB sliders normally causes shifts in saturation
and hue, and should be avoided.  In my role as der curvemeister, I should
also add that curves are superior to levels.

- Curvemeister

-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:10 pm

Thanks for your reply. However: I may be as thick as a whale omelette, but I am still having problems understanding. Would you mind if I asked you a couple more questions? If you can answer them it would be really helpful. (So far no-one else has been able to).

1) In the histogram Palette ( and indeed in Levels) do the color channel histograms represent luminosity ( which I take to be brightness) or color saturation? (These are presumably separate entities).

2)Does the black RGB histogram represent a composite of the 3 color channels( as I think you've said ) or the grey tonal values? If the former, why do we use it to adjust tones ie. make the image darker or lighter,increase contrast etc?

3) What is the luminosity option for in the Histogram Palette and why is there not one in Levels?

4)In the channels palette, do the greyscale images for each channel represent colors, or are there really greyscale images behind each color channel?

5) Do Curves adjustments increase saturation or brightness ie. Luminosity.

6) Why is there a black channel in CMYK if each channel has its own greyscale image?

As you can see, I am having problems understanding what precisely color channels are, and also what exactly histograms are telling us.

I realise this might be a tall order for a forum such as this but I would appreciate any help you can give.

- Karl

-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:11 pm

On Sat, 11 Oct 2008 12:38:05 -0700, karl_vitti@adobeforums.com wrote:

Good questions.  It's no wonder that the histogram tool is a bit confusing,
since very little is said about it in the PS documentation.  There are five
histogram "modes", RGB, red, green, blue, luminosity, and colors.

> 1) In the histogram Palette ( and indeed in Levels) do the color channel histograms
> represent luminosity ( which I take to be brightness) or color saturation? (These
> are presumably separate entities).

Speaking only of RGB images, the red, green, and blue channel histograms
are the first ones to sort out.  They represent the number of values
(0-255) of each color channel.  The Color histogram is a superimposed
display of red, green, and blue histograms.  The absolute height of the
peaks in the histogram is determined by the height of the maximum peak, and
this is done on a per channel basks.

> 2)Does the black RGB histogram represent a composite of the 3 color
> channels( as I think you've said ) or the grey tonal values? If the
> former, why do we use it to adjust tones ie. make the image darker
> or lighter,increase contrast etc?

The black RGB histogram is a combined view of the histograms for each of
the three channels, however all the channels are vertically scaled by the
same amount, instead of being scaled individually per channel.  This means
that the location of the peaks for each individual channel stays the same,
but that the height of each peak will be smaller for two of the channels.

> 3) What is the luminosity option for in the Histogram Palette and why is there not one in Levels?

Luminosity is calculated by taking the weighted sum of the red, green, and
blue values for each pixel.  The weight is smaller for blue, since it is
the darkest color, and largest for green.  This corresponds closely to the
histogram seen in many camera displays, and is the reason that clipping can
occur, but not show in the histogram.

> 4)In the channels palette, do the greyscale images for each channel represent colors,
> or are there really greyscale images behind each color channel?

Each channel is a grayscale image.  For RGB, each image can be thought of
as providing a certain amount of red, green, or blue to the image.

> 5) Do Curves adjustments increase saturation or brightness ie. Luminosity.

Again, speaking only in RGB, Curves can increase saturation and luminosity
in a variety of ways, since saturation, hue, and luminosity information is
mixed together in each of the red, green, and blue channels.  Many people
find that working in the Lab color mode is simpler, since the L channel
contains all the luminosity information, and a and b contain independent
color information.  Try Lab - you might like it very much indeed.

> 6) Why is there a black channel in CMYK if each channel has its own greyscale image?

The black channel borrows data, more or less equally, from the C, M, and Y
images.  This produces a fourth channel, called K, that provides excellent
control over shadows and textures.  Since the CMY channels contain more
color information, they provide a very sensitive adjustment for color,
which is good for things like skin tone variation.

> As you can see, I am having problems understanding what precisely color channels
> are, and also what exactly histograms are telling us.

It takes a while for all of this to sink in, but it does not require a PhD.
Things like additive and subtractive color, and the idea that organizing
color data into different color models, such as RGB, Lab, HSB, and CMYK can
provide leverage.

> I realise this might be a tall order for a forum such as this but I would appreciate
> any help you can give.

I think it's important to work these things out from basic principles, as
you are doing.  Grab a book by Dan Margulis, and some light bulbs will
start to turn on regarding the different color spaces. 

BTW - histograms are a poor tool for color correction.  If there are
problems with clipping or other issues, it is much better to look at the
individual channels of the image, rather than the histogram.

- Curvemeister

-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:11 pm

Another way to think of the RGB channels - if they were projected on the
wall, with red, green, and blue filters, you would see the final color
image. 

This was done, a century and more ago, to capture very high quality color
images for the Czar of Russia, and you can use Photoshop to put them back
together:
http://www.loc.gov/exhibits/empire/

- Curvemeister

-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:11 pm

Hi, I am grateful for all the interest, but I am somewhat embarrassed to relate that I am still a little unclear.I know I must sound a bit slow, but my background is in Classics and Art History, not Maths and Science ( that’s my excuse!).I appreciate clarity, and explanations appropriate to my schoolboy level in this subject.I must say that none of the books I have read so far have explained this matter; they tend to reinforce my mistaken view that saturation simply means strength of colour, which is the way it appears when I move the saturation sliders in PS CS3

Is it the case then that:

Hue= what we normally call colour.
Luminosity = Brightness i.e. how near white a pixel is, and
Saturation = a mixture of hue and luminosity ie. if the hue remains at the same intensity and we make the pixel brighter the saturation will increase?

Have I got the hang of it or not? And if so, I have to ask the next question:

If “ no grey whatsoever is fully saturated”, how then can it be that “an essentially black pixel is 100% saturated”??

I've done quite a lot in Photoshop, and I'm now trying to understand how it works.I've obviously got a long way to go.....

- Karl

-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 14, 2008 10:12 pm

...
> Hue= what we normally call colour.
> Luminosity = Brightness i.e. how near white a pixel is, and
> Saturation = a mixture of hue and luminosity ie. if the hue remains at the
> same intensity and we make the pixel brighter the saturation will increase?

These are characteristics of the HSB color model, which is one of several
color models (RGB, Lab, CMYK, ...)

Uh-oh I feel an historical reference coming on.  HSB was invented by a
great guy named Alvy Ray Smith.  Two cool things about HSB are that it is
intuitively very similar to the behavior of mixing paint pigments, and it
is easy to compute on the slow things we used to call computers of years
ago.  Alvy also invented the alpha channel, is one of the founders of
Pixar, and incidentally had a big hand in the software on which Photoshop
1.0 was based.  Alvy  also argued, to no effect, in favor of storing all
images in gamma 1.0 format.  OK - enough about history already... no, wait,
check out Alvy's home page: http://alvyray.com/

Back to the points you were making.  You are correct on Hue and Brightness.
You're very close on Saturation.  Think of Saturation as the amount of
white that is mixed with the color.  No white = 100 percent saturation.

> If “ no grey whatsoever is fully saturated”, how then can it be that “an
> essentially black pixel is 100% saturated”??

From an intuitive standpoint, mixing black with a pure color decreases the
Brightness, bit it does not change the saturation. 

Mixing white and black, so as to keep the Brightness the same, will
decrease the Saturation.  This is where George's comment that adding gray
changes the saturation comes from.

Just to sum up: adding pure color controls the hue, adding white decreases
the saturation, and adding black reduces the Brightness.

> I've done quite a lot in Photoshop, and I'm now trying to understand
> how it works.I've obviously got a long way to go.....

I like to think of it another way.  It's as if you are Aladdin, in the
magic cave, and you've gathered up all the treasure you can hold for now.
Be happy, and you can always make another trip to the cave.  There is one
unassuming little magic lamp in the cave, however, that you should be sure
to find room for on one of your trips: Lab.

- Curvemeister

ggroess
Posts: 5342
Joined: Wed May 24, 2006 2:15 am
Contact:

Postby ggroess » Wed Oct 15, 2008 12:31 am

Mike if you get a chance to post this for Karl to see....

Karl,
I'm not sure if this will help or muck up the waters....

To me... RGB is like theater lighting...More of each value approaches pure white.  Visually you would say the light is brighter but the saturation is lower.  It appears that the luminosity changes as you add or subtract more of each separate channel.

In CMYK I think of it as negative RGB. "Negative light" doesn't make sense so substitute ink for light... The more CMY you add to the image the darker the image becomes.  I learned how to work with CMY by doing subtractive color printing.  You fixed color shifts there by adding M and Y to the light you used to make the prints until the neutrals were correct.  We did not use C in that process unless we had no other way to go since adding C to Y and M created gray and lowered the contrast.  Adding K just pushes the shadow details around and helps to create true blacks rather than really dark grays.

HSB to me was like adjusting the color on your TV.  You had brightness, Intensity, and color.  But the hue curve is really more like a circle.  It's odd but you can run a hue adjustment all the way through the color space and end up back where you started.

And now LAB....
LAB made the most sense to me since color is separated from brightness.  In LAB curves you can adjust the luminosity of the image without introducing color shifts.  You can make some very fast and easy B&W conversions using just the L channel of LAB.  Lab also reduces the colors to single adjustments rather than combination's of two or more channels.  For instance if you want to adjust a yellow in LAB you adjust the b curve in the yellow area and you really do not effect the blues much.  Make the same adjustment in RGB using the Blue curve and you have to fix the color shifts you just added to the other colors that have a Blue component.

Mike has tried gently to nudge you into trying LAB...I'll just flat out tell you...TRY LAB....if you do not like it that's ok...I thought it was totally wrong the first time I had to use it.  Now it is one of the strongest tools in the box for my color corrections.

Just my 10 cents worth...
Greg


Return to “Articles from other forums”

Who is online

Users browsing this forum: No registered users and 4 guests