Transcript
Page 1: What does the histogram of an image show?

TECHNO BYTES Q & A

What does the histogram of an image show?Demetrios J. Halazonetis, DDS, Dr Odont, MSAthens, Greece

Let’s assume that we have a grayscale image (eg,a cephalogram). Each pixel has a certain valuethat ranges from 0 (complete black) to 255

(pure white). The histogram of an image shows thenumber of pixels in the image at each of the 256different intensity levels. Values start from 0 on the leftside of the histogram and extend to 255 at the right side.Figure 1,A, shows a sample headfilm and its histogram.We can conclude several things from the histogram.First, because it does not extend over the whole rangefrom 0 to 255, we know there are no completely whiteor completely black pixels in the image; it consistsmostly of intermediate grays and therefore lacks con-trast. Second, most of the pixels are toward the darkside (of the force), and the image is correspondinglydark.

Changing the brightness of an image shifts thewhole histogram toward the left or the right. Figure 1,B, shows the same image as before, but with thebrightness increased. In Figure 1,C, the brightness hasbeen increased too much, and some of the pixels falloutside the allowed range of values and are clipped to

the highest value of 255. This results in washed-outareas in the image, and the histogram displays a verytall column at the far right edge.

Changing the contrast of an image has the effect ofexpanding or constricting the histogram range. Figure 2shows this effect. Notice that if contrast is increased, asin A, the histogram expands, and gaps appear. Ifcontrast is reduced, as inB, the histogram tightensup—too much, in this case.

Histograms are very useful for diagnosing imagesand pointing toward ways to improve them. Figure 3shows some common histogram patterns. InA, thepixels cover the whole range from 0 to 255 with nobreaks. This is what we should usually aim for. InB,the histogram is concentrated in the middle part. Thereare no black or white pixels, only intermediate grayones, and the image does not have enough contrast. InC, the histogram is shifted toward the black part and theimage appears too dark, but inD, the histogram isshifted toward the right, and the image is too bright. InE, the histogram shows slender spikes that signify noisein the image. This is typical of dark areas where mostscanners have difficulty reading the image. The histo-gram in F is not continuous but has breaks. Thisindicates that the image has less than the total range of256 shades of gray (there are only 50 different levels inthis image). This is usually the result of manipulatingthe image.

Assistant professor, Orthodontic Department, University of Athens DentalSchool, Athens, Greece.Reprint requests to: D. Halazonetis, 6 Menandrou St, Kifissia 145 61, Greece;e-mail, [email protected] and accepted, November 2003.Am J Orthod Dentofacial Orthop 2004;125:220-20889-5406/$30.00Copyright © 2004 by the American Association of Orthodontists.doi:10.1016/j.ajodo.2003.11.008

220

Page 2: What does the histogram of an image show?

Fig 1. A. Sample image and its histogram; B, brightness has been increased; C, brightness hasbeen increased too much, and some pixels fall outside range.

Fig 2. A, Same headfilm but with contrast increased; B, with contrast decreased.

American Journal of Orthodontics and Dentofacial OrthopedicsVolume 125, Number 2

Techno bytes Q & A 221

Page 3: What does the histogram of an image show?

Fig 3. A, Pixels cover whole range from 0 to 255 with no breaks. This is what we should usually aimfor. B, Histogram is concentrated in middle part. There are no black or white pixels, onlyintermediate grays, and image lacks contrast. C, Histogram is shifted toward black, and imageappears too dark. D, Histogram is shifted toward right, and image is too bright. E, Histogram showsslender spikes that signify noise in image—typical of dark areas where most scanners have difficultyreading image. F, Histogram has breaks, indicating image has less than 256 shades of gray (thereare 50 different levels in this image). This usually results from manipulating image.

American Journal of Orthodontics and Dentofacial OrthopedicsFebruary 2004

222 Techno bytes Q & A


Recommended