Studio Notan LEARNING HUB
Launch Studio
Trace a photo

Histogram

A picture of how many pixels there are at every tone.

The histogram is a census of tones. For each of the 256 levels from black at the left to white at the right, it draws a bar as tall as the number of pixels at that level. It is the one place where you can see what the threshold is about to cut, and why a cut in one place comes out clean while a cut in another frays.

What it does

The histogram counts the image that the rest of the Trace controls work on, the score image. With “Separate by” set to “Brightness”, that is the photo as gray: the channel chosen in “Gray from”, after “Brightness” and “Contrast”. With “Color”, it is a score of how near each pixel is to your front colors rather than your back ones. Pixels like a back color pile up at the left, pixels like a front color at the right, and a pixel exactly as near to both sides sits at 128, in the middle.

Two layers are drawn one over the other:

  • The faint layer is the score before “Black”, “Mid” and “White”: before levels.
  • The ink layer is the score after levels and after “Blur”. These are exactly the values the threshold will cut.

Each layer is scaled so that its own tallest bar reaches the top, so compare their shapes rather than their heights. Under the chart sit the handles for the levels: a black triangle for “Black”, a gray diamond for “Mid” and a white triangle for “White”. The colored line standing across the chart is the threshold, called “Balance” in color mode. Drag any of them. A press within about 12 pixels of a handle takes that handle; a press anywhere else moves the threshold straight to that spot, because the threshold is the handle most often wanted, and turns “Auto” off.

“Scale” switches the drawing between “Linear” and “Log”. Linear draws each bar in proportion to its count. Log draws the logarithm of one more than the count, which lifts small counts into view: useful when one tone swamps the rest, as a white wall or a pale sky does, and everything else lies flat along the floor. The switch changes only the drawing, never the trace.

  • The histogram is counted on the preview copy of the photo, at most 1024 pixels on its long side, and redrawn a little over a tenth of a second after you stop moving a control. “Trace” itself works on the working copy, at most 2048 pixels; its histogram has the same shape, with larger counts.
  • Around a skewed photo there are pixels that are not photo at all. They are left out of the count.
  • Stretch the levels with no blur and the ink layer turns into a comb. The levels have been pulled apart, and no pixel can land in the gaps between them. Blur fills the gaps in, because averaging makes in-between values.

Why it works this way

A threshold is a number from 0 to 255, and a number means nothing until you can see where the pixels are. A photo that will make a good notan usually draws two humps: a hill of darks, a hill of lights, and a valley between. Put the threshold in the valley and few pixels lie near the cut, so a little noise or a slight change of light barely moves an edge. Put it on the side of a hill and thousands of pixels sit right at the cut; the edges fray into specks and the two-tone preview crawls with them. The histogram shows you the valley before you go looking for it.

The faint layer is there so that you can see what the levels did. If the ink layer has been shoved hard against one end, you have clipped: many tones have become one, and no threshold can tell them apart again. With both layers in view you can judge that at a glance, without flicking between before and after.

In color mode the histogram answers a different question: how well your chosen colors divide the photo. Two tall humps at the far ends mean the picks describe the photo well. A broad lump in the middle means many pixels are like neither side, or like both, and are waiting for “Balance” to decide them. Picking another color for one side, in Front and back colors, often empties the middle.

The metaphor

The histogram borrows the photographer's light meter, and the habit of mind that Ansel Adams called visualization: seeing, before the shutter opens, where each part of the scene will fall on the scale from black to white. A meter reads one spot at a time. The histogram reads every spot at once and sorts them into bins, like a census that counts a town's people by age.

That is also where the metaphor breaks, because a census does not record where anyone lives. A histogram has no geography. It says how many pixels are dark, never where they are: a black cat on a white floor and a fine black-and-white check can draw the very same two humps. It cannot tell one bold shape from ten thousand specks, which is why “Blur” and “Detail”, the controls that work in space, sit below it.

A history

In art

Painters never counted pixels, but they have always weighed the share of dark against light. Arthur Wesley Dow took up the Japanese word notan, which Ernest Fenollosa had brought to America, and made the arrangement of dark and light one of the pillars of Composition (1899), his book of exercises for students and teachers; Georgia O'Keeffe was among his students. His exercises ask how much of a design is dark, how much light, and how the masses sit together. The first half of that is the histogram's question. The second half it cannot answer.

