Using
Gray Level Histogram Specification to Improve the Quality of Digital Image
Ning Yu
ningyu@siu.edu
Gray Level Image
Usually,
the images are captured as a color image, not a gray level image by common digitizing
devices, such as Digital Camera. In term of the property of light intensity,
the color image is converted to the gray level image according to the following
equation. G = R*0.299+G*0.587+B*0.144
The
following graph is the color image.

Figure
1. The Original Image.
Figure
2 is the image converted from the color image. For true color images, there are
24bits for every pixel. Red, green and blue separately occupy one byte. Gray
level images are received by calculating the R, G and B. And the gray level value is the result of the
calculation of priority RGB at every pixel.

Figure
2. The Gray Level Image.
Figure
3 is the histogram of the gray level. The histogram indicates that most of the
pixels are too dark. Only the minority of pixels are light. So what we need to
do is to make the image clear to view the scene and the character.

Figure
3. The Histogram of Figure1
Histogram Equalization
The
histogram-equalized image will span a fuller range of the gray scale without
the need for further parameter specifications. The Figure 4 is the result of
histogram equalization.

Figure
4. The Image Through Histogram Equalization.
And
the histogram graph is in Figure 5. In figure 4, we can discern the scene, but
the character’s appearance can not be distinguished. Our goal is to discern
both of the foreground and background. So, although histogram equalization can
scale the histogram linearly and smoothly and do it automatically, the result
of image processing does not satisfy our need.

Figure
5. The Histogram of Figure 4.
Histogram Matching
Histogram
Matching, also called Histogram Specification. As indicated in the preceding
discussion, histogram equalization can determine a transformation function
automatically. Although automatic enhancement is desired and it is a good
approach, in many situation, E.g. the forementioned figure, the histogram
equalization is not the best approach. In particular, it is useful sometimes to
be able to specify the shape of the histogram that we could have the best
processed image. The method in which we specify the histogram is called
histogram matching.
The
Figure 6 is manually specified.

Figure
6. The Specified Transform Function.
The
Figure 7 is the result of histogram specification.

Figure
7. The Image Through Histogram Specification.
The
Figure 8 is the histogram of histogram
specification.

Figure
8. The Histogram of Figure 7.
Noise Analysis
Obviously,
some noises exist in the image. How to eliminate this noise pollution should be
considered. The following graph is the
result of using Median Filter.

Figure
9. The graph of applying the Median filter.
The
noises are still there. Analyzing the
original image, we know this is a picture taken at night, which is similar to
the pictures taken by the astronomical telescope in the dark space. So we can
guess that noises are superimposed by the camera sensor. To solve the problem
of sensor noise, the best way is to average lots of images or increase the time
of exposure of camera sensor. To illustrate the technology of the image
enhancement, I think, the effect is enough.
Conclusion
We can draw a conclusion that histogram equalization is a
good approach for digital image processing in spatial domain, having the
histogram more smoothly and making the image clearer. However, for some
specific images, we still need to specify the particular transformation
functions to receive the best processing result. It depends on your need and
the specific images. In sum, histogram approach is a good method to help
professionals obtain the details of images in spatial domain, which is very
significant for researching and studying.