You are on page 1of 5

ISSN:2229-6093

Komal Vij,Yaduvir Singh Int. J. Comp. Tech. Appl., Vol 2 (2), 309-313

Enhancement of Images Using Histogram Processing


Techniques
Komal Vij*, Yaduvir Singh**

*ME Student, Department of Electrical & Instrumentation Engineering


**Faculty, Department of Electrical & Instrumentation Engineering
Thapar University, Patiala, India
*gudia.vij@gmail.com, ** yad_pra@yahoo.com

Abstract- Image enhancement is a mean as the This is also known as contrast enhancement.
improvement of an image appearance by increasing Intensity transformation functions based on
dominance of some features or by decreasing
ambiguity between different regions of the image.
Image enhancement processes consist of a collection information extracted from image such as
of techniques that seek to improve the visual enhancement, compression, segmentation
appearance of an image or to convert the image to a and description.
form better suited for analysis by a human or
machine. Many images such as medical images, The Histogram of digital image with the
remote sensing images, electron microscopy images intensity levels in the range [0,L-1] is a
and even real life photographic pictures, suffer from discrete function.
poor contrast. Therefore it is necessary to enhance the
h(rk) = nk
contrast.The purpose of image enhancement methods
is to increase image visibility and details. Enhanced Where
image provide clear image to eyes or assist feature • rk is the intensity value.
extraction processing in computer vision system.
• nk is the number of pixels in the
Numerous enhancement methods have been
proposed but the enhancement efficiency,
image with intensity rk.
computational requirements, noise amplification, user • h(rk) is the histogram of the digital
intervention, and application suitability are the image with Gray Level rk
common factors to be considered when choosing Histograms are frequently normalized by the
from these different methods for specific image total number of pixels in the image.
processing application.
Assuming a M × N image, a normalized
histogram.
𝑛𝑛 𝑘𝑘
Keywords: Enhancement, Histogram processing p(rk) = 𝑀𝑀𝑀𝑀 , K=0,1,2,3……….L-1
techniques, PSNR,MSE.
is related to probability of occurrence of rk in
the image.
INTRODUCTION
I. Where
Histogram processing is the act of altering • p(rk) gives an estimate of the
an image by modifying its histogram. probability of occurrence of gray
Common uses of histogram processing level rk..
include normalization by which one makes
the histogram of an image as flat as possible.

309
ISSN:2229-6093
Komal Vij,Yaduvir Singh Int. J. Comp. Tech. Appl., Vol 2 (2), 309-313

• The Sum of all components of a Let X={X(i,j)} denotes a image composed


normalized histogram is equal to1. of L discrete gray levels denotes as
Histograms are Simple to calculate in X= {𝑋𝑋0, 𝑋𝑋1, … … . . , 𝑋𝑋𝐿𝐿−1 }.For a given Image
software and also lend themselves to X, the probability density function 𝑝𝑝(𝑋𝑋𝑘𝑘 ).
economic hardware implementations, thus 𝑛𝑛𝑘𝑘
making them a popular tool for real-time 𝑝𝑝(𝑋𝑋𝑘𝑘 ) =
image processing. 𝑛𝑛
Where
II. LITERATURE REVIEW OF • 𝐾𝐾 = 0,1, … … 𝐿𝐿 − 1.
HISTOGRAM PROCESSING • 𝑛𝑛𝑘𝑘 represents the number of times
TECHNIQUES that the level 𝑋𝑋𝑘𝑘 apperes in the input
image X.
• 𝑛𝑛 is the total number of samples in
Image enhancement the image to a form
the input image.
better suited for analysis by a human or
machine processes consist of a collection of • 𝑝𝑝(𝑋𝑋𝑘𝑘 ) is associated with the
techniques that seek to improve the visual histogram of the input image which
appearance of an image or to convert the represents the number of pixels that
image to a form better suited for analysis by have a specific intensity 𝑋𝑋𝑘𝑘 .
a human or machine. Based on the probability density
A. Histogram Equalization function ,the cumulative density function
is defined as
Histogram Equalization is a technique that 𝑘𝑘
generates a gray map which changes the
histogram of an image and redistributing all 𝑐𝑐 (𝑥𝑥 ) = � 𝑝𝑝(𝑋𝑋𝑗𝑗 )
pixels values to be as close as possible to a 𝑗𝑗 =0

user –specified desired histogram. HE Where


