What is a histogram and why should you care?

Featured header image from http://www.photoplusmag.com/

The concept of a histogram originates back to a statistical mathematician named Karl Pearson (1857-1936). It is basically a graph that shows amounts of different types of values within a finite set of data. The typical histogram will group together similar values in a single bar. In photography, we make histograms for both brightness (greyscale values) and for the brightness of red, green and blue colors (RGB). Anything can be represented in histograms, so you are likely to see other distributions as well. In the first image example below you see Lightroom’s histogram, where you can clearly see yellow, cyan and magenta as well as red, green and blue.

Usually we mostly focus on just the greyscale histogram when trying to get the exposure right, so I will focus this article on just that. Also, in theory, when grasping the concepts of the histogram for greyscale you will be able to apply the same basics for other histograms as well.

When the camera builds its basic brightness histogram, it looks at all the pixels in the picture and basically converts them to black & white. Every pixel will be represented in some end of a greyscale.


A typical histogram with y and x-axis defined for this article.

To the left you see an example for a histogram for a standard portrait picture with a black background. Lets take a second to look at the different axises and what they mean. The x-axis here is the different levels of brightness. From utter blackness to the left, to completely white to the right. Say the line to the very left represents pixels with brightness from 0 to 2. The higher up the graph goes above this point, the more pixels of that brightness is present in the picture.

In other words, the histogram tells us something about the distribution of brightness, or exposure, in the picture. Usually, you want there to be some pixels of every range within the histogram, but not too much completely white, nor too much completely black. This all depends on the picture however. The histogram shown here (with the axises) has a lot of really dark pixels, but this was a deliberate choice for the picture I wanted. Lets go for an example.

If you look at the pictures below, specifically now the left one, you see a mosque on the southern end of Gibraltar. It is supposed to be white, but because of different lighting conditions there, the picture got a little under exposed. Look at the histogram in the corner of the picture. It is pretty evenly distributed, but there is a serious lack of very bright pixels here. There is also not a lot of black pixels, but looking at the picture you also see that there is not really supposed to be many of those either. The mosque is however a rather large part of the picture and should obviously be white and rather bright.

Normally, we can try to fix this by altering brightness and/or blacks/fill light, but in cases like this where the dark seems to be pretty ok already, we can use “tone curve”. Tone curve in Lightroom allows you to take a bit more control of what kind of aspects of the image are altered. It has highlights, lights, darks and shadows to be altered.  In this situation I would like to simply make the lights and highlights brighter, but keep most of the other things as they are.

After increasing the brightness of already-“bright” pixels in the picture, we get a picture that looks like the one to the right.

histogram correction

Histogram demonstration: Before and after exposure corrections

 Understanding and using the histogram is not something you only use when post processing images in Lightroom (or some other editing software). Most cameras have the ability to create a histogram for the pictures you’ve taken. It can be very difficult to be able to study the picture on the camera screen and be able to tell that the picture is indeed well exposed. A picture may look just right on the camera screen, but when you get it into the computer it may prove to be under exposed. So how do you fix this without having to go out and try the same again? Simple: Study the histogram to get an idea of how well exposed the picture actually is.

Remember that you must always consider what it is you are photographing. While it is usually desired to have a pretty even distribution of greys in the histogram, not all images will always have completely black and/or completely white pixels in it. Consider a picture of a blonde woman wearing bright clothes in the snow at day time. There is bound to be almost no black or dark pixels in this picture. Trying to force the histogram to reach down to the darker areas here will likely result in an underexposed image.

Another thing that you may find: Say you are taking a picture of a model outside in the shade. In the background the sun is shining, lighting up parts of the background. You feel you are correctly exposing your model, but the histogram on the camera says that there is an abundance of super-bright pixels in the picture. This is only natural because of the sunlight in the background and does not necessarily mean that the picture is over exposed, even though there are blown out pixels in the shot. It can in fact be a look many photographers like and will intentionally make this happen. In cases like this we look more closely at the subject, or the model in the picture and look at how well he/she is exposed. So how can the histogram help us now? Simple.

While it is true that the histogram looks at the entire picture, you can still zoom in, or move closer to the model, and make sure that for example the face fills the entire shot. By doing this you can look at the histogram and get an idea of how the models face will look in a shot that includes a blown out background (or an underexposed background of course).

Take a look at the shots below. A traditional portrait setup where I intentionally blew out the background. Because I wanted the background blown out, I knew the histogram would show a large number of absolutely white pixels. I could therefore not use this to judge wether or not the model would be well exposed. By first zooming in on the model I could take a picture of just the face and get an idea of wether or not the exposure would be ok.

histogram crop

Histogram of a portrait with a blown out background, and the histogram of a picture containing just the face.

Looking at the histogram of the zoomed in picture I see there are a few bright pixels here. Considering the image I can however deduce that they are probably because of the flash glare in the eyes for example. Besides these, there are very few bright pixels until I reach the mid-tones of the image. Considering her skin there should be more of the brighter pixels than this. I then adapt the settings on my camera to expose an extra 0.5 or 1 stop, zoom out and start shooting pictures of the model that are now more likely to be a good exposure of my model than before. While I am pretty sure I would still be able to make the picture look good using Lightroom, it is always desirable to have as close to perfect exposure from the get go.

Hopefully this will have brought you somewhat closer to understanding histograms and why they are your friend. A great deal of experimentation may be necessary to truly grasp the concepts, (I do not feel I have complete control myself), but the more you actually use the histograms the better your images will be. You can always save a lot of details in post processing, but you should always strive to get it as right as possible to begin with. The less post processing needed the better!

Leave a comment