DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> Photography Discussion >> histogram enlightenment
Pages:  
Showing posts 1 - 25 of 27, (reverse)
AuthorThread
08/06/2004 08:47:50 AM · #1
Had a bit of a revelation last night. I assume it is probably just me that was confused, but thought I'd share anyway.

For a long time I thought a histogram was showing the distribution of dark to light in an image. Darkest dark on the left, lightest light on the right. Then all you want to do is make sure the histogram isn't blocked up to the left (blocking the shadows) or clipping on the right (blown the highlights). This seems to generally be the conventional understanding.

And to a first order, it is roughly true. However, the thing I realised last night is I assume that the histogram on my camera or the normal one in photoshop is showing me a distribution of tones from light to dark. When in fact it doesn't do that at all. The description of highlights and shadows above also assumes that the histogram is showing a distribution of tones - but normally it does not show that information.

I guess at some level I already realised this, but it was brought home when I went through the process with some friends of trying to break an image down into the approximate tonal 'zones' that the image fell in to - we sketched a graph - and it looked nothing like the RGB histogram. And that's the key - the histogram shows the distribution of R, G and B channel information - not the distribution of tonality in the image. You can get a luminosity histogram (distribution of tones) in Photoshop CS - and that looked spot on for what we'd sketched - but cameras don't show that - they show the RGB distribution. Levels doesn't normally show that, it shows the RGB distribution.

Most tools you manipulate the tonality with (looking at 'exposure' on a camera histogram, manipulating tonal relationships with levels, adjusting RAW captures) don't actually show you the tonality - they show you the RGB relationship. Now, this is loosely correlated with luminosity and tonality - but it isn't a direct relationship.

For me, this explained some issues I've had with blown highlights in one channel, yet never saw on the histogram screen and just felt like one of those Eureka! moments when things became that little bit clearer. No doubt many are thinking 'Duh!' right now, but I thought I'd share.
08/06/2004 10:30:13 AM · #2
Don't take this the wrong way, but you are CUTE!
08/06/2004 10:32:28 AM · #3
Does that mean the same as saying it's a bar graph showing the number of pixels present at each of the 255 levels of gray (obtained by "averaging" the RGB values for each pixel)?

I seem to remember a very old thread in which someone discussed (or wished-for) the ability to display an on-camera histogram for each channel.
08/06/2004 10:33:19 AM · #4
Originally posted by Kavey:

Don't take this the wrong way, but you are CUTE!

Yeah, but too bad he doesn't type with the accent : )
08/06/2004 10:40:57 AM · #5
Gordon

I thought the article in the March/April 2004 issue of Digital Photo Pro covered the Histogram/Metadata very well. It sure helped me to better understand the subject.
08/06/2004 10:42:30 AM · #6
Originally posted by GeneralE:

Does that mean the same as saying it's a bar graph showing the number of pixels present at each of the 255 levels of gray (obtained by "averaging" the RGB values for each pixel)?


Yes, except that the convertion from RGB to greyscale is something like
0.45*G + 0.32*R + 0.33*B
Numbers should be wrong as they are from memory, but what is important is that the green channel is more important.
08/06/2004 10:44:02 AM · #7
Originally posted by Calvus:

Gordon

I thought the article in the March/April 2004 issue of Digital Photo Pro covered the Histogram/Metadata very well. It sure helped me to better understand the subject.


I love that magazine!
08/06/2004 10:44:42 AM · #8
Thanks Gabriel, I knew it was some funny formula, which is why I "quoted" average originally : )
08/06/2004 10:47:54 AM · #9
My camera displays each channel. :)
08/06/2004 10:48:42 AM · #10
Originally posted by GeneralE:

Does that mean the same as saying it's a bar graph showing the number of pixels present at each of the 255 levels of gray (obtained by "averaging" the RGB values for each pixel)?


No - fundamentally not.

That is the point that I was confusing.

A luminosity graph/ histogram would show the number of pixels present at each of 255 levels of grey - this is what many people assume an RGB histogram shows.

