ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 853
Comparative Study and Implementation of Image
Enhancement Techniques based on Histogram
Equalization
Satnam Kaur1, Baljeet singh2
1PG Student, BBSBEC FatehgarhSahib,Punjab (India)
2Professor, BBSBEC Fatehgarh Sahib, Punjab (India)
Abstract: Histogram equalization (HE) is one of the common methods used for image enhancement. Histogram equalization has proved to be a simple and effective image contrast enhancement technique. The major difference among the methods in this family is the criteria used to divide the input histogram. For preserving the input brightness of the image, there is a segment to avoid the generation of non-existing artifacts in the output image. Although these methods preserve the input brightness on the output image with a significant contrast enhancement, they may produce images with do not look as natural as the input ones. The basic idea of HE method is to re-map the gray levels of an image. HE tends to introduce some annoying artifacts and unnatural enhancement. To overcome these drawbacks different brightness preserving techniques are used for image enhancement. In this paper, four different types of histogram modification methods i.e. CHE,CLAHE, BBPHE & BPDFHE are implemented in MATLAB. The performance of these techniques is then compared using various parameters such as Peak signal to noise ratio (PSNR), Mean squared error (MSE), Signal to noise ratio (SNR), Absolute mean brightness error(AMBE) and Entropy. Theresults show that BPDFHE technique is the most efficient technique for image enhancement among compared techniques.
Keywords— Contrast enhancement, Histogram equalization brightness preserving, Background Brightness Preserving,histogram partition
I.INTRODUCTION
The main purpose of image enhancement is to bring out detail that is hidden in animage or to increase contrast in a low contrast image. CHE is employed for its simplicity and good performance. While it introduces major changes in the image gray level CHE stretches higher density grey levels more than low-density grey levels [8]. To overcome this limitation, several brightness preserving histogram modification approaches, such as, Contrast Limited Adaptive Histogram Equalization (CLAHE). CLAHE differs from ordinary Adaptive Histogram Equalization (AHE) in its contrast limiting. CLAHE was developed to prevent the over amplification of noise [6].Bi-histogram equalization techniques (BBHE, MMBEBHE and BBPHE) have been also proposed in literature [8]. In all these technique the
image have to first decompose and then the histogram of each part generated from the decomposition is equalized. That is also known as the segmentation of an image into various sub-images [9].Multi-histogram equalization techniques (DHE, BPDHE)process the crisp histograms of images toenhance contrast [3]. The crisp statistics of digital images suffersfrom the inherent limitation that it does not take into accountthe inexactness of gray-values. Additionally, crisp histograms need smoothing to achieve useful partitioning for equalization. Modification to Brightness Preserving Dynamic HistogramEqualization (BPDHE) technique with the use of fuzzy statistics of digital images (fuzzy histogram) is also studied in the literature [5]. The fuzzy histogram computedwith appropriate fuzzy membership function, does nothave random fluctuations or missing intensity levels andis essentially smooth. This helps in obtaining itsmeaningful partitioning required for brightnesspreserving equalization. This modified technique is referred to as Brightness Preserving Dynamic Fuzzy Histogram Equalization (BPDFHE) technique [5].
The rest of the paper is organized as follows: section II provides implementation of various histogram equalization techniques in detail. Section III describes image quality measures used in the work. Experimental results are reported in section IV and section V concludes the paper.
II.IMPLEMENTATION
The techniques CHE, CLAHE, BBPHE,BPDFHEare evaluated based on performance parameters in this work. The algorithmic steps involved in these techniques are outlined below: -
A. Conventional histogram equalization (CHE).
CHE is a very popular technique for image enhancement. This technique is commonly employed for image enhancement because of its simplicity and comparatively bettersthe performance on almost all types of images. Consider an input image A having total pixels n and K
ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 854
(PDF), p(Xk), is defined as
p(Xk) =𝑛𝑘𝑛fork = 0, 1, . . . , K − 1(1)
nk is the total pixels at Xk level andXk∈{X0, X1, . . . , XK−1}. The input Cumulative Density Function (CDF), c(Xk), is then obtained by
c(Xk)= 𝑘𝑟=0𝑝(𝑋𝑟)(2)
By definition, c(XK−1)= 1. The transform function is
obtained from theinput CDF by
f(Xk)= X0 + (XK−1 − X0)c(Xk) (3)
The output image of the CHE, D, can then be expressed as
D=f(Xk) (4)
For a normal grey-scale image, K=256 and k=0, 1, . . . 255. Forprocessing, an image is always normalized into the range [0, 1]. [7]
B. Background Brightness Preserving Histogram Equalization (BBPHE): The density of background levels is normally much higher than the other levels, especially forplain images, the total density of background levels can be more than half of the total pixels. Therefore, BBPHE decomposes the input image into sub-images based on background levels and non-backgroundlevels range. After that, each sub-image is equalized independently, and then combined into the final output image.
Consider an input image A having global background in a continuousrange of J grey levels between the inputK
grey levels, where J<K, andthere are m levels before the background levels, hence there are K-m -J levels after the final background level Xm+J−1. Let Xb be the background
level, the image is then divided into three sub-images T1, T2, andTbas
A=T1∪Tb∪T2(5)
WhereT1 = {X ≤ Xm−1}, Tb = {Xm ≤ X ≤ Xm+J−1},
T2 = {Xm+J ≤ X≤ XK−1}, m≠ 0,m + J≠ K, and Xb∈{Xm, Xm+1, . . . , Xm+J−1}. T1and T2are the sub-images of
non-background levels, and Tb is thesub-image of background
levels. The PDFs of the sub-images T1, T2 andTb are then
defined as
p1(Xk)=𝑛𝑘 𝑛1(6)
fork = 0, 1, ...,m – 1 pb(Xk) =
𝑛𝑘 𝑛𝑏(7)
fork =m, m + 1, . . ., m + J -1, and
p2(Xk)=
𝑛𝑘 𝑛2(8)
fork = m + J ,m + J + 1, . . . , K − 1 The respective CDFs arethen obtained by
c1(Xk) = 𝑘𝑟=0 p1(Xr) (9) cb(Xk) = 𝑘𝑟=0 pb(Xr) (10) c2(Xk) = 𝑘𝑟=0 p2(Xr) (11)
In fact, c1(Xm−1) = cb(Xm+J−1) = c2(XK−1) = 1. Similar to
the CHE,the transform functions of T1, T2and Tbcan be
separately defined as
f1(Xk) = X0 + (Xm−1 − X0)c1(Xk)(12) fb(Xk) = Xm + (Xm+J-1 – Xm)cb(Xk)(13) f2(Xk) = Xm+J+ (Xk−1 – Xm+J)c2(Xk)(14)
The output image D can be expressed as
D = f1 ∪ fb ∪f2(15)
The above calculations are for Case 1 where the
background levels liewithin the full grey level range. There are two special cases where thebackground level either starts from X0 or ends at Xk-1, then the inputimage
is decomposed into two sub-images T1 and Tb instead of
three. The output image D = f1 ∪ fb is obtained by similar steps to Case1but with different boundary conditions as in the following:
Case 2:A=Tb∪T1, where Tb = {X ≤ XJ−1},T1= {XJ ≤ X ≤XK−1},m = 0, J ≠K, and Xbstarts from X0, hence, Xb∈ {X0, X1, ...,XJ−1}
Case 3: A = T1∪Tb, where T1= {X ≤ Xm−1}, Tb = {Xm ≤ X ≤Xm+J−1}m≠ 0,m + J = K, and Xbends at XK−1, hence,
Xb∈{Xm, Xm+1, . . . , Xm+J−1}[8].
C.Contrast Limited Adaptive Histogram
Equalization(CLAHE)
CLAHE differs from ordinary AHE in its contrast limiting. CLAHE was developed to prevent the over amplification of noise that adaptive histogram equalization can give. This is achieved by limiting the contrast enhancement of AHE.
This method consist of following steps:
1. Obtain all the inputs: Image, number of regions in row and Column directions, number of bins for the histograms used in building image transform function (dynamic range), clip limit for contrast limiting (normalized from 0 to 1).
2. Pre-process the inputs: Determine real clip limit from the normalized value if necessary, pad the image beforesplitting it into regions.
3. Process each contextual region (tile) to produce gray level mappings: Extract a single image region, make a histogram for this region using the specified number of bins, clip the histogram using clip limit, create mapping for this region.
4 Interpolate gray level mapping in order to assemble final CLAHE image: Extract cluster of four neighboringmapping functions, process image region partly overlapping each of the mapping tiles, extract a single pixel, apply four mappings function to that pixel, and interpolate between the results to obtain the output pixel; repeat over the entire image [6].
D. Brightness Preserving Dynamic Fuzzy Histogram Equalization
Brightness Preserving Dynamic Fuzzy Histogram Equalization (BPDFHE) uses fuzzy statistics of digital images for their representation and processing. The BPDFHE technique consists of following operational stages:
1. Fuzzy Histogram Computation. 2. Partitioning of the Histogram.
3. Dynamic Histogram Equalization of the Partitions. 4. Normalization of the image brightness.
The following sub-sections contain the details of the steps involved.
1. Fuzzy Histogram Computation
ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 855
p(f),f ∈{0,1,…. , K-1} where p(f) is the frequency of occurrence of gray levels that are “around f”.By considering the gray value F(a, b) as a fuzzy number F (a, b), the fuzzy histogram is computed as:
p(f)←p(f) + μF 𝑎 𝑏 (a, b)𝑓, j∈ c, d (16)
where μF (a, b)𝑓 is the triangular fuzzy membership
function defined as
μF (a, b)𝑓= max 0,1 − F a,b −f 4 (17)
and[c,d] is the support of the membership function.
2. Partitioning of the Histogram
The local maxima based partitioning of the histogram, to obtain multiple sub-histograms, is performed in this step.
a) Detection of Local Maxima: The local maxima in the Fuzzy Histogram are located using the first and second derivative of the Fuzzy histogram.
p (f) = dp (f)df ≜p f+1 −p(f−1)2 (18)
where, p (f) represents the first order derivative of the fuzzyhistogram p(f) corresponding to the fthintensity
level.The second order derivative is computed directly from thefuzzy histogram using the second order central differenceoperator.
p (f) =d2dfp(f)2 ≜p(f+1)-2p(f)+p(f-1)(19)
where, p (f) represents the first order derivative of the fuzzyhistogram p(f) corresponding to the fthintensity
level.The local maxima points are then indicated for those valuesof intensity levels where zero crossings of the first orderderivative are detected along with a negative value of the second order derivative.
fmax =f∀{ p (f+1) × p (f-1) < 0. p (f)<0 } (20)
However, points of ambiguity arise in most situations as perfect zero crossings do not occur at integral values of intensity levels. In such situations, generally two neighboring pairs are detected as points of maxima. The ambiguity can be resolved by preserving the point with the highest count among the neighboring pair of maxima
b) Creating Partitions: The local maxima points in the fuzzy histogram can now be used to form the partitions. Let (r +1) intensity levels corresponding to the local maxima, detected in the previous stage of operation, be denoted by{ a0 ,a1,… ,an}. Assuming the original fuzzy
histogram to have a spread in the range of [Fmin,Fmax],
then the (r +1) sub-histograms obtained after partitioning are{[Fmin,a0],[a0 + 1,a1],…[an + 1, Fmax]}.
3. Dynamic Histogram Equalization (DHE) of the Sub-histograms: The sub-histograms obtained are individually equalized by the DHE technique. The equalization method uses a spanning function based on total number of pixels in the partition to perform equalization. It involves two stages of operation, namely, mapping partitions to a dynamic range and histogram equalization.
a) Mapping Partitions to a Dynamic Range: The following set of equations give the parameters that are useful in dynamic equalization process.
Spnf = hif – lof(21)
Factf = Spnf× log10 Mf(22)
ranf =
(k−1)×factf factj
r+1
j=1 (23)
wherehif and lof are the highest and lowest intensity
values contained in the fth input sub-histogram, M fis the
total number of pixels contained in that partition. The dynamic range of the input sub-histogram is specified by Spnf. while the dynamic range used in the output
sub-histogram is ranf. The dynamic range for the fthoutput
sub-histograms can be obtained from ranfas
startf= f−1j=1ranj+1(24)
stopf = fj=1ranj (25)
The exceptions are present at the two extremities, where [start1, stop1]= [0,ran1] and
[startr+1,stop r+1]=[ r+1j=1ranj,k-1].
b) Equalizing each Sub-histogram: The method for equalizing each partition of the histogram is similar to that used for global histogram equalization. For thefthsub-histogram, the remapped values are obtained as.
z(u) = startf+ ranf c(j)M f
u
j=startf (26)
where z(u) is the new intensity level corresponding to the uth intensity level on the original image, c(j) is the
histogram value at the jth intensity level on the fuzzy
histogram, and
Mf = stopj=startf fc(j) is the total population count in the f th
partition of the fuzzy histogram.
4. Normalization of Image Brightness
The image obtained after the dynamic histogram equalization of each sub histogram has the mean brightness that is slightly different than the input image. To remove this difference the normalization process is applied on the output image.
Lets assumeafand aobe the mean brightness levels of the
input image and the image (v) obtained after dynamic histogram equalization stage. If w is the output image of BPDFHE technique then the gray level value at the pixel location (a, b) for the image w is given as
w(a,b) = af
a0v(a,b) (27)
This brightness preserving procedure ensures that the mean intensity of the image obtained after process is the same as that of the input [5].
III.METRICSTOASSESSIMAGEQUALITY
A.Peak Signal To Noise Ratio (PSNR):
It is the evaluation standard of the reconstructed image quality, is the most wanted feature. PSNR is measured in the decibels (dB) and it is given by
PSNR = 10log 255 ∕2MSE (28)
ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 856
B.Absolute Mean Brightness Error:
It is the difference between the brightness of the original image and enhanced image. It is given by
AMBE = | E (x) – E (y) | (29)
Where E(x) is the average intensity of the input image and E(y) is the average intensity of enhanced image. The value of AMBE should be as small as possible.
C.Entropy:
For a given PDF p, entropy Ent[p] is computed. In general, the entropy is a useful tool to measure the richness of the details in the output image.
Ent[p] = -Σk=0 (k)log2 p (k) (30)
D.Mean Square Error (MSE):
The average squared difference between the reference signal and distorted signal is called as the meansquare error. It can be easily calculated by adding up the squared difference pixel-by-pixel and dividing by the total pixel count. Let m x n is a noise free monochrome image I, and K is defined as the noisy approximation. Then the mean square error between these two signals is defined as:
MSE=m×n1 n−1[I i, j − K i, j ]2
j=0 m−1
i=0 (31)
E.Signal-To-Noise Ratio (SNR):
Signal-to-noise ratio is defined as the ratio of signal power to the noise power, often expressed in decibels. Higher the SNR value betters the reconstructed image.
SNRdB=10log10 Psignal
Pnoise = Psignal,dB−Pnoise,dB (32)
IV.EXPERIMENTALRESULTS
Various images enhancement techniques such as CHE, CLAHE, BBPHE and BPDFHE techniques are implemented using MATLAB. The performance of all these image enhancement techniques are analyzed for a set of medical images and results are presented. This paper concludes that the BPDFHE gives much better results in comparison to all other techniques. In other words the MSE,AMBE are much lesser with BPDFHE compared to other one and it also gives higher values of PSNR, SNR and Entropy.
CASE 1: X-ray image of fingers:
Fig.1 (a) X-ray image of fingers in original and enhanced stateusing CHE techniquealong with its histograms
Fig.1 (b) X-ray image of fingers in original and enhanced state using CLAHE techniquealong with its histograms.
Fig.1(c) X-ray image of fingers in original and enhanced stateusing BBPHEtechniquealong with its histograms.
ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 857
Table1. Parameter comparison of X-ray image of fingers
METRICS
∕
METHOD
MSE PSNR SNR ENTROPY AMBE
CHE 287.81 12.35 17.94 5.97 3.5243 CLAHE 403.87 22.06 32.95 7.31 1.5334 BBPHE 100.15 28.12 45.06 7.43 0.0171 BPDFHE 41.69 31.92 51.42 9.45 0.0061
CASE 2: X-ray image of foot
Fig.2 (a) X-ray image of foot in original and enhanced stateusing CHE techniquealong with its histograms.
Fig.2(b) X-ray image of foot in original and enhanced stateusing CLAHE techniquealong with its histograms.
Fig.2(c) X-ray image of foot in original and enhanced stateusing BBPHE techniquealong with its histograms.
Fig.2 (d) X-ray image of foot in original and enhanced stateusing BPDFHE techniquealong with its histograms.
Table2. Parameter comparison of X-ray image of foot
METRICS ∕
METHOD MSE PSNR SNR ENTROPY AMBE
CHE 1807.6 15.55 8.34 5.64 10.0768 CLAHE 977.36 18.23 22.02 7.15 2.3586 BBPHE 645.18 20.03 25.62 7.22 0.1984 BPDFHE 41.10 31.88 49.44 9.15 0.0621
CASE 3: X-ray image of chest
Fig.3 (a)X-ray image of chest in original and enhanced stateusing CHE techniquealong with its histograms
ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 858
Fig.3(c) X-ray image of chest in original and enhanced stateusing BBPHE techniquealong with its histograms
[image:6.595.330.557.50.219.2]Fig.3 (d) X-ray image of chest in original and enhanced stateusing BPDFHE techniquealong with its histograms
Table 3. Parameter comparison of X-ray image of chest
METRICS ∕
METHOD MSE PSNR SNR ENTROPY AMBE
CHE 1752.5 15.69 12.26 5.98 8.9127 CLAHE 492.75 21.20 17.77 7.30 4.3626 BBPHE 248.56 24.17 21.49 7.38 0.4708 BPDFHE 38.35 32.29 53.17 9.51 0.2515
CASE 4: X-ray image of face.
Fig.4 (a) X-ray image of face in original and enhanced stateusing CHE techniquealong with its histograms
Fig.4 (b) X-ray image of face in original and enhanced stateusing CLAHE techniquealong with its histograms
Fig.4(c) X-ray image of face in original and enhanced stateusing BBPHE techniquealong with its histograms
[image:6.595.38.263.53.204.2]Fig.4 (d) X-ray image of face in original and enhanced stateusing BPDFHE techniquealong with its histograms
[image:6.595.38.262.237.401.2] [image:6.595.332.556.245.412.2] [image:6.595.330.560.445.610.2] [image:6.595.32.269.451.682.2]ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET 859
V.CONCLUSION
In this Paper, a framework for image enhancement based on prior knowledge on the Histogram Equalization techniques has been presented. Algorithms of many image enhancement techniques likeConventional Histogram Equalization (CHE), Contrast Limited Adaptive Histogram Equalization (CLAHE), Background Brightness Preserving Histogram Equalization (BBPHE),and Brightness Preserving Dynamic Fuzzy Histogram Equalization (BPDFHE) has been implemented and compared. The performance of all these techniques has been analyzed and evaluated on actual medical images. From the experimental results, it is found that the BPDFHE gives much better results in comparison to all other techniques. Experimental results on medical images have shown that the degree ofenhancement of BPDFHE, measured in terms of PSNR, SNR and Entropy is higher than those of the existinghistogram-based equalization techniques. Moreover, MSE, AMBEare much lesser with BPDFHE as compared to other techniques.
REFERENCES
[1]. ManpreetKaur, JasdeepKaur and JappreetKaur,“Survey of Contrast Enhancement Techniques based on Histogram Equalization”,International Journal of Advanced Computer Science and Applications, Vol.2, No.7, pp.137-141,Feb.2011. [2]. Ashamdeepsingh and Navdeepkanwal,“Qualitative Comparative Study Of Various Contrast Enhancement Techniques”,International Journal of Computer Science Engineering and Information Technology Research, Vol.3, No.1,pp.19-24,March 2013.
[3]. C.Ramya, Dr.S.Subha Rani,“ Contrast Enhancement for FogDegradedVideo Sequences Using
BPDFHE”,International Journal of Computer Science and Information Technologies,,Vol. 3(2), No.1,pp.3463-3468,2012.
[4]. H. K. Sawant and MahentraDeore,“A Comprehensive Review of Image enhancement Techniques”,International Journal of Computer Technology and Electronics Engineering, Vol.1, No.2,pp.39-44,June 2010.
[5]. Debdoot Sheet and AmitSuveer,“ Brightness Preserving Dynamic Fuzzy Histogram Equalization”, IEEE Trans. Consumer Electron, Vol. 56, No. 4,pp.2475-2480, November 2010.
[6]. Rajesh Garg, Bhawna Mittal and SheetalGarg,“Histogram Equalization Techniques For Image Enhancement”,International Journal of Electronics & Communication Technology, Vol.2, No.1,pp.107-111, March 2011.
[7]. Mrs. AshwiniSachinZadbuke,“Brightness Preserving Image Enhancement Using Modified Dualistic Sub Image Histogram Equalization”, International Journal of Scientific & Engineering Research, Vol. 3, No.2, 2013,pp.321-327,Feb 2012.
[8]. T.L. Tan, K.S. Sim and C.P. Tso,„„Image enhancement using background brightness preserving histogram equalisation‟‟,Electronics Letters, Vol. 48, No.3,pp.155-157,Feb.2012.
[9]. Yogendra Kumar Jain and GarimaSilakari,“Performance Evaluation Of Brightness Bi-Histogram Equalization Techniques Using Gaussian Filter For Contrast Stretching And Brightness Preservation Of Satellite Images”,International Journal of Emerging Technology and Advanced Engineering, Vol. 3, No.2,pp.321-327, Feb.2013. [10]. M. Abdullah-Al-Wadud, Md. HasanulKabir, M. Ali
AkberDewan, and OksamChae, “A dynamic histogram equalization for image contrast enhancement”, IEEE Trans. Consumer Electron., vol. 53, no. 2, pp. 593-600, May 2007. [11]. P.Shanmugavadivu, K.Balasubramanian and