Pages: [1]   Go Down

Author Topic: Area under the histogram  (Read 4742 times)

davidedric

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 85
Area under the histogram
« on: August 27, 2013, 03:00:04 pm »

Please can someone enlighten me as to the significance of the area under the histogram as applied to photographs.   I have a scientific and maths background and understand histograms in general well enough.   I also think I understand what a photo histogram in general is telling me.   They are clearly not normalised so that the highest value reaches the top, so what does the area under signify?   I know this won't improve my photography, but I hate not knowing things!    Thanks for any help.   Dave
Logged

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18087
  • When everyone thinks the same, nobody thinks
    • My website
Re: Area under the histogram
« Reply #1 on: August 27, 2013, 03:24:17 pm »

... what does the area under signify?...

Number of pixels of certain tonality?

KirbyKrieger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 422
    • Kirby Krieger Pictures
Re: Area under the histogram
« Reply #2 on: August 27, 2013, 03:28:26 pm »

Total number of pixels.

http://www.cambridgeincolour.com/tutorials/histograms1.htm
http://www.cambridgeincolour.com/tutorials/histograms2.htm

Especially page two.

The amount of mis-information (or, perhaps charitably, semi-information) on this topic is typical of the situation in photography, IME.  Here are the Google results for "Photograph Histogram".)  (Added: not, I should add, in response to Slobodan's post, but rather my reaction after using teh Google to find a site that explains the answer.)
« Last Edit: August 27, 2013, 07:31:56 pm by KirbyKrieger »
Logged

davidedric

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 85
Re: Area under the histogram
« Reply #3 on: August 28, 2013, 05:50:48 am »

Quote
Total number of pixels

Thanks for the reply.   I am familiar with the CiC tutorials, but, as they say, I think it's a bit more complicated than that.

*** nerd alert ***

Another way of asking is "What is the vertical scale?"

The total number of pixels is fixed for any given image, so the Area Under the Curve (auc) is also fixed.  However, if I look at different histograms of the same resolution, that is obviously not the case.   I can see broad histograms with the auc filling half the space and spikey ones with a much smaller apparent auc.

Similarly, two images of the same or similar scenes show much the same histogram, even if they are taken at very different resolutions.   That makes sense - there would not be much sense in having a low res histogram crawling along the bottom of the graph.

So, I it could just scale so that the most intense point of the most intense channel hits the top of the graph.   Except it doesn't, because it's easy to find histograms which clearly continue over the top of the visible graph.

It's not really important from a photography point of view, it just bugs me that I don't know.

Incidentally, and I expect this has been pointed out before, the histograms for the same image in LR4 and ACR 7.4 (as in PSE 11) are different.

Cheers,

Dave
Logged

Bryan Conner

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 539
    • My Flickr page
Re: Area under the histogram
« Reply #4 on: August 28, 2013, 06:43:39 am »

The way that I understand it, and I could be wrong, is that a histogram is only a graph that shows relative amounts.  When you have an image that you refer to as continuing "over the top" of the graph, it could be that all of the tones are simply represented by the same number of pixels and they all end at the top of the vertical axis of the histogram.  But, I am just thinking out loud, I do not claim to be an expert on histograms, nor do I play one on TV...or the www.  I have also read a good deal of info on histograms over the years, and can only describe the subject as being very cloudy to say the least.  Maybe some of our diginerds in residence can clear the clouds.
Logged

JRSmit

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 922
    • Jan R. Smit Fine Art Printing Specialist
Re: Area under the histogram
« Reply #5 on: August 28, 2013, 06:50:52 am »

to my understanding the area under the histogram has little meaning, the "curve"as you will (actually a string of points) only indicates a relative amount of pixels with that tonality on that point on the horizontal scale.
Its added value in photography is more in the area of under/over exposure, clipping, and if the tonal scle appears to made of discrete areas with little in between, a good indication where to play with development settings or makeing masks that somehow make use the tonality.
For me that works, differences of the same image in different applications comes from the different interpretations of the original file(especially raw), the color management settings and whatever the development team found necessary or useful.
Again for me of little value or use. I am more worried about the differences in histogram on my camera lcd versus the image loaded in my application, especially with raw.
Logged
Fine art photography: janrsmit.com
Fine Art Printing Specialist: www.fineartprintingspecialist.nl


Jan R. Smit

Manoli

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2292
Re: Area under the histogram
« Reply #6 on: August 28, 2013, 07:28:32 am »

..  it could just scale so that the most intense point of the most intense channel hits the top of the graph.   Except it doesn't, because it's easy to find histograms which clearly continue over the top of the visible graph.

Two people who could give you an informed answer on this site, are Eric Chan and Jeff Schewe. My own, uninformed and best guess is this:

A histogram is a simple bar graph showing tonal values distributed across the tonal range. Far left total black, no detail (level 0). Far right total white, no detail (level 255).  The vertical axis indicates the number of pixels present in that section of the tonal range.

I suspect that what you are seeing in the vertical axis, is a variable cut-off.  I don't think 'that the most intense point of the most intense channel NECESSARILY hits the top of the graph.'   In other words, if the vertical axis represents 0-100 %, the actual vertical display is not necessarily 100% but a lower level thereby allowing one to see a greater amount of detail in the middle regions.

You can see this in Lightroom by playing with the exposure and contrast sliders. Moving from extreme left to extreme right, the distribution changes as does the vertical cut-off (sometimes).

As I said, just a best guess ...

Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
Re: Area under the histogram
« Reply #7 on: August 28, 2013, 05:50:12 pm »

Thanks for the reply.   I am familiar with the CiC tutorials, but, as they say, I think it's a bit more complicated than that.

*** nerd alert ***

Another way of asking is "What is the vertical scale?"

The total number of pixels is fixed for any given image, so the Area Under the Curve (auc) is also fixed.  However, if I look at different histograms of the same resolution, that is obviously not the case.   I can see broad histograms with the auc filling half the space and spikey ones with a much smaller apparent auc.

Similarly, two images of the same or similar scenes show much the same histogram, even if they are taken at very different resolutions.   That makes sense - there would not be much sense in having a low res histogram crawling along the bottom of the graph.

So, I it could just scale so that the most intense point of the most intense channel hits the top of the graph.   Except it doesn't, because it's easy to find histograms which clearly continue over the top of the visible graph.

It's not really important from a photography point of view, it just bugs me that I don't know.

Incidentally, and I expect this has been pointed out before, the histograms for the same image in LR4 and ACR 7.4 (as in PSE 11) are different.

I think you got it clear Dave. The Y-axis scale of the histogram is arbitrary since it only depends on the software design. This image:



Shows the following histograms in two different programs: left is PS which truncates the Y-axis to make histogram interpretation easier. On the right it is the whole histogram in Histogrammar using a 256 pixels Y-scale:




Some more curiosities:

1. The following two images have exactly the same histogram. This clearly demonstrates that the histogram has zero spatial information (it's independent of the location of the different tonality levels):

.


2. The following image doesn't contain useful information itself:



its histogram does:




3. This is what happens to a 16-bit image (X-axis is at max zoom level, i.e. one pixel = 1 tonal level):



when it is opened and saved back in Photoshop without any change made by the user:



It demonstrates that PS is a 15-bit tool, not 16-bit.


4. Find here the longest histogram in the world  ;D. It corresponds to a 16-bit TIFF image so its X-axis (in vertical position) is made of 65536 values.
« Last Edit: August 28, 2013, 05:55:59 pm by Guillermo Luijk »
Logged

nma

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 312
Re: Area under the histogram
« Reply #8 on: August 28, 2013, 10:00:25 pm »

I like to think of the histogram as follows: The Ordinate (Y-axis) represents a probability, the probability that an image pixel intensity lies between x and x+dx, where x (abscissa) is an image intensity. the value of dx depends on how the histogram is implemented. In principle, the maximum intensity is 2^14 -1. But Adobe software scales the maximum intensity so that it is rendered at x=255.  So, each time a pixel intensity is recorded between x and x +dx, the corresponding ordinate is incremented by 1. If the histogram is not normalized to yield probabilities, the sum of the histogram element will be the number of pixels in the image. If it is normalized, the sum is one.
« Last Edit: August 29, 2013, 10:27:16 am by nma »
Logged

PeterAit

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4559
    • Peter Aitken Photographs
Re: Area under the histogram
« Reply #9 on: August 29, 2013, 09:38:15 am »

The area under the histogram is - or should be - the same for all photos of the same pixel count. After all, each pixel is counted once and must be represented in one of the histogram bins. It's the shape of the histogram that tells you something:

Big bump near the left end - dark photo with few highlights
Big bump near the right end - light photo with few shadows
No bump, even all across - evenly balanced tonality
Pixels at the far left - pure black, blocked shadows
Pixels at the far right - pure white, blocked highlights
Logged
Pages: [1]   Go Up