An RGB histogram shows the amount of pixels at each level, in each channel, combined together, with the forumla mentioned above. This is what we normally see in products like Photoshop and on the back of a camera. It _does not_ give a good indication of the number of pixels at a particular grey or tone level.

They are very different from each other, though related.
I'll post an example later.

Message edited by author 2004-08-06 10:50:09.
08/06/2004 10:54:04 AM · #11
Originally posted by GeneralE:

Originally posted by Kavey:

Don't take this the wrong way, but you are CUTE!

Yeah, but too bad he doesn't type with the accent : )


It's even cuter that he's pretending not to have noticed these two comments! ;o)
08/06/2004 11:40:43 AM · #12
Originally posted by pcody:

My camera displays each channel. :)

Mine can be set either way. =]
08/06/2004 11:48:01 AM · #13
Originally posted by EddyG:

Originally posted by pcody:

My camera displays each channel. :)

Mine can be set either way. =]


But does it ever show luminosity ? At least in most discussions of histograms, the view appears to be that is what is being shown - even though it isnt.
08/06/2004 11:48:13 AM · #14
Originally posted by Kavey:

Originally posted by GeneralE:

Originally posted by Kavey:

Don't take this the wrong way, but you are CUTE!

Yeah, but too bad he doesn't type with the accent : )


It's even cuter that he's pretending not to have noticed these two comments! ;o)


;) It's a lot of effort to appear so effortless

Message edited by author 2004-08-06 11:48:33.
08/06/2004 11:49:39 AM · #15
Originally posted by EddyG:

Originally posted by pcody:

My camera displays each channel. :)

Mine can be set either way. =]


Oh yeah? Well my camera shows a blinking battery when the battery is almost dead...but that's about all it does.
08/06/2004 11:59:37 AM · #16
By the way Gordon, I just looked through your profile to see if you were really cute or not and I saw some incredible pictures. Nice work!
08/06/2004 12:01:23 PM · #17
Originally posted by Gordon:

But does it ever show luminosity ?

From what I can tell, when the histogram mode is set to "Bright.", it shows a luminosity graph. This post by Chuck Westfall specifically says "luminosity", and this page from the 1D Mark II review also specifically lists "luminosity" (search for the word "histogram" on the page).

Message edited by author 2004-08-06 12:02:01.
08/06/2004 12:04:33 PM · #18
Originally posted by EddyG:

Originally posted by Gordon:

But does it ever show luminosity ?

From what I can tell, when the histogram mode is set to "Bright.", it shows a luminosity graph. This post by Chuck Westfall specifically says "luminosity", and this page from the 1D Mark II review also specifically lists "luminosity" (search for the word "histogram" on the page).


That's good. I need to chuck a few images on to my camera to check - but I think most cameras aren't showing luminosity, though maybe they are. Certainly Photoshop is not in the majority of cases.
08/06/2004 12:05:00 PM · #19
Originally posted by thatcloudthere:

By the way Gordon, I just looked through your profile to see if you were really cute or not and I saw some incredible pictures. Nice work!


Way to avoid the question with flattery ;)


08/06/2004 12:05:17 PM · #20
Originally posted by pcody:

My camera displays each channel. :)


Haha! I was thinking this, but I wasn't going to say anthing.

Seeing each channel on the histogram does make things easier to read, I think.
08/06/2004 12:19:00 PM · #21
Yeah, I think I've brought this up before in some other thread. For a long time, I really was under the impression that we were getting a luminosity histogram in camera (and we are, but my idea of what a luminosity histogram should be was horribly wrong). I do think it's clear enough that PS's RGB histogram is not a luminosity histogram (obvious enough in the Histogram palette anyway).

The green channel is a good luminosity indicator in general (shift it right about 25% if you have lots of red). The formulation given by Gabriel earlier in this thread is wholly incorrect. The green weighting is usually around 60-70%, with red in the 20-30% range, and blue contributing negligibly to the L channel. The calculation depends entirely on your color space. I suppose the camera could choose one for you, but if you're using raw and a non-standard colorspace (i.e. not sRGB, AdobeRGB, or ProPhoto RGB) the results will be incorrect (though not significantly).

