Digital Signal Processing Reference
In-Depth Information
8
7
6
5
4
3
2
1
0
0
1
2
3
4
5
6
7
Scale level
FIGURE 14.11
Histogram in Example 14.4.
Based on the grayscale distribution counts, the histogram is created as shown in Figure 14.11 .
As we can see, the image has pixels whose levels are more concentrated in the dark scale in this example.
With the histogram, the equalization technique can be developed. Equalization stretches the scale
range of the pixel levels to the full range to improve the contrast of the given image. To utilize this
technique, the equalized new pixel value is redefined as
p eq m; n ¼
Number of pixels with scale level pðm; nÞ
Total number of pixels
ð maximum scale level Þ
(14.5)
The new pixel value is reassigned using the value obtained by multiplying the maximum scale level by
the scaled ratio of the accumulative counts up to the current image pixel value over the total number of
pixels. Clearly, since the accumulative counts can range from 0 up to the total number of pixels, the
equalized pixel value can vary from 0 to the maximum scale level. It is due to this accumulation
procedure that the pixel values are spread over the whole range from 0 to the maximum scale level
(255). Let us look at a simplified equalization example.
EXAMPLE 14.5
Consider the following image (matrix filled with integers) with a grayscale value ranging from 0 to 7, that is, with
each pixel encoded using 3 bits:
2
4
3
5
01226
21121
13433
 
Search WWH ::




Custom Search