The nearest thing to a histogram in an artist's hands is the Zone System, which Ansel Adams and Fred Archer worked out while teaching at the Art Center School in Los Angeles around 1939–40. It divides the scale from black to white into eleven zones, numbered 0 to X, each one photographic stop from its neighbor, with Zone V the middle gray that a light meter assumes. A photographer metered the parts of a scene, placed an important shadow on a chosen zone, and knew where everything else would fall: a histogram built by hand, one reading at a time. Digital cameras now draw the real thing on their screens, and photographers read it for Adams's purpose, to see whether the whole range from shadow to highlight has been caught.

In printing

The measuring of tone began with Ferdinand Hurter and Vero Charles Driffield, who in 1890 published a study of how photographic plates respond to light. They measured the darkness of a developed plate as its density, a logarithmic measure, and plotted it against the logarithm of the exposure. Their S-shaped graph, the characteristic or H&D curve, founded sensitometry and densitometry: the science of how much light a material records and how dark it comes out. Printers inherited the densitometer, and press operators still use one to read the strength of the ink on a sheet.

Tone is at home on a logarithmic scale. Each stop of exposure doubles the light, and each whole unit of density cuts it to a tenth. The “Log” switch borrows that habit: it lets a hundred pixels and a million share one chart without the hundred vanishing.

In technology

Bar charts are older than photography: William Playfair drew them in his Commercial and Political Atlas of 1786. The word histogram arrived a century later, from the statistician Karl Pearson, who used it in his lectures in the early 1890s and put it in print in 1895. He built it from the Greek histos, something set upright, such as a mast: the upright bars. When pictures became grids of numbers, the histogram was among the first tools pointed at them. Count the pixels at each of 256 levels, the range of eight bits and of this chart, and you have the picture's tonal economy at a glance.

A whole family of image-processing methods works on the histogram alone, without once asking where a pixel is. The best known of them, for this app, is Nobuyuki Otsu's automatic threshold of 1979, which reads the histogram and finds the cut that divides it best. It is what “Auto” does.

In professional software

Most image editors draw this chart, and they all call it a histogram: black at the left, white at the right, a bar for each level. Most digital cameras draw one on their screens as well. Once you can read its shape here, you can read it anywhere.

  • Adobe Photoshop. ‘Window › Histogram’ opens a panel that follows every change; its ‘Expanded View’ adds a ‘Channel’ menu and statistics such as the median. While you adjust the image, the panel draws the original histogram faintly behind the new one, much as Studio Notan draws its two layers. The Levels and Curves dialogs carry histograms of their own.
  • Adobe Lightroom Classic. The histogram sits at the top of the right-hand panels in the Develop module. The triangles in its upper corners warn of clipping, and J marks clipped shadows in blue and clipped highlights in red on the photo itself. Drag across the histogram and it moves the tone slider for that stretch of the scale, from ‘Blacks’ at the left to ‘Whites’ at the right.
  • GIMP. ‘Windows › Dockable Dialogs › Histogram’ opens it, with a pair of buttons that do what Studio Notan’s Scale switch does: linear or logarithmic. The Levels, Curves and Threshold dialogs have the same pair.
  • Autodesk AutoCAD. The Raster Design toolset that comes with AutoCAD, made for working with scanned drawings and maps, has a ‘Histogram’ dialog on its ‘Raster Tools’ tab. Its tabs adjust the tones of a scan and, on the ‘Threshold’ tab, turn a grayscale scan into pure black and white.

What carries over. Read the shape before you touch a slider. Two humps with a valley between promise an easy split; a tall spike hard against either end means detail has already been clipped away; gaps like the teeth of a comb mean the levels have been stretched. One difference to remember: a photo editor’s histogram counts the photo itself, while Studio Notan’s counts the score image, which in color mode measures nearness to your chosen colors rather than brightness.

Try this

  • Set “Preview” to “Two-tone”, then press the histogram in the valley between two humps, and then on the side of the biggest hump. Watch the edges fray.
  • Drag “White” down until it meets the ink layer. The faint layer stays put while the ink layer stretches and grows teeth; raise “Blur” to 1 and watch the teeth fill in.
  • Open a photo with a big plain background and switch “Scale” from “Linear” to “Log”. The small hump of your subject rises out of the floor.

Going further

Read on in Levels: black, mid, white, Threshold, Auto and Invert and Separate by.

  • Ansel Adams, The Negative
  • Arthur Wesley Dow, Composition
  • Edward Tufte, The Visual Display of Quantitative Information

Every chapter is about something you can do in the studio, free, in the browser.

Try it in the studio