The in-camera histogram is almost certainly a luminosity of some kind (it's easy to demonstrate it's not akin to the combined RGB histogram in PS for example). I can only guess what color space is used for the calculations. For the 10D it might depend on the sRGB/AdobeRGB setting.

Message edited by author 2004-08-06 12:22:09.
08/06/2004 12:24:14 PM · #22
Originally posted by Gordon:

That's good. I need to chuck a few images on to my camera to check - but I think most cameras aren't showing luminosity, though maybe they are. Certainly Photoshop is not in the majority of cases.

I just did a check.

I had some images on my CF card that I hadn't deleted. So I loaded one of those photos into Photoshop, and selected Windows > Histogram. I selected the "arrow in a circle" and clicked "All Channels View". The top (default) histogram was listed as "RGB", and the 3 individual channel graphs were shown below. I selected the same image on my camera, and went into "Info View" mode, which displays the histogram. The graphs for the three individual channels on the camera matched in shape very similarly to the three graphs Photoshop was displaying (although not identically).

I then used the Channel: drop-down menu on the Histogram palette to change the top "combined" view from RGB to Luminosity. The shape of the graph changed dramatically! So I went into the menus on my camera and changed the histogram display mode from "RGB" to "Bright." and then went back to displaying the "Info View" for the photo in question on my camera.

Sure enough, the histogram on the camera looked like the Luminosity graph in Photoshop, and nothing like the "combined RGB" graph that the Photoshop histogram view defaults to. I wouldn't call the shape of the graphs "identical", but they were similar.

Message edited by author 2004-08-06 12:47:33.
08/06/2004 12:30:01 PM · #23
Originally posted by EddyG:


I then used the Channel: drop-down menu to change the top "combined" view from RGB to Luminosity. The shape of the graph changed dramatically!


Yes - that was the original observation that motivated me to start this thread. In some abstract sense I've been aware of this but never really tied it all together. I'm interested to check what the D60 shows in the on camera histogram. Interesting that the 1D does show both - per channel R,G & B would be useful as would luminosity - the combined RGB seems less and less useful the more I think about it - though it is just another view on the same data.
08/06/2004 05:53:43 PM · #24
Originally posted by Gordon:

I'm interested to check what the D60 shows in the on camera histogram.


An earlier test shot gives you an idea what you might expect to see on the D60. It's an extreme example (lack of green), but you can see that the overall shape of the L* and FVU luminosity histogram are both very similar to the green channel. There may be a scaling issue with L* compared with FVU luminosity and I don't know which formulation FVU is using to calculate luminosity; those two factors could account for the shift. Before using FVU luminosity, I verified that it does match the in-camera histogram.

If you've taken plenty of red-biased images you would have intuitively known the camera's histogram is not RGB combined anyway.

I guess the long and short of it is that you've been treating Photoshop's RGB histogram as a luminosity histogram (relying on it to represent tonal relationships?). Oh, and keep in mind that, in RGB mode, Photoshop's luminosity histogram is always calculated using the NTSC (or maybe sRGB) color space (I don't recall which off hand).

Message edited by author 2004-08-06 17:54:36.
08/06/2004 06:13:50 PM · #25
Sorry if this sounds silly, but can someone tell me what this means to me, practically speaking?

One thing is, a photo with a very saturated red object on a pretty dark background in it may be overexposed and clipping the red channel while the green and blue are pretty low, so the average will look ok on the LCD histogram, but when you look at it on your computer and try to work with it, you may realize all detail in the red has been lost.

Is this a problem anyone has run into, and do you have a way of avoiding it?

( I don't have separate histograms on my camera... :( )
Pages:  
Current Server Time: 08/03/2025 02:28:07 PM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 08/03/2025 02:28:07 PM EDT.