Sei sulla pagina 1di 4

1

A Novel Approach for Contrast Enhancement


Based on Histogram Equalization

D. González.
FCC, Doctorate in language and knowledge engineering BUAP. Puebla, Pue. México.
dm.gar93@gmail.com

Histogram Equalization (HE) assigns one gray level into two


Abstract—Histogram based techniques is one of the important different neighbor gray levels with different intensities.
digital image processing techniques which can be used for image If most of an image includes a gray level, Histogram
enhancement. One of the advantages of histogram-based
Equalization (HE) assign a gray level with higher intensity to
techniques is simplicity of implementation of the algorithm. Also,
it should be mentioned that histogram based techniques is much that gray level and it causes a phenomenon as we called it
less expensive comparing to the other methods. Histogram based washed out. Figure 1 shows this effect.
techniques for image enhancement is mostly based on equalizing In the past few years, there are several researches focused on
the histogram of the image and increasing the dynamic range image/video contrast enhancement [7]– [13]. Mean preserving
corresponding to the image. Histogram Equalization (HE) method Bi-Histogram Equalization (BHE) was proposed to overcome
has two main disadvantages which affect efficiency of this method.
the brightness preservation problems [8], [10].BHE separates
For solving the above problems, some techniques have proposed
for example using Bi Histogram Equalization (BHE) algorithm the input mage/video histogram into two parts based on input
instead of Histogram Equalization (HE). It should be mentioned mean before equalizing them independently.
that Bi Histogram Equalization (BHE) is one of the best proposed One of the improved histogram based methods is Dualistic
algorithm which has proposed until now. This paper presents a Sub Image Histogram Equalization (DSIHE). In this method,
novel algorithm for contrast enhancement based on Histogram first histogram is divided to segments based on entropy and then
Equalization (HE). Our proposed algorithm applies some
histogram equalization method is applied on each segment
preprocessing steps on the histogram corresponding to the image
and then applies histogram equalization. separately [12].
Despite the mentioned methods can often increase contrast
Index Terms— Image processing, Histogram Equalization of the image but they make undesirable effects in the image. In
Contrast Enhancement this paper we have proposed an efficient method for increasing
contrast of the images based on histogram equalization without
I. INTRODUCTION any undesirable effect.
This paper is based on the article "A Novel Approach for
Contrast Enhancement Based on Histogram Equalization"[1].
This paper Contrast enhancement techniques are widely used
for image/video processing to achieve wider dynamic range.
Histogram modification-based algorithm is the most popular
approaches to achieve widely dynamic range. Histogram
Equalization (HE) is one of the most commonly used
algorithms to perform contrast enhancement due to its
simplicity and effectiveness [2]. In general, the HE distributes
pixel values uniformly and results in an enhanced image with
linear cumulative histogram. Useful applications of HE
enhancement include medical image processing, speech
recognition and texture synthesis, which are usually employed
with histogram modification [3] [4] [5] [6].
Histogram based techniques for image enhancement is
mostly based on equalizing the histogram of the image and
increasing the dynamic range corresponding to the image.
Histogram Equalization (HE) method has two main
disadvantages which affect efficiency of this method. These
Figure 1. Effect of washed out after histogram equalization
two main disadvantages are followed:
2

At the follow, basics of Histogram Equalization (HE) and III. PROPOSED ALGORITHM
Bi Histogram Equalization (BHE) are stated in detail and Because of the mentioned problems about using the simple
then our proposed algorithm is considered. histogram equalization algorithm, our proposed algorithm
makes a few changes at the histogram first and then applies the
II. HISTOGRAM EQUALIZATION (HE) basic histogram equalization method to give the better results.
Our proposed algorithm is followed in detail. First the
Histogram Equalization (HE) method are considered as probability density function (PDF) of the original image is
method for contrast enhancement of the images in this changed according to the equation (8):
section of the paper. HE is fully presented at [2] [10] [13].

A. Histogram Equalization (HE) 𝑃𝑚𝑎𝑥 𝑃(𝑘) = 𝑃𝑚𝑎𝑥