allows for areas of lower local contrast to • 𝑋𝑋𝑘𝑘 = 𝑥𝑥 for k=0,1,.......L-1
gain a higher contrast. Histogram • 𝑐𝑐(𝑋𝑋𝐿𝐿−1 ) =1 by definition.
equalization automatically determines a • HE is a scheme that maps the
transformation function seeking to produce input image into the entire
an output image with a uniform Histogram. dynamic range,(𝑋𝑋0 , 𝑋𝑋𝐿𝐿−1 ) by
Histogram equalization is a method in image using the cumulative density
processing of contrast adjustment using the function as a transform function.
image histogram. This method usually A transform function f(x) based on
increases the global contrast of many the cumulative density function
images, especially when the usable data of defined as :
the image is represented by close contrast
𝑓𝑓 (𝑥𝑥 ) = 𝑋𝑋0 + (𝑋𝑋𝐿𝐿−1 − 𝑋𝑋0 )𝑐𝑐(𝑥𝑥)
values. Through this adjustment, the
intensities can be better distributed on the Then the output image of the HE,
histogram. Histogram equalization Y={Y(i,j)}cann be expressed as
accomplishes this by effectively spreading 𝑌𝑌 = 𝑓𝑓(𝑥𝑥)
out the most frequent intensity values. = 𝑓𝑓{(𝑋𝑋(𝑖𝑖, 𝑗𝑗)/
Histogram equalization automatically ∀𝑋𝑋(𝑖𝑖, 𝑗𝑗) ∈ 𝑋𝑋}.
determines a transformation function Based on information theory, entropy of
seeking to produce an output image with a message source will get the maximum value
uniform Histogram.

310
ISSN:2229-6093
Komal Vij,Yaduvir Singh Int. J. Comp. Tech. Appl., Vol 2 (2), 309-313

when the message has uniform distribution set are mapped into the range from the mean
property. t the maximum gray level. Means one of the
sub image is equalized over the range up to
the mean and the other sub image is
B. Problems In Histogram Equalization equalized over the range. From the mean
based on the respective histograms .Thus,
the resulting equalized sub images are
1. The Histogram Equalization method bounded by each other around the input
does not take the mean brightness of mean ,which has an effect of preserving
an image into account. mean brightness.
2. The HE method may result in over In this the computation unit counts and store
enhancement and saturation artifacts
the respective number of occurrences 𝑛𝑛𝑘𝑘 for
due to the stretching of the gray
𝑘𝑘 = 0,1, … . . , 𝐿𝐿 − 1,the Histogram Splitter
levels over the full gray level range.
the splits the number of occurrences as
3. Histogram equalization can be
(𝑛𝑛0 , 𝑛𝑛1 , … , 𝑛𝑛𝑚𝑚 ) and (𝑛𝑛𝑚𝑚+1 , … . . , 𝑛𝑛𝐿𝐿−1 )
found on the fact that the brightness
respectively and where the mapper outputs
of an image can be changed after the
Y(i,j) as
histogram equalization.
4. Nevertheless, HE is not commonly 𝑋𝑋0 + (𝑋𝑋𝑚𝑚 − 𝑋𝑋0 )𝑐𝑐𝐿𝐿 (𝑥𝑥 )
used in consumer electronics such as 𝑌𝑌 (𝑖𝑖, 𝑗𝑗) = �
𝑋𝑋𝑚𝑚+1 + (𝑋𝑋𝐿𝐿−1 − 𝑋𝑋𝑚𝑚+1 )𝑐𝑐𝑈𝑈 (𝑥𝑥 )
TV because it may significantly
change the brightness of an input Which is based on 𝑓𝑓𝐿𝐿 (𝑋𝑋𝐿𝐿 ) ∪ 𝑓𝑓𝑈𝑈 (𝑋𝑋𝑈𝑈 ).The
image and cause undesirable computation of Histogram and the mean
artifacts. typically need to be done during one frame
5. It can be observed that the mean period;thus a frame memory to store the
brightness of the histogram- image being processed is neccessary
equalized image is always the middle
gray level regardless of the input D. Contrast Limited Adaptive Histogram
mean. Equalization (CLAHE)

C. Brightness Preserving Bi Histrogram Adaptive histogram equalization is a


Equalization computer image processing technique used
to improve contrast in images. It differs
from ordinary histogram equalization in the
The Brightness preserving bi histogram
respect that the adaptive method computes
equalization firstly decomposes an input
several histograms, each corresponding to a
image into two sub images based on the
distinct section of the image, and uses them
mean of the input image. One of the sub
to redistribute the lightness values of the
image is set of samples less than or equal to
image. Ordinary histogram equalization
the mean whereas the other one is the set of
simply uses a single histogram for an entire
samples greater than the mean. Then the
image.
BBHE equalizes the sub images
independently based on their respective Consequently, adaptive histogram
histograms with the constraint that the equalization is considered an image
samples in the formal set are mapped into enhancement technique capable of
the range from the minimum gray level to improving an image's local contrast,
the input mean and the samples in the latter bringing out more detail in the image.

311
ISSN:2229-6093
Komal Vij,Yaduvir Singh Int. J. Comp. Tech. Appl., Vol 2 (2), 309-313

However, it also can produce significant


noise. A generalization of adaptive
histogram equalization called contrast
limited adaptive histogram equalization, also
known as CLAHE, was developed to
address the problem of noise amplification.
CLAHE operates on small regions in the
image, called tiles, rather than the entire
image. Each tile's contrast is enhanced, so
that the histogram of the output region Fig. 3
approximately matches the histogram
specified by the 'Distribution' parameter.
The neighboring tiles are then combined
using bilinear interpolation to eliminate
artificially induced boundaries. The contrast,
especially in homogeneous areas, can be
limited to avoid amplifying any noise that
might be present in the image.

III. PROBLEM FORMULATION


Fig. 4

IV.RESULT AND DISCUSSIONS

Peak signal-to-noise ratio, often abbreviated


PSNR, is the ratio between the maximum
possible power of a signal and the power of
corrupting noise that affects the fidelity of
its representation. The PSNR is most
commonly used as a measure of quality of
Fig. 1
reconstruction of lossy compression codecs
(e.g., for image compression). The signal in
this case is the original data, and the noise is
the error introduced by compression higher
PSNR would normally indicate that the
reconstruction is of higher quality.

2552
𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 = 10𝑙𝑙𝑙𝑙𝑙𝑙
𝑚𝑚𝑚𝑚𝑚𝑚

Where mse is the mean square error between


the original image (i.e. s) and the enhanced
Fig. 2 image (i.e.𝑠𝑠̂ ) with size M×N:

312
ISSN:2229-6093
Komal Vij,Yaduvir Singh Int. J. Comp. Tech. Appl., Vol 2 (2), 309-313

1 𝑀𝑀 𝑁𝑁 Circuits and Systems for Video Technology, Vol. 11,


𝑚𝑚𝑚𝑚𝑚𝑚 = � � [𝑠𝑠(𝑖𝑖, 𝑗𝑗) No.4, pp.475-484, 2001.
𝑀𝑀 × 𝑁𝑁 𝑖𝑖=1 𝑗𝑗 =1 [6] C. C. Sun. S. J. Ruan, M. C. Shie, T. W. Pai, “Dynamic
Contrast Enhancement based on Histogram
− 𝑠𝑠̂ (𝑖𝑖, 𝑗𝑗)2 Specification,” IEEE Transactions on Consumer
Electronics, 51(4), pp.1300-1305, 2005.
[7] J. A. Stark, “Adaptive Image Contrast Enhancement
Table 1: MSE and PSNR results for various Using Generalizations of Histogram Equalization,”
IEEE Transactions on Image Processing, 9(5), pp.889-
896, 2000.
[8] Soong-Der Chen, A. Rahman Ramli, “Preserving
brightness in histogram equalization based contrast
Imadju HE AHE enhancement techniques,”Digital Signal Processing,
12(5), pp.413-428, September 2004.
st BBHE [9] Chao Wang and Zhongfu Ye, “Brightness Preserving
Histogram Equalization with Maximum Entropy: A
MSE 3199.3 4334.2 297.30 1227.1 Variational Perspective,”IEEE Transactions on
Consumer Electronics, 51(4), pp.1326-1334, 2005.
3 9 3 3 [10] S. M. Pizer, E. P. Amburn, J. D. Austin, R. Cromartie,
A. Geselowitz, T.Greer, B. H. Romeny, J. B.
PSN 27.491 28.444 31.050 31.422 Zimmerman, K. Zuiderveld, “Adaptive Histogram
R 5 6 9 3 Equalization and Its Variations,” Computer Vision
Graphics and Image Processing, Vol. 39, pp.355–368,
1987.
[11] J.A. Stark, W.J. Fitzgerald, An alternative algorithm for
HPT adaptive histogram equalization, Graph. Models Image
HE- Histogram Processing. Process. 58 (1996) 180–185.

AHE- Adaptive Histogram Equalization.


BBHE- Brightness Preserving Bi-
Histogram Equalization.

V. CONCLUSION
Histogram Processing is an effective method for
image enhancement; we tested four techniques on a
low contrast image. Among these, BBHE (Brightness
Preserving Bi-Histogram Equalization Technique)
has the lowest MSE and hightest PSNR and hence
gave best results.

REFERENCES
[1] S. D. Chen, A. Rahman Ramli, “Contrast Enhancement
using RecursiveMean-Separate Histogram Equalization
for Scalable Brightness Preservation,” IEEE
Transactions on Consumer Electronics, 49(4),pp.1301-
1309, 2003..
[2] Hyunsup Yoon, Youngjoon Han, and Hernsoo Hahn
“Image contrast Enhancement based Sub-histogram
Equalization Technique without over-equalization
Noise,” World academy of Science,Engineering and
Technology 50 2009.
[3] Y. T. Kim, "Contrast Enhancement Using Brightness
Preserving Bi-Histogram Equalization," IEEE
Transactions on Consumer Electronics, 43(1), pp.1-8,
1997.
[4] J. A. Stark, “Adaptive Image Contrast Enhancement
Using Generalizations of Histogram Equalization,”
IEEE Transactions on Image Processing, 9(5), pp.889-
896, 2000.
[5] J. Y. Kim, L. S. Kim, S. H. Hwang, “An Advanced
Contrast Enhancement Using Partially Overlapped Sub-
Block Histogram Equalization,” IEEE Transactions on

313

You might also like