What's new

Understanding the Histograms...

mnmcote

No longer a newbie, moving up!
Joined
May 24, 2014
Messages
250
Reaction score
168
Location
Vermont
Can others edit my Photos
Photos OK to edit
I've got a grasp on the concept of the histogram. Left to Right.. Darks to Lights.. But.. I'm still working on understanding what the actual histogram is telling me about the picture... Can someone offer some tips and/or suggestions on how I can better understand histogram data in layman terms..

In short I think I'm looking for a Histogram for Dummies lesson... :)

Thanks...
 
Thank you.. I'll go check that one out..
 
Thanks for sharing.
 
This type of histogram represents the distribution of all the pixels in the picture. The axis going from left to right or the "x" axis represents the value of the pixel or otherwise it's amplitude. The vertical or "y" axis represents the number of pixels at each amplitude value. For an eight bit system there will be 256 horizontal or x values shown. The left side of the graph starts at the value of zero and goes to the value of 256 on the right. The maximum value on the y or vertical axis is the number of pixels at that particular value. The area under the histogram curve will be the total number of pixels. So if the sensor contains a million (1000000) pixels there will be million values on the histogram graph.
A perfectly uniform picture would be represented by a single vertical line 1000000 pixels high at the value representing the uniform picture or its brightness. So if the picture was was half its maximum brightness that line of amplitude 1000000 would be shown at the middle of the graph at a value of 128.
If the whole picture was of a checkerboard, where the bright squares were at maximum amplitude of 256 and the dark squares were of amplitude zero, the histogram would be of two lines each 500000 pixels high located at the horizontal values of zero and 256.
A real picture would have some pixels at generally all values on the horizontal or x axis. The bright areas, like glints or shiny spots would be located more to the right side of the graph and the dark or shady areas would tend to be at the left of the graph.
Looking at a real picture histogram gives one a sense of exposure distribution. If your picture is overexposed then the pixels will tend to pile up towards the right side of the graph and underexposed pictures will pile up more at the low or dark side of the picture.
A picture of a real uniform surface will be shaped like a narrow spike with some width and height. This spike if examined closely, will have Gaussian or bell shape to it, though it may be very narrow. The width of this spike would represent the amount of noise in the picture.
 
I've got a grasp on the concept of the histogram. Left to Right.. Darks to Lights.. But.. I'm still working on understanding what the actual histogram is telling me about the picture... Can someone offer some tips and/or suggestions on how I can better understand histogram data in layman terms..

In short I think I'm looking for a Histogram for Dummies lesson... :)

Thanks...

In layman's terms then:

You're off to a good start by using the term "data" in your question. A digital photo is digital data. The histogram is a graph of that data. Critical points:

1. The graph contains two threshold limits -- the left and right walls. No data is recorded beyond those threshold limits. One of those "duh" kind of points but really important. Those two threshold limits have a direct and real connection to our physical world of photographic reality. The left limit (black) is the blackest ink we can make and the right limit is the whitest paper we can make. If we put that black ink on that white paper we're making a photographic print. The engineers who originally established the parameters of that histogram were very pragmatically focused in what they were doing. It has direct practical application in that more data -- data beyond those two limits -- can't be forced onto a final print. The histogram therefore is a graph of how your digital data will ultimately print. If you're breaking either threshold limit then your final print will either contain black holes devoid of any detail or white holes nuked into oblivion.

2. The histogram is a graph of your processed RGB data and not a graph of what your camera sensor recorded. (It is possible to graph the data your sensor captures but this is not commonly done). Again since the histogram is designed to be a representation of how your data will ultimately print it is drawn from an RGB photo that has been processed with that goal in mind. That processing is either done by the software in your camera (JPEG) or by you from the raw file. A camera raw file contains the full data set recorded by the sensor and can be processed to different results. HERE'S THE POINT: The RGB histogram you see is a sub-set of the sensor data and it is much less data than the sensor recorded -- it is processed data. This is important because we want to understand that the processing that was done could have been done differently or still can be done differently if a raw file is available.

3. We can define general rules for what makes a good photo. There will always be exceptions of course, but they are exceptions. The exceptions can be talked about as a special topic for example night photography. We can relate the general rules to the histogram.

Rule #1: A good photo has black in it. This relates to the histogram because when we look at the graph we want to see that it reaches the far left corner. It's even OK for the histogram to begin to pile-up against the left wall (threshold limit) a little -- just a little. Small scattered shadows in a sunlit scene that are full black are OK and in fact expected. Here's a judgement call: if that black shadow comes together and gets large enough it becomes a black hole and we all know what black holes do.

Rule #2: If the histogram doesn't reach the left corner the photo better be an exception as in a photo of clouds in the sky. That would be a case where no black in the photo is OK.

Rule #3: There are two kinds of highlights, diffuse and specular. A diffuse highlight has texture and color -- puffy white clouds for example. A specular highlight is a reflection -- think chrome on a motorcycle in the sun. If your photo has specular data then the histogram should show that data as piled up against the right threshold wall; it's pure white. If your photo has only diffuse highlights they should graph as close to the right corner as possible without hitting the threshold wall otherwise they lose their detail and color.

Rule #4: A good photo has an overall tone-response (contrast) that makes it look faithful (maybe a little better) to the original scene. Again we get into areas of judgement call here, but as a general rule of thumb you're photo won't have good overall tone-response if the histogram is falling short of either or both corners. A compressed histogram (missing the corners) is almost always a bad photo.

Joe
 
So what about manipulating the histogram to effect changes to the data?
 
So what about manipulating the histogram to effect changes to the data?

You manipulate the data and pay attention to the histogram to make sure that you haven't mangled the data.

Are you referring to the histogram you see on the camera or the histogram you see in editing software?

Joe
 
I am talking about the histogram I see while editing...
 
I am talking about the histogram I see while editing...

I noticed from your baseball photo (different thread) that you have a Canon sx50. That camera can save an RGB JPEG or a CR2 raw file or both. What you do in editing and how you think of the histogram is going to be somewhat different depending on which of those you're working with.

Sparky who hangs out here has a good analogy for the difference. The CR2 file is all the raw ingredients you need and could typically want to cook an awesome burger. The RGB JPEG is a Big Mac handed to you through a window in the side of a building as you drive by. If you don't like the Big Mac tough or you're going to try and fix it? Seriously?! You think you can make it better? With the CR2 file nobody's going to hand it to you as you drive by -- you need to know how to cook.

1. The camera JPEG: It's already been processed. If you don't like the way it looks you should go back to the point where it was processed -- the raw sensor capture -- and get it right. If you're going to edit that JPEG what you're really doing is trying to repair an already damaged product; fix a Big Mac. Most chefs would rate your odds pretty low of ending up with a great burger if you start with a Big Mac. First, scrape off the secret sauce....

If the camera software has already done irreparable damage you start out checkmated. For example if the histogram indicates that the diffuse highlights (white ball players uniforms in the sun) have been smeared all over the right threshold wall of the histogram then the data you need isn't there. If there's no data then there's nothing for you to edit: checkmate.

Hardcore purists will insist that it's always wrong to edit a camera JPEG because you can't avoid ancillary damage created by the compression grid when you manipulate it. It was designed not to be manipulated. Now while I wrote that a million people just did it and before I finish this post millions more will do it. A lot of them will sell the result (McDonald's sells Big Macs). The damage caused by editing a JPEG starts out pretty minor and if you're reasonable about it, the convenience of shooting a JPEG and making a few tweaks later versus processing a raw file can save you considerable time.

Critical: You need a JPEG with as much data as possible. It is therefore essential that you have the camera skills and are familiar with your camera's processing software so that you don't get checkmated from the start (two paragraphs above). You begin by examining the histogram and you're first concern is that it extend over the full range from left corner to right corner without breaking the threshold limits. If it doesn't reach the two corners a Levels correction will repair that. In making the edit you must do as little damage as possible and DO NOT LOSE DATA. Losing the data you already have can't be a good thing -- you're manipulating it not discarding it.

Once the histogram extends over the full range of the graph you assess the tone-response of the photo. Is it too light or too dark? Does it need more contrast. Levels and/or Curves and various contrast controls will allow you to adjust that. (Don't know what software you're using).

2. A camera raw file (CR2 in your case): My favorite analogy here is a ruler and a yardstick. A one foot ruler is your finished RGB photo which would include the camera JPEG. This is the photo that will print. This is the photo in which the histogram is really a graph of your data processed for output where the left corner black really is black ink and the right corner white really is white paper. The blackest ink on the whitest paper is a fixed and limited range. The histogram reflects that and let's think of that as a one foot ruler -- a fixed data set -- 12 inches. The sensor in your camera can record 36 inches. It's actually a pretty close analogy, depending on your camera model, it's sensor records between 2 to 3 times as much data as your output target is limited to. If you're using a camera raw file you've actually got too much data or rather more data than you can stuff onto the ruler. The process of editing a raw file is managing the reduction as you take 30 inches of data and make it fit into that 1 foot histogram.

In this case the software you're using is showing you your final output histogram and it's helping you adjust the data to fit. The difference is that, until you push the commit button you're plugged into the full 30+ inches that the sensor recorded. You have to end up in the same place: a final RGB output file but you're working with a whole lot more original data and the raw conversion software is engineered to assume as much and help you take advantage. You're seeing the same histogram and your ultimate goal is the same. You generally want to see a histogram that extends corner to corner and does not slam up against the right threshold wall or pile up too much against the left threshold wall.

Joe

edit: I got carried away.
 
Very good explanation, Joe. So, in wanting corner to corner coverage, how does "shooting to the right" figure into this? Can images be exposed to the right while still having corner-to-corner coverage?
 

Most reactions

New Topics

Back
Top Bottom