Consider a digital image with gray levels in the range 𝑃(𝑘) 𝑟
𝑃𝑛𝑒𝑤 = {( ) × 𝑃max 0 < 𝑃(𝑘) < 𝑃𝑚𝑎𝑥 (5)
𝑃𝑚𝑎𝑥
[0, L −1 ] , Probability Distribution Function of the image can
0 0
be computed as equation (1):

Where 𝑝𝑚𝑎𝑥 is the point with highest value in PDF of the


𝑛𝑘 original image. The above equation manipulates the values of
𝑃(𝑟𝑘 ) = 𝑘 = 0, … , 𝐿 − 1 (1)
𝑁
the PDF corresponding to the original image. For example, if
we select 0 < 𝑟 < 1 then the point with smaller values get
higher values. Figure 2 depicts this manipulation. After PDF
Where 𝑟𝑘 is the kth gray level and 𝑛𝑘 is the number of
manipulation using equation (5), we should apply equation (2)
pixels in the image having gray level 𝑟𝑘 . Cumulative on the new PDF and then we can use equation (3) for gray level
Distribution Function (CDF) can also be computed as to paint to the new values.
followed:

𝐶(𝑟𝑘 ) = ∑𝑖=𝑘
𝑖=0 𝑝(𝑟𝑖 ) (2)
𝑘 = 0, … , 𝐿 − 1 , 0 ≤ 𝐶(𝑟𝑘 ) ≤ 1

Histogram Equalization (HE) appropriates gray level 𝑆𝑘


to gray level 𝑟𝑘 of the input image using equation (2). So we
have:
Figure 2. Result of applying preprocessing algorithm. Above
histogram: before applying, down histogram: after applying.
𝑆𝑘 = (𝐿 − 1)𝑥𝐶(𝑟𝑘 ) (3)
Equation (5) caused to the promised results but it has a
disadvantage. This criterion is not an automatic method and we
need to test all the results for estimating the best 𝑟 . So we
Gray level 𝑆𝑘 changes can be computed in usual
should use another criterion more than equation (5) for this
histogram equalization method:
purpose. We have used the criterion which has used in [14] an
[15]. After applying equation (3), the new histogram is used in
equation (6) to find best 𝑟. The equation in the cited paper was
∆𝑆𝑘 = (𝐿 − 1)𝑥𝑃(𝑟𝑘 ) (4) incomplete, so the bibliography was reviewed, and the
complete equation was found. The criterion is as follow:

Equation (4) means that distance between 𝑆𝑘 and 𝑆𝑘 + 1


𝐿−2 𝐿−1
has direct relation with PDF of the input image at gray level 1
𝑟𝑘 . PixDis = ∑ ∑ 𝐻(𝑖)𝐻 (𝑗)(𝑗 − 𝑖)
𝑁𝑃𝑖𝑥 (𝑁𝑃𝑖𝑥 − 1)
𝑖=0 𝑗=𝑖+1
Undesirable effects of the usual histogram equalization
method (HE) are resulted from equation (2) because of the 𝑓𝑜𝑟 𝑖, 𝑗 ∈ [0, 𝑀 − 1] (6)
quantization operation and summarizing properties of this Where 𝐻(. ) is represented the new histogram after
equation. applying equation (3) of course after applying equation (5),
[0, L −1] is the gray-level range of the gray scale, and 𝑁𝑝𝑖𝑥
is the total number of pixels in the image. Equation (6) is
repeated by the different values of 𝑟 and 𝑟 with maximum
3

PixDis is selected as the best 𝑟. A modification to the


algorithm of the one mentioned in the original paper was
made so that one hundred different values of 𝑟 are tested and
the best based on equation (6) is automatically selected.
It should be mentioned that if r equals with 1 then
equation (5) is the same as the basic histogram equalization
method. This criterion generally applies to these kinds of
technique or similar histogram-based techniques and may
not be used to judge the quality of images treated by other
enhancement techniques. Our method tends to spread the
histogram components uniformly over the grayscale, (a)
preventing the histogram components from concentrating in
particular locations on the grayscale especially in low gray
levels. At the same time, a larger PixDis will keep the
histogram components further away from each other for
better enhancement. Therefore, we consider the average
distance between pixels on the grayscale as a sound measure
of the quality of images enhanced by our technique and
consider that the maximal corresponds to the optimal
contrast enhancement. Visual evaluations of multiple images
during our testing also confirmed the validity of this
measure. This quality measure is essential to achieve the
(b)
optimal result. It is worth noting that this image contrast
criterion, the average distance between pixels on the
grayscale, is not inherent to our algorithm, but could be used
in other histogram-based algorithms (especially histogram
equalization) as well.

IV. EXPERIMENTS AND RESULTS


The proposed algorithm was applied to different images
obtaining good results in comparison with HE. Figure 3
shows an example of applying the proposed algorithm and
the results of applying HE algorithm.
(c)
Figure 4. Corresponding histograms for Figure3 Comparing HE and our
method (a) histogram of main image, (b) histogram of HE results, (c)
histogram of our proposed method

As it can be seen the proposed method has better results


comparing to, HE method, by comparing the histogram of
the proposed method observed in Figure 4, the proposed
method better distributes the information in the image.

(a) (c)
V. CONCLUSION
The proposed method is based on histogram processing
before histogram equalization. The results were promising
better efficiency of the proposed method comparing to other
usual methods for contrast enhancement.
The improvement to the original algorithm that selects the
best value for r simplifies its use because in the original paper
(c) is tested and select this value manually.
Figure 3. Comparing HE, and our method (a) main image, (b) HE result,
(c) Result of our proposed method
4

REFERENCES
[1] H. Yeganeh, A. Ziaei and A. Rezaie, "A novel approach for contrast
enhancement based on Histogram Equalization," 2008 International
Conference on Computer and Communication Engineering, Kuala
Lumpur, 2008, pp. 256-260.doi: 10.1109/ICCCE.2008.4580607
[2] R. C. Conzalez and R. E. Woods, Digial Image Processing. New Jersey:
Prentice-Hall, Inc., 2001.
[3] S. C. Pei, Y. C. Zeng, and C. H. Chang, “Virtual restoration of ancient
chinese paintings using color contrast enhancement and lacuna texture
synthesis,” IEEE Trans. Image Processing, vol. 13, pp. 416–429, Mar.
2004.
[4] W. A., S. H. Chin, and E. C. Tan, “Novel approach to automated
fingerprint recognition,” IEE Proceedings Vision, Image and Signal
Processing, vol. 145, pp. 160–166, 1998.
[5] A. de la Torre, A. M. Peinado, J. C. Segura, J. L. Perez- Cordoba, M. C.
Benitez, and A. J. Rubio, “Histogram equalization of speech
representation for robust speech recognition,” IEEE Trans. Speech Audio
Processing, vol. 13, pp. 355–366, May 2005.
[6] S. M. Pizer, “The medical image display and analysis group at the
university of north carolina: Reminiscences and philosophy,” IEEE
Trans. Med. Imag., vol. 22, pp. 2–10, Jan. 2003.
[7] S. Lau, “Global image enhancement using local information,”
Electronics Letters, vol. 30, pp. 122–123, Jan. 1994.
[8] Y. T. Kim, “Quantized bi-histogram equalization,” in IEEE Conf. on
Acoustics, Speech, and Signal Processing, vol. 4, Apr. 1997, pp. 2797–
2800.
[9] Y. J. Zhan, “Improving the accuracy of direct histogram
specification,” Electronics Letters, vol. 28, pp. 213–214, Jan. 1992.
[10] Y. T. Kim, “Contrast enhancement using brightness preserving
bihistogram equalization,” IEEE Trans. Consumer Electron., vol. 43,
pp. 1–8, Feb. 1997.
[11] Y. T. Kim, “Quantized bi-histogram equalization,” in IEEE Conf. on
Acoustics, Speech, and Signal Processing, vol. 4, Apr. 1997, pp. 2797–
2800.
[12] Y. Wan, Q. Chen, and B. M. Zhang, “Image enhancement based on
equal area dualistic sub-image histogram equalization method,” IEEE
Tran .Consumer Electron., vol. 45, no. 1, pp. 68–75, Feb. 1999.
[13] S. D. Chen and A. R. Ramli, “Contrast enhancement using recursive
mean-separate histogram equalization for scalable brightness
preservation,” IEEE Trans. Consumer Electron., vol. 49, no. 4, pp.
1301–1309, Nov. 2003.
[14] ZhiYu Chen,Besma R. Abidi, David L. Page, M and Mongi A. Abidi”
Gray-Level Grouping (GLG): An Automatic Method for Optimized
Image Contrast Enhancement—Part I: The Basic Method” IEEE
TRANSACTIONS ON IMAGE PROCESSING, VOL. 15, NO. 8,
AUGUST 2006
[15] ZhiYu Chen,Besma R. Abidi, David L. Page, M and Mongi A. Abidi”
Gray-Level Grouping (GLG): An Automatic Method for Optimized
Image Contrast Enhancement—Part II: The Variations” IEEE
Transactions on Image Processing, VOL 15, No.8, August 2006.

Potrebbero piacerti anche