This series of photographs and their associated histograms covers indistinctly shaped histograms, i.e. images which have a histogram which does not really have any distinct shape.
Histogram 1: Dark depths
This is a good example of a low-key image, but contains content which makes this an aesthetically pleasing image. The histogram shows as asymmetric unimodal, tiered towards the darker tones. The dark tones, ①, are naturally provided by the black hull of the ship, the dark vegetation, and the water. The midtones, ②, are associated with the lighter vegetation, and the ships reflection in the water. The larger of the two peaks in the highlights, ③, is the side of the ship, and the building on-shore, and the smaller one, ④, basically is the white on the front of the ship.
Histogram 2: Light buildings
This is an excellent example of an image (Bergen, Norway) which has white clipping, but it doesn’t have much to do with blown-out regions. The whites in the image are entirely associated with the sides of the two larger buildings which are exposed to direct sunlight. This is not a distinct multipeak histogram, but it is divided into four tonal zones: ① the shadows; ② the midtones; ③ the upper midtones and highlights; and ④ the whites.The sun was intense on this day leading to a slightly paler sky, and bleached buildings facing into the sun.
Histogram 3: Red train
This image of a train at the station in Voss (Norway) which has a histogram which covers a broad range of tones. The image has good contrast overall with only two distinct peaks: ① Values 87-124 comprise most of the red and dark gray portions of the train, as well as fine detail throughout the image; and ② Values 234-245 comprises the edge of the train roof. Images which contain a lot of detail and varied tones typically produce histograms containing a lot of “spiky” detail.
This series of photographs and their associated histograms covers multipeak-unimodal histograms, i.e. images which have a histogram which has a core unimodal shape, yet is festooned with peaks.
Histogram 1: A statue against the sky
This image, taken near Glasgow Scotland, has a broad spectrum of intensity values. The histogram has an underlying core “unimodal” shape, bias towards highlights, a result of both the statue and the clouds. The image has exceptionally good contrast. The jagged, multipeak appearance is an artifact of the broad distribution of intensities, and intricate details, i.e. non-uniform regions, in the image.
iPhone 6s (12MP): 4.15mm; f/2; 1/3077
Histogram 2: Oslo lion
This image, taken in Oslo (Norway), is the “poster-boy” for good histograms (well almost). It has an underlying unimodal shape, mostly in the midtones. It is a well-formed image with good contrast and colour. There are shadows in the image, but that is to be expected considering the clear sky and the orientation of the sun. There are no pure blacks in the image, the shadow tones created by the dark windows. There are also few whites, less than 1% of pixels, that are the result of light reflecting off light surfaces (such as the lion).
iPhone 6s (12MP): 4.15mm; f/2; 1/1012
Histogram 3: Plateau river
This image, taken from a moving train on the Bergen Line in Norway, high up on a mountain plateau. The histogram has an underlying core unimodal shape, composed predominantly of midtones, in addition to the lighter end of the shadows (①). There are no blacks and few highlights to speak off. The image has exceptionally good contrast. The jagged, multipeak appearance is an artifact of the image detail, i.e. non-uniform regions, in the image. For instance the sky tapers gradually from 150 to 190 near the top of the hill.
This series of photographs and their associated histograms covers aesthetically pleasing bimodal histograms.
Histogram 1: A sky with texture
This image (of a building in Edinburgh) has a broad spectrum of intensity values. The histogram is bi-modal with two distinct humps. The right peak is associated with the overcast sky (and white van). The left shallow mound comprising both midtones and shadows makes up most of the remaining image content. There is a small flat region in between the two that makes up features like the lighter portions of the building. Note that pixels maps on the right of the histogram below show the associated pixels in black.
Histogram 2: Out on the lake
This photograph of the Kapellbrücke was taken in Lucerne, Switzerland. The histogram is bimodal, and asymmetric, and reflects the information in the image: the left hump (①) is associated with the lower portion of the image (shadows and midtones), and the right peak (② highlights) with the sky. There is relatively well contrasted image. The clouds have some good variation in colour, as opposed to begin pushed completely into the whites.
Fujifilm X10 (12MP): 7.1mm; f/9; 1/800
Histogram 3: Carved in stone
This is a photograph of the Lion of Lucerne, in Lucerne, Switzerland. It provides a classic asymmetric bimodal shaped histogram. The left mound, ①, contributes the images dark, shadowy regions, whereas the remaining, larger peak ②, bias towards highlights, defines most of the remaining image. It is well contrasted given that a shadow is cast on the sculpture as it is relief into the wall. The overlapping region between the two entities, ③, forms the transition regions from ① to ②, often visualized in the picture as regions of low “shadow”.
This series of photographs and their associated histograms covers good renditions of highlight clipping, i.e. photographs in which there are regions of white pixels, but they either genuinely exist in the image as white regions, or do not directly impact the aesthetics of the image.
Histogram 1: A bright overcast sky
The image was taken on a very overcast day in Montreal. This is a good example of an image with highlight-clipping in the histogram, which is neither good nor bad. The building itself does not suffer from a lack of contrast, although the non-sky region can be enhanced slightly with no ill effects on the sky (because it is already basically white). This is a common situation in outdoor, overcast scenes. In an ideal world, more texture and contrast in the sky would be great, but in reality you have to use what nature provides.
Histogram 2: White buildings
This photograph was taken in Luzern, Switzerland. It is a well contrasted image, with a somewhat indistinct, multipeak histogram. The pixels are well distributed over the range of intensities, except for the spike at values 240-255. Here highlight clipping seems as though it has occurred because there are quite a number of white pixels in the image. However this density of white pixels comes not from anything being overblown, but rather from the white buildings in the image (of which there are many).
Fujifilm X10 (12MP): 7.1mm; f/4.5; 1/950
Histogram 3: A bit of overblown sky
This photograph was taken in Grabs, Switzerland. The histogram is a nonuniform, and basically unimodal in shape, with the exception of a huge spike in the whites causing clipping. But this is a case of the highlight clipping not really affecting the core content of the image, i.e. it comprises the overblown sky in the top-left of the image. On a bright, partially overcast day, this is not an unusual scenario.
This is the first post in an ongoing series that looks at the intensity histograms of various images, and what they help tell us about the image. The idea behind it is to try and dispel the myths behind the “ideal” histogram phenomena, as well as helping to learn to read a histogram. The hope is to provide a series of posts (each containing three images and their histograms) based on histogram concepts such as shape, of clipping etc. Histograms are interpreted in tandem with the image.
Histogram 1: Ideal with a hint of clipping
The first image is the poster-boy for “ideal” histograms (almost). A simple image of a track through a forest in Scotland, it has a beautiful bell-shaped (unimodal) curve, almost entiorely in the midtones. A small amount of pixels, less than 1%, form a highlight clipping issue in the histogram, a result of the blown-out, overcast sky. Otherwise it is a well-formed image with good contrast and colour.
Histogram 2: The witches hat
This is a picture taken along the route of the Bergen-Line train in Norway. A symmetric, unimodal histogram, taking on a classic “witches hat” shape. The tail curving towards 0 (①) deals with the darker components of the upper rock-face, and the house. The tail curving towards 255 (③) deals with the lighter components of the lower rock face, and the house. The majority of midtone pixels form the sky, grassland, and rock face.
Olympus E-M5MArkII (16MP): 12mm; f/6.3; 1/400
Histogram 3: An odd peak
This is a photograph of the statue of Leif Eriksson which is in front of Reykjavik’s Hallgrímskirkja. It provides for a truly odd histogram – basically the (majority of) pixels form a unimodal histogram, ③ , which represents the sky surrounding the statue. The tiny hillocks to either side (①,②) form the sculpture itself – the left forming the shadows, and the right forming the bright regions. However overall, this is a well formed image, even though it may appear as if the sculpture is low contrast.
Sometimes a histogram is depicted logarithmically. A histogram will typically depict only large frequencies, i.e. histogram intensities with limited values will not be visualized. The logarithmic form helps to accentuate low frequency occurrences, making them readily apparent. In the example histogram shown below, intensity level 39 has a value of 9, which would not show up in a regular histogram given the scale, e.g. intensity 206 has a count of 9113.
Understanding shape and tonal characteristics is part of the picture, but there are some other things about exposure that can be garnered from a histogram that are related to these characteristics. Remember, a histogram is merely a guide. The best way to understand an image is to look at the image itself, not just the histogram.
Contrast is the difference in brightness between elements of an image, and can determine how dull or crisp an image appears with respect to intensity values. Note that the contrast described here is luminance or tonal contrast, as opposed to colour contrast. Contrast is represented as a combination of the range of intensity values within an image and the difference between the maximum and minimum pixel values. A well contrasted image typically makes use of the entire gamut of n intensity values from 0..n-1.
Image contrast is often described in terms of low and high contrast. If the difference between the lightest and darkest regions of an image is broad, e.g. if the highlights are bright, and the shadows very dark, then the image is high contrast. If an image’s tonal range is based more on gray tones, then the image is considered to have a low contrast. In between there are infinite combinations, and histograms where there is no distinguishable pattern. Figure 1 shows an example of low and high contrast on a grayscale image.
The histogram of a high contrast image will have bright whites, dark blacks, and a good amount of mid-tones. It can often be identified by edges that appear very distinct. A low-contrast image has little in the way of tonal contrast. It will have a lot of regions that should be white but are off-white, and black regions that are gray. A low contrast image often has a histogram that appears as a compact band of intensities, with other intensity regions completely unoccupied. Low contrast images often exist in the midtones, but can also appear biased to the shadows or highlights. Figure 2 shows images with low and high contrast, and one which sits midway between the two.
Sometimes an image will exhibit a global contrast which is different to the contrast found in different regions within the image. The example in Figure 3 shows the lack of contrast in an aerial photograph. The image histogram shows an image with medium contrast, yet if the image were divided into two sub-images, both would exhibit low-contrast.
A digital sensor is much more limited than the human eye in its ability to gather information from a scene that contains both very bright, and very dark regions, i.e. a broad dynamic range. A camera may try to create an image that is exposed to the widest possible range of lights and darks in a scene. Because of limited dynamic range, a sensor might leave the image with pitch-black shadows, or pure white highlights. This may signify that the image contains clipping.
Clipping represents the loss of data from that region of the image. For example a spike on the very left edge of a histogram may suggest the image contains some shadow clipping. Conversely, a spike on the very right edge suggests highlight clipping. Clipping means that the full extent of tonal data is not present in an image (or in actually was never acquired). Highlight clipping occurs when exposure is pushed a little too far, e.g. outdoor scenes where the sky is overcast – the white clouds can become overexposed. Similarly, shadow clipping means a region in an image is underexposed,
In regions that suffer from clipping, it is very hard to recover information.
Some describe the idea of clipping as “hitting the edge of the histogram, and climbing vertically”. In reality, not all histograms exhibiting this tonal cliff may be bad images. For example images taken against a pure white background are purposely exposed to produce these effects. Examples of images with and without clipping are shown in Figure 5.
Are both forms of clipping equally bad, or is one worse than the other? From experience, highlight clipping is far worse. That is because it is often possible to recover at least some detail from shadow clipping. On the other hand, no amount of post-processing will pull details from regions of highlight-clipping in an image.
In addition to shape, a histogram can be described using different tonal regions. The left side of the histogram represents the darker tones, or shadows, whereas the right side represents the brighter tones, or highlights, and the middle section represents the midtones. Many different examples of histograms displaying these tonal regions exist. Figure 1 shows a simplified version containing 16 different regions. This is somewhat easier to visualize than a continuous band of 256 grayscale values. The histogram depicts the movement from complete darkness to complete light.
The tonal regions within a histogram can be described as:
highlights – The areas of a image which contain high luminance values yet still contain discernable detail. A highlight might be specular (a mirror-like reflection on a polished surface), or diffuse (a refection on a dull surface).
mid tones – A midtone is an area of an image that is intermediate between the highlights and the shadows. The areas of the image where the intensity values are neither very dark, nor very light. Mid-tones ensure a good amount of tonal information is contained in an image.
shadows – The opposite of highlights. Areas that are dark but still retain a certain level of detail.
Like the idealized view of the histogram shape, there can also be a perception of an idealized tonal region – the midtones. However an image containing only midtones tends to lack contrast. In addition, some interpretations of histograms add additional an additional tonal category at either extreme. Both can contribute to clipping.
blacks – Regions of an image that have near-zero luminance. Completely black areas are a dark abyss.
whites – Regions of an image where the brightness has been increased to the extent that highlights become “blown out”, i.e. completely white, and therefore lack detail.
Figure 2 shows an image which illustrates nearly all the regions (with a very weird histogram). The numbers on the image indicate where in the histogram those intensities exist. The peak at ① shows the darkest regions of the image, i.e. the deepest shadows. Next, the regions associated with ② include some shadow (ironically they are in shadow), graduating to midtones. The true mid-tonal region, ③, are regions of the buildings in sunlight. The highlights, ④, are almost completely attributed to the sky, and finally there is a “white” region, ⑤, signifying a region of blow-out, i.e. where the sun is reflecting off the white-washed parts of the building.
Figure 3 shows how tonal regions in a histogram are associated with pixels in the image. This image has a bimodal histogram, with the majority of pixels in one of two humps. The dominant hump to the left, indicates a good portion of the image is in the shadows. The right-sided smaller hump is associated with the highlights, i.e. the sky, and sunlit pavement. There is very little in the way of midtones, which is not surprising considering the harsh lighting in the scene.
Two other commonly used terms are low-key and high-key.
A high-key image is one composed primarily of light tones, and whose histogram is biased towards 255. Although exposure and lightning can influence the effect, a light-toned subject is almost essential. High-key pictures usually have a pure or nearly pure white background, for example scenes with bright sunlight or a snowy landscape. The high-key effect requires tonal graduations, or shadows, but precludes extremely dark shadows.
A low-key image describes one composed primarily of dark tones, where the bias is towards 0. Subject matter, exposure and lighting contribute to the effect. A dark-toned subject in a dark-toned scene will not necessarily be low-key if the lighting does not produce large areas of shadow. An image taken at night is a good example of a low-key image.
One of the most important characteristics of a histogram is its shape. A histogram’s shape offers a good indicator of an image’s ability to tolerate manipulation. A histogram shape can help elucidate the overall contrast in the image. For example a broad histogram usually reflects a scene with significant contrast, whereas a narrow histogram reflects less contrast, with an image which may appear dull or flat. As mentioned previously, some people believe an “ideal” histogram is one having a shape like a hill, mountain, or bell. The reality is that there are as many shapes as there are images. Remember, a histogram represents the pixels in an image, not their position. This means that it is possible to have a number of images that look very different, but have similar histograms.
The shape of a histogram is usually described in terms of simple shape features. These shape features are often described using geographical terms (because a histogram often reminds people of the profile view of a geographical feature): e.g. “hillock” or “mound”, which is a shallow, low feature, “hill” or “hump”, which is a feature rising higher than the surrounding areas, a “peak”, which is a feature with a distinctly top, a “valley”, which is a low area between two peaks, or a “plateau” which is a level region between other features. Features can either be distinct, i.e. recognizably different, or indistinct, i.e. not clearly defined, often blended with other features. These terms are often used when describing the shape of a particular histogram in detail.
From the perspective of simplicity, however histogram shapes can be broadly classified into three basic categories (examples are shown in Fig.2):
Unimodal – A histogram where there is one distinct feature, typically a hump or peak, i.e. a good amount of an image’s pixels are associated with the feature. The feature can exist anywhere in the histogram. A good example of a unimodal histogram is the classic “bell-shaped” curve with a prominent ‘mound’ in the center and similar tapering to the left and right (e.g. Fig.2: ①).
Bimodal – A histogram where there are two distinct features. Bimodal features can exist as a number of varied shapes, for example the features could be very close, or at opposite ends of the histogram.
Multipeak – A histogram with many prominent features, sometimes referred to as multimodal. These histograms tend to differ vastly in their appearance. The peaks in a multipeak histogram can themselves be composed of unimodal or bimodal features.
These categories can can be used in combination with some qualifiers (numeric examples refer to Figure 2). For example a symmetric histogram, is a histogram where each half is the same. Conversely an asymmetric histogram is one which is not symmetric, typically skewed to one side. One can therefore have a unimodal, asymmetric histogram, e.g. ⑥ which shows a classic “J” shape. Bimodal histograms can also be asymmetric (⑪) or symmetric (⑬).
Histograms can also be qualified as being indistinct, meaning that it is hard to categorize it as any one shape. In ㉓ there is a peak to the right end of the histogram, however the major of the pixels are distributed in the uniform plateau to the right. Sometimes histogram shapes can also be quite uniform, with no distinct groups of pixels, such as in example ㉒ (in reality though these images are quite rare). It it also possible that the histogram exhibits quite a random pattern, which might only indicate quite a complex scene.
But a histogram’s shape is just its shape. To interpet a histogram requires understanding the shape in context to the contents of the scene within the image. For example, one cannot determine an image is too dark from a left-skewed unimodal histogram without knowledge of what the scene entails. Figure 3 shows some sample colour images and their corresponding histograms, illustrating the variation existing in histograms.
Some people think that the histogram is some sort of panacea for digital photography, a means of deciding whether an image is “perfect” enough. Others tend to disregard the statistical response it provides completely. This leads us to question what useful information is there in a histogram, and how we go about interpreting it.
A plethora of information
A histogram maps the brightness or intensity of every pixel in an image. But what does this information tell us? One of the main roles of a histogram is to provide information on the tonal distributions in an image. This is useful to help determine if there is something askew with the visual appearance of an image. Histograms can be viewed live/in-camera, for the purpose of determining whether or not an image has been corrected exposed, or used during post-processing to fix aesthetic inadequacies. Aesthetic deficiencies can occur during the acquisition process, or can be intrinsic to the image itself, e.g. faded vintage photographs. Examples of deficiencies include such things as blown highlights, or lack of contrast.
A histogram can tell us many differing things about how intensities are distributed throughout the image. Figure 1 shows an example of a colour image, photograph taken in Bergen, Norway, its associated grayscale image and histograms. The histogram spans the entire range of intensity values. Midtones comprise 66% of pixels in the image, with the majority tiered towards the lighter midtone values (the largest hump in the histogram). Shadow pixels comprise only 7% of the whole image, and are actually associated with shaded regions in the image. Highlights relate to regions like the white building on the left, and some of the clouds. There are very few pure white, the exception being the shopfront signs. Some of the major features in the histogram are indicated in the image.
There is no perfect histogram
Before we get into the nitty-gritty, there is one thing that should be made clear. Sometimes there are infographics on the internet that tout the myth of a “perfect” or “ideal” histogram. The reality is that such infographics are very misleading. There is no such thing as a perfect histogram. The notion of the ideal histogram is one that is shaped like a “bell”, but there is no reason why the distribution of intensities should be that even. Here is the usual description of an ideal image: “An ideal image has a histogram which has a centred hill type shape, with no obvious skew, and a form that is spread across the entire histogram (and without clipping)”.
But a scene may be naturally darker or lighter rather than midtones found in a bell-shaped histogram. Photographs taken in the latter part of the day will be naturally darker, as will photographs of dark objects. Conversely, a photograph of a snowy scene will skew to the right. Consider the picture of the Toronto skyline taken at night shown in Figure 3. Obviously the histogram doesn’t come close to being “perfect”, but the majority of the scene is dark – not unusual for a dark scene, and hence the histogram is representative of this. In this case the low-key histogram is ideal.
Interpreting a histogram
Interpreting a histogram usually involves examining the size and uniformity of the distribution of intensities in the image. The first thing to do is to look at the overall curve of the histogram to get some idea about its shape characteristics. The curve visually communicates the number of pixels in any one particular intensity.
First, check for any noticeable peaks, dips, or plateaus. For example peaks generally indicate a large number of pixels of a certain intensity range within the image. Plateaus indicate a uniform distribution of intensities. Check to see if the histogram skewed to the left or right. A left-skewed histogram might indicate underexposure, the scene itself being dark (e.g. a night scene), or containing dark objects. A right-skewed histogram may indicate overexposure, or a scene full of white objects. A centred histogram may indicate a well-exposed image, because it is full of mid-tones. A small, uniform hill may indicate a lack of contrast.
Next look at the edges of the histogram. A histogram with peaks that are placed against either edge of the histogram may indicate some loss of information, a phenomena known as clipping. For example if clipping occurs on the right side, something known as highlight clipping, the image may be overexposed in some areas. This is a common occurrence in semi-bright overcast days, where the clouds can become blown-out. But of course this is relative to the scene content of the image. As well as shape, the histogram shows how pixels are groups into tonal regions, i.e. the highlights, shadows, and midtones.
Consider the example shown below in Figure 4. Some might interpret this as somewhat of an “ideal” histogram. Most of the pixels appear in the midtones region of the histogram, with no great amount of blacks below 17, nor whites above 211. This is a well-formed image, except that it lacks some contrast. Stretching the histogram over the entire range of 0-255 could help improve the contrast.
Now consider a second example. This picture in Figure 5 is of a corner grocery store in Montreal and has a histogram with a multipeak shape. The three distinct features almost fit into the three tonal regions: the shadows (dark blue regions, and empty dark space to the right of the building), the midtones (e.g. the road), and the highlights (the light upper brick portion of the building). There is nothing intrinsically wrong with this histogram, as it accurately represents the scene in the image.
Remember, if the image looks okay from a visual perspective, don’t second-guess minor disturbances in the histogram.