An Adaptive Histogram Equalization Based Local Technique for Contrast Preserving Image Enhancement
 Author: Lee Joonwhoan, Pant Suresh Raj, Lee HeeSin
 Publish: International Journal of Fuzzy Logic and Intelligent Systems Volume 15, Issue1, p35~44, 25 March 2015

ABSTRACT
The main purpose of image enhancement is to improve certain characteristics of an image to improve its visual quality. This paper proposes a method for image contrast enhancement that can be applied to both medical and natural images. The proposed algorithm is designed to achieve contrast enhancement while also preserving the local image details. To achieve this, the proposed method combines local image contrast preserving dynamic range compression and contrast limited adaptive histogram equalization (CLAHE). Global gain parameters for contrast enhancement are inadequate for preserving local image details. Therefore, in the proposed method, in order to preserve local image details, local contrast enhancement at any pixel position is performed based on the corresponding local gain parameter, which is calculated according to the current pixel neighborhood edge density. Different image quality measures are used for evaluating the performance of the proposed method. Experimental results show that the proposed method provides more information about the image details, which can help facilitate further image analysis.

KEYWORD
Contrast enhancement , Local details , Overenhancement , Underenhancement , Image edge density

1. Introduction
Image enhancement is a commonly used approach for improving the quality of medical and natural images. Enhanced images provide better information for human viewers and help facilitate further image analysis. Moreover, images with contrast enhancement are often required as input images in many image processing systems. Image enhancement techniques are broadly classified as spatial domain techniques and transform domain techniques. In spatial domain techniques, enhancement is achieved by directly manipulating the intensity values of individual pixels in an image. On the other hand, in transform domain techniques, enhancement is achieved by transforming the image intensity data into a specific domain using different methods such as discrete cosine transform (DCT) and discrete Fourier transform (DFT). In other words, in transform domain techniques, an image is enhanced by changing its frequency content, such as edges and other subtle information.
Histogram equalization (HE) is a simple and popular method for contrast enhancement that can provide a general overview of the enhanced image [1, 2]. HE enhances the contrast of an image and flats the density distribution of the resultant image. As a consequence, HE has an effect of stretching the dynamic range. HE exhibits high performance in enhancing the contrast of a given image. However, it alters the original brightness of an input image, deteriorates visual quality, and introduces some undesirable artifacts. As a result, this technique is not suitable for images where preserving the original brightness and detail is essential.
Several methods with certain improvements over the traditional HE have been carried out to resolve the problems of HE. These methods can be broadly classified as global histogram equalization (GHE) and local histogram equalization (LHE). GHE is appropriate for general enhancement of an image; however, this method fails to preserve the local brightness features of the input image. LHE can be used to address the problems of GHE. LHE uses a sliding window that slides through every pixel of the image. The pixels that lie within the window are considered for HE, and gray level mapping is only performed on the center pixel of that window. However, LHE involves high computational cost and at times results in overenhancement in some portions of the image. Another disadvantage of this method is that it also enhances the noise in the input image along with the image features.
Some researchers have focused on HE based contrast enhancement. A method for contrast enhancement known as brightness preserving bihistogram equalization (BBHE) was developed by Kim [3]. This method decomposes an image into two sub images according to the mean value of the image, and histogram equalization is applied independently to the sub images to preserve the mean of the histogram equalized image. Finally, the processed sub images are combined into one image to obtain the result. Another method for image contrast enhancement was developed by Wang et al. [4]. In this method, the mean brightness error bihistogram equalization (MMBEBHE) is decomposing an input image into two sub images instead of the mean. There are some other methods such as MMBEBHE [5] and recursive meanseparate histogram equalization (RMSHE). MMBEBHE is an extension of the BBHE method which provides maximal brightness preservation. Although these methods provide good contrast enhancement, they also tend to generate undesirable side effects depending on the variations in the gray level distribution in the histogram [6]. RMSHE is another improvement over BBHE; however, this method also generates certain undesirable side effects.
Adaptive histogram equalization (AHE) [711] splits the target image into tiles. Histogram of each tile is used to create the intensity remapping function for the respective tile. Intensity remapping is performed using bilinear interpolation to smooth inter tile boundaries. This method has a disadvantage in that it enhances the noise in the background homogenous regions. Contrast limited adaptive histogram equalization (CLAHE) [12] is another method for contrast enhancement. This method also divides an image into several subimages (tiles) and the histogram is computed corresponding to the distinct sections of the image. However, before computing the cumulative distribution function (CDF), it clips the histogram at predefined values to limit the amplification. The overflow generated from the clipped bins is redistributed over the histogram of that tile. CLAHE enhanced images are better than other HE based contrast enhancement methods.
Overenhancement may cause the information loss and increase the gain of local noise. In order to address this problem, the local image contrast preserving dynamic range compression method is used to preserve the local image contrast based on the luminance ratio of the surrounding pixels [1317]. As imaging information significantly affects the enhancement result, the image processing procedure to be applied should be carefully considered. Underenhancement may not satisfactorily enhance the image details whereas over enhancement may increase the gain of local noise and introduce some undesirable side effects. The contrast always needs to be enhanced for identifying the message as invariant contrast enhancement factor cannot preserve the local image contrast. The proposed method combines two methods, CLAHE and local image contrast preserving dynamic range compression. The proposed method controls the contrast enhancement factor locally while also preserving the local image details.
The remainder of this paper is organized as follows. In Section 2, we describe the proposed method in detail and briefly review previous methods. Experimental results along with performance evaluations of the proposed method presented in Section 3. Finally, the conclusion is presented in Section 4.
2. Proposed Image Enhancement Technique
The method presented in this paper is the combination of two techniques: CLAHE [12] and local image contrast preserving dynamic range compression [13]. The range of the local contrast enhancement factor differs from one image to another. Proposed method limits the amplification and preserves the local details of the image. In this method, the possibility of underenhancement and overenhancement is reduced as the range of gain parameter is linearly transformed over edge density of an image. Previously, this algorithm was applied to medical images only [18]. In this paper, experiment is performed on both medical and natural images. First and second subsections present the brief description of CLAHE and local contrast preserving dynamic range compression respectively. Proposed method is described in detail in the third subsection.
2.1 Contrast Limited Adaptive Histogram Equalization
CLAHE [10] was an improvement over AHE. CLAHE algorithm divides an image into tiles, i.e., contextual regions. It creates the histogram of each contextual region and clipping is performed at predefined value. The clipped amount is redistributed among the histogram bins. This histogram is the modified form of the original histogram. This method solves the edgeshadowing effect of AHE and reduces the problem of overenhancement. CLAHE has demonstrated its success for the enhancement of low contrast medical images. The parameters that should be taken under consideration for CLAHE are clip limit of histogram and size of the contextual region. These parameters can affect the CLAHE output. This method makes hidden features of the image more visible by redistributing the used gray values.
2.2 Local Image Contrast Preserving Dynamic Range Compression
The local contrast of an image should be preserved which affects the overall visual contrast [14, 18]. The condition that preserves the local contrast is described below.
here
g (x ,y ) andf (x ,y ) denote the output luminance level and input luminance level,g_{avg} (x ,y ) andf_{avg} (x ,y ) denote the output local average and the input local average respectively. Taking a logarithm on both sides of (1), we can rearrange the equation as written in Eq. (2),where
F (x ,y ),F_{avg} (x ,y ),G (x ,y ) andG_{avg} (x ,y ) denote the logarithmic value off (x ,y ),f_{avg} (x ,y ),g (x ,y ) andg_{avg} (x ,y ) respectively.The core equation describing the condition to preserve the local contrast in dynamic range compression process given by [14] is described as follows,
where
p (f (x ,y )) denotes an arbitrary tone mapping curve in luminance domain andr (f (x ,y ),f_{avg} (x ,y )) gives a local contrast enhancement and can be described as follows.here,
α is a local contrast enhancement gain factor.For different purpose the fundamental tonemapping curve
p (f (x ,y )) can be determined randomly. After obtaining the tonemapping curve, the local contrast at each luminance level is enhanced by component(f (x ,y ),f_{avg} (x ,y )). The purpose of enhancement by this component is to preserve the luminance level as much as similar as original image. Before and after enhancement processing, the ratio of input gray levelf (x ,y ) to local averagef_{avg} (x ,y ) remains constant at each pixel.The 2D Gaussian filter is introduced which is given by the equation below,
The size of the neighborhood is determined by the standard deviation (
σ ) of the 2D Gaussian distribution. In this equation,K denotes a gain factor which is determined by2.3 Proposed Image Enhancement Technique
There are several methods for image enhancement. Some methods have disadvantage of enhancing the background noise. Many methods suffer from the common problem of overen hancement and underenhancement which cannot preserve the local image details for further analysis. Different methods with global gain parameter for contrast enhancement have been proposed by some researchers. Local contrast of the image cannot be preserved by global gain parameter. These kinds of problem arise due to the fact that these methods do not consider the local intensity for contrast enhancement. In this paper, the basic concept of local contrast preserving dynamic range compression proposed in [13, 15] is used. Proposed method uses local gain parameter. Gain parameter depends on the image pixel neighborhood edge density. With local gain parameter the problem of over and underenhancement is reduced. Figure 1 shows the overall block diagram of the proposed method.
In [13] approximated knee curve is used as mapping function. But this curve only compresses the limited range such as highlighted range over the knee point. The proper selection of the mapping function,
p (f (x ,y )) in Eqs. (3) and (4) is very important which affect the enhancement result directly.The mapping function used directly affects the enhancement result of an image. Proposed method uses the mapping function given by CLAHE. For local contrast preserving dynamic range compression method, the differentiation of mapping function must be calculated as in Eq. (4). Therefore, we are using the numerical differentiation of CLAHE mapping function. The gain parameter plays vital role in contrast enhancement. The result of edge detection shows texture region with greater pixel edge density than flat region in Figure 2. All the values of gain parameter lie in the given range. The range of the gain parameter differs from image to image. The larger and smaller values of gain parameter are used for the region with higher pixel edge density and lower pixel edge density respectively. Because of the variation in gain parameter, we can say that the values of gain parameter for each pixel depend on the image local region of that pixel and vary linearly in the proposed method. Figure 3(2, 3) shows the CDF of the CLAHE and proposed method respectively for a small contextual region indicated by blue rectangle ‘(1)’ in Figure 3.
3. Experimental Result
Different subjective and objective evaluation criteria were used to compare the performance of the proposed method with CLAHE. The proposed algorithm has been applied to large number of medical and natural images. Edge density of the image is calculated by overlapping the sliding window. In this section, we will describe about the image quality measures used to evaluate the performance of the proposed image enhancement method as well as the results and discussions.
3.1 Image Quality Measures
Based on the availability of an original image, image quality measures can be classified. The enhanced image is to be compared with the original image. In this paper enhanced image quality was evaluated by different measures. The evaluation criteria are as follows.
3.1.1 Detail variance and background variance
Firstly, the variance of the greylevels is computed in the neighboring pixels of each pixel in the image. For each pixel, variance is compared with threshold value. If the variance is greater than threshold value, the pixel is classified to foreground. The pixel is classified to background if the variance is less than threshold value [14, 15, 19]. Background variance (BV) is the average variance of pixels included in the background region, and detail variance (DV) is the average variance of the pixels included in the detail region. The desired result is no change in BV and increase in DV after applying the enhancement [19] algorithm.
3.1.2 Mean to standard deviation ratio
Meantostandard deviation ratio (MSR) can be easily calculated after computing the mean and standard deviation. MSR is the ratio of mean to standard deviation. Increase in MSR is preferable.
3.1.3 Peak signaltonoise ratio
The peak signaltonoise ratio (PSNR) [20] is defined in dB (decibels). Across contrast enhanced types, PSNR lacks the ability to assess image similarity. PSNR is defined as:
where
MAX_{I} is the maximum value of the pixel in the image and MSE is given by:where
I andK are original and contrast enhanced image respectively with sizem ×n .3.1.4 Universal quality index
It measures the image similarity across contrast enhanced types. Let
X = {x _{i}i = 1, 2, ....,N } andY = {y _{i}i = 1, 2, .....,N } be the original and contrast enhanced image signals, respectively. Universal quality index (UQI) [21] is defined aswhere and are the average pixel value of the original and contrast enhanced image respectively, and are the corresponding variances.
σ_{xy} is the correlation coefficient between two images.The dynamic range of
Q is [01]. One is considered as best value. It is achieved if and only ifx_{i} =y_{i} for alli = 1, 2, .....,N .The proposed method is also evaluated by the statistical method proposed by Jabson et al. [21]. In this method, the mean, mean of zonal standard deviation and the statistical properties of image are used to access visual quality of the image in terms of image contrast and details.
3.2 Result
First, the experiment is carried out in medical images. The result of medical image enhancement is compared in terms of both subjective and objective evaluation criteria. By using only subjective evaluation criteria it is difficult to notice the detail changes in the enhancement results. Therefore several image quality measures are used to evaluate the performance of the proposed method. Experiment has been carried out using the same parameter values in case of CLAHE and proposed method. Results of contrast enhancement of medical images using proposed method and CLAHE are shown in Figure 4.
From Figure 4, it is clear that, the image local details are more visible in the result obtained by using proposed method as compare to the CLAHE results. More results of proposed method for medical images are shown in Figure 5. Table 1 shows the values of image quality measures for several medial image enhancement results.
From Table 1 it is seen that DV is increased in proposed method where as BV and MSR are comparable in case of CLAHE and proposed method. The image quality measure PSNR lacks the ability to assess image similarity along contrast enhanced types. PSNR value increases with increase in contrast enhancement factor. Although, proposed algorithm shows more image detail information, this measure is comparable in case of CLAHE and proposed method.
Now the proposed image enhancement method is applied to natural color images. In the first step, RGB to HSV conversion is carried out. To prevent the degradation of color balance between HSV component,
H andS components are kept unchanged. The proposed algorithm with varying gain parameter is applied toV (luminance) channel only. Finally, originalH andS channel image and enhancedV channel are converted back to RGB image. Here also, the same parameter values for CLAHE and proposed method are used. Figure 6 shows the results of contrast enhancement of natural images by CLAHE and proposed method.Other results of proposed method for natural color images are shown in Figure 7. Although the proposed method is intended to enhance the medical images in which difference in very small details in the enhancement result have important meaning. From Figures 6 and 7, we can see that our proposed method can also be used for enhancing the natural color images.
As compare to medical images, it is hard to see the significant difference in the enhancement results of the proposed method and CLAHE in natural images. Therefore, the performance is also evaluated by using different image quality measures as in medical images.
Table 2 shows the values of different quality measures for several natural image enhancement results. In natural images also DV is increased in proposed method, BV and MSR are comparable. The value of PSNR increases with contrast enhancement and has lack of ability to assess along contrast enhanced type. Although this is the fact, PSNR is comparable in case of CLAHE and proposed method. UQI is also comparable. From above, it is seen that some measures show better performance while others are comparable with CLAHE.
Finally, the evaluation of proposed method is carried out by using statistical image quality measure proposed in [21]. Here we are mainly interested in the image local details; therefore the image is divided into number of nonoverlapping pixel blocks. For each block mean and standard deviation is computed and plotted as shown in Figure 8. The image quality is classified as visually optimal if it lies into the white region [21]. So after enhancement the image should transfer into the white region. The blue data point indicates the position of the small block of the original image and corresponding red data point connected via a straight line indicates the position of those small blocks of the image after enhancement. Figure 8 shows the statistical plot of an image using proposed method and CLAHE at which more of the blocks are inside the visually optimal region after enhancement on proposed method than CLAHE. The image (mean, mean of zonal standard deviation) for the same image is found to be (79.82, 37.65) and (106.09, 49.52) before and after image enhancement respectively using proposed method. For the same image after enhancement using CLAHE, (mean, mean of zonal standard deviation) is found to be (101.48, 48.41). Higher value of mean of zonal standard deviation shows the image with richer details.
Figure 9 shows the natural color input image and corresponding image enhancement result of CLAHE and proposed method. Figure 8 shows the statistical characteristics between input image and CLAHE result as well as between input image and proposed method’s result. Even though there is no sharp difference between CLAHE output and proposed method’s output visually, but by the statistical characteristics of image it is seen that proposed method’s output is visually optimal and contain more image details than CLAHE output.
From the statistical characteristics of the proposed method and CLAHE, it is observed that for some blocks the statistical plot by proposed method lies on the visually optimal white region while for the same blocks the plot exist outside the white region by CLAHE. For some other set of blocks whose mean and average standard deviation plot is outside the white region, it is seen that the plots are nearer to the white region by the proposed method than CLAHE. Therefore, the analysis is carried out for each small block individually to see in which region of the image, proposed method performs better than CLAHE. Figure 10 shows the blocks in the image whose statistical plot lies on the white region by proposed method but not by CLAHE and those blocks whose plot exist nearer to the white region by proposed method than CLAHE respectively. From this result, it is seen that on the highly textured region proposed method performs better than CLAHE and for the rest of the region the performance of the proposed method and CLAHE is comparable (Figure 11).
4. Conclusions
Proposed method combines two methods: local image contrast preserving dynamic range compression and CLAHE. The gain parameter for contrast enhancement varies linearly according to the pixel neighborhood edge density. The output of the CLAHE algorithm is used as a mapping function. Different quality measures are used for performance evaluation. From the subjective and objective evaluation criterion it is seen that in most of the cases proposed method’s output is better than CLAHE. Performance evaluation using statistical method also shows the proposed image enhancement method is superior than the traditional dynamic histogram equalization based method. Our method provides more image detail information than CLAHE while preserving the local contrast. In general, we can conclude that the proposed method performs better than CLAHE.

[]

[]

[]

[]

[]

[]

[Figure 1.] Overall block diagram of proposed image enhancement method. CLAHE, contrast limited adaptive histogram equalization.

[Figure 2.] Result of edge detection.

[Figure 3.] Mapping function (2) and (3) for rectangular region in (1). CLAHE, contrast limited adaptive histogram equalization.

[]

[]

[]

[Figure 4.] Image enhancement results: (1) input images, (2) contrast limited adaptive histogram equalization (CLAHE) output, (3) proposed method’s output.

[Figure 5.] First row is input image and second row is output using proposed method.

[Table 1.] Values of different image quality measures for (medical images) original image, CLAHE and proposed method

[Figure 6.] First column is input image, second is contrast limited adaptive histogram equalization (CLAHE) output, and third is proposed method’s output.

[Figure 7.] First row is input image and second row is proposed method’s output.

[Table 2.] Values of different image quality measures for (natural images) original image, CLAHE and proposed method

[Figure 8.] Statistical characteristics of images in Figure 9 before and after enhancement (image local block mean versus corresponding standard deviation): enhancements using contrast limited adaptive histogram equalization (CLAHE) (left) and proposed method (right).

[Figure 9.] Input image, contrast limited adaptive histogram equalization (CLAHE) output and proposed method’s output.

[Figure 10.] Local image blocks whose statistical plot lies on white region by proposed method but not by CLAHE (left) and local image blocks whose statistical plot is nearer to white region by proposed method than CLAHE (right). CLAHE, contrast limited adaptive histogram equalization.

[Figure 11.] Statistical characteristics of blocks in Figure 10 before and after enhancement (image local block mean versus corresponding standard deviation: enhancements using CLAHE (left) and proposed method (right). CLAHE, contrast limited adaptive histogram equalization.