- Open Access
Using weighted dynamic range for histogram equalization to improve the image contrast
© Huynh-The et al.; licensee Springer. 2014
- Received: 27 March 2014
- Accepted: 29 August 2014
- Published: 13 September 2014
In this paper, an effective method, named the brightness preserving weighted dynamic range histogram equalization (BPWDRHE), is proposed for contrast enhancement. Although histogram equalization (HE) is a universal method, it is not suitable for consumer electronic products because this method cannot preserve the overall brightness. Therefore, the output images have an unnatural looking and more visual artifacts. An extension of the approach based on the brightness preserving bi-histogram equalization method, the BPWDRHE used the weighted within-class variance as the novel algorithm in separating an original histogram. Unlike others using the average or the median of gray levels, the proposed method determined gray-scale values as break points based on the within-class variance to minimize the total squared error of each sub-histogram corresponding to the brightness shift when equalizing them independently. As a result, the contrast of both overall image and local details was enhanced adequately. The experimental results are presented and compared to other brightness preserving methods.
- Contrast enhancement
- Weighted dynamic range
- Brightness preserving
- Within-class variance
Enhancing contrast of images by using histogram equalization (HE) is the standard technique to improve the visual image by stretching the narrow input image histogram . However, it is not the appropriate method for consumer electronics, such as TV, because it changes the brightness of the original image strongly and degrades the image quality in visualization. Various methods have been proposed to limit the level of enhancement based on modifying the input histogram with mapping functions. The brightness preserving bi-histogram equalization (BBHE) , the dualistic sub-image histogram equalization (DSIHE) , and the minimum mean brightness error bi-histogram equalization (MMBEBHE)  divided the input histogram into two sub-histograms by a separating point. In order to enhance the image contrast, each sub-histogram was equalized independently. The BBHE method used the gray level as the mean value of image brightness to separate an input histogram into two parts: the first one is from the minimum gray level to the mean, and the second one is from the mean to the maximum gray level. The DSIHE method also used a similar approach to enhance the image contrast, except applying the median value instead of the mean value. In practice, the DSIHE is better than the BBHE in both preserving the image brightness and conserving the information content. The simple method to find out the separated point is to test all possible gray-scale values from 0 to L−1 of the histogram by calculating the difference between the mean brightness of input and the mean brightness of output. The separated point is chosen as the value that achieves the minimum difference in overall brightness. Although the above methods are better than HE in keeping the brightness of images, the visualization of enhanced images is degraded seriously, sometimes in detail and overall.
Based on the BBHE, the recursive mean separate histogram equalization (RMSHE)  and the recursive sub-image histogram equalization (RSIHE)  divided an original histogram into 2 n sub-histograms, where n is a positive integer value. The RMSHE splits the histogram into two parts by using the average of input brightness before separating one more time for each sub-histogram to have four segments in total. In practice, there are 2 n sub-histograms for n separated times. Having the same idea with the RMSHE in separation of more segments, the RSIHE also divided the histogram as well based on the median, rather than the mean of intensity values. Of note in these approaches, the output image looks like the copy version of the input image when n is too large, i.e., there is clearly no contrast enhancement here. In , the brightness preserving dynamic histogram equalization (BPDHE) divided the input histogram into an arbitrary number of sub-histograms based on break points which were determined by the local minima of the histogram. Based on the total number of pixels contained in each sub-histogram, the new partitions are obtained from the dynamic ranges by the new function for resizing. After the histogram equalization step, the output image would be normalized in brightness with the original to ensure that the mean of output intensity is close to the mean of input intensity. Moreover, the authors in  proposed a contrast enhancement method using the dynamic range separate histogram equalization (DRSHE) approach to preserve the naturalness of images and improve the overall contrast. The weighted average of absolute color difference (WAAD) used in the DRSHE produced an output image in which the adjusted histogram looks like the uniform distribution. The dynamic ranges in this study could be controlled by the adaptive scale factor to preserve the brightness. Detecting the start and stop positions of dynamic ranges is a difficult mission; thus, this algorithm cannot be suitable for various histogram types.
Another technique to improve the contrast, the weighted threshold histogram equalization (WTHE)  modified the probability density function of an image histogram. In detail, each original probability density value could be replaced by a new value based on the probability density function (pdf) with an initial threshold. Nevertheless, the disadvantage of this method is determining the threshold value through a scale parameter for the good visualization with no conditions to ensure the sum of the probability density value conserved. In order to solve this trouble, the recursively separated and weighted histogram equalization (RSWHE)  normalized the modified probability density function. With the other solution, each sub-histogram was smoothed by changing the corresponding original probability density function with the brightness preserving weight clustering histogram equalization (BPWCHE) . This approach assigned each non-zero bin of the input histogram for the clusters and computed their weights. By using three criteria to merge pairs of neighbor clusters, the sub-histograms were then equalized independently. The Global Contrast Enhancement Histogram Modification Algorithm  was represented as the effective method for contrast enhancement by adjusting linear operations of the input histogram and utilizing the black and white (BW) stretching to obtain the visually pleasing, artifact-free, and natural looking images. Recently, the authors in the article  proposed the adaptive gamma correction with weighting distribution (AGCWD) to adjust the brightness for dimmed images via the gamma correction mechanism and the probability density function of luminance pixels. In spite of achieving a better visualization in output images, failing in preservation of the overall brightness can be seen as the shortcoming of this approach. Besides that, some methods were designed to improve the contrast for low illumination color images , in which color restoration was used as the post-process after adjusting the brightness in the local and global region. The artificial bee colony  in artificial intelligence science was also used for the contrast enhancement application. In this study, the function for mapping the input to the output intensity was established based on the searching and optimization algorithm.
In this paper, the brightness preserving weighted dynamic range histogram equalization (BPWDRHE) is proposed as an efficient contrast enhancement method. The input histogram is separated by applying the Otsu method  to determine divided points. The purpose of this approach is to minimize each sub-histogram error corresponding to its mean brightness for histogram equalization. In order to be suitable to various input images, the region ranges can be resized by the scale factor that has been set as the initial value. As the post-processes, the HE-based histogram will be smoothed and normalized to get the pleasing visualization with protection in the output brightness.
The contrast enhancement method proposed in this paper consists of three steps:
Proposed separation algorithm: Separate the input histogram and adjust sub-histogram ranges by the scale factor.
Contrast enhancement: Apply histogram equalization for each sub-histogram independently.
Post-process: Smooth the histogram and normalize the overall brightness.To be clear about these steps, Figure 1 shows the flow chart of the BPWDRHE method. The framework in Figure 1 can be also applied for color images by improving the contrast of the luminance channel in the YCbCr color model.
Proposed separation: determine break points based on the minimization of the sum of weighted within-class variance
Average of the means of 40 testing image brightness (denoted as AMB)
Contrast enhancement: histogram equalization for each sub-histogram independently
where n k is the number of pixels of gray-level k, and N i is the total pixels contained in the i th sub-histogram such that N1 denotes the first sub-histogram.
Post-process: smooth the histogram and normalize the brightness
where B and B s are the mean brightness of the original and modified image after using the smoothing algorithm, respectively. The output image not only preserved the overall brightness but also obtained the comfortable visualization by applying the mapping function as given in Equation 12.
For simulation, the authors compared the BPWDRHE with the others which are the Global HE , BBHE , DSIHE , MMBEBHE , WTHE , BPDHE , RSWHE , and AGCWD  on various images. In practice, 40 gray images  and 10 color images  of the Kodak database set are utilized for quantitative measurement. Besides that, some random images are chosen for representation and discussion. For more details, the parameters and factors have been set in the proposed separation stage as follows: n=2 corresponding to four segments generated from the input histogram and α=0.85 for resizing the lengths of sub-histograms. Moreover, with parameters in the post-process, the authors use λ=1 and γ=10 to achieve efficiency in reducing negative effects from the over-enhancement and visual artifact behavior. These parameters have been chosen through the intermediate simulation, in which the experimental results are represented in Figures 2 and 3 and Table 1 (for explanation of n), Figure 6 (for description of α), and Figure 7 (for clarification of λ and γ). It is important to note that determined values for these parameters cannot be optimal for all images because the assessment for image quality depends on various aspects. In this paper, the authors try to estimate their values based on the observation of their specification. The influence of parameter n is measured by the average mean brightness (AMB) as shown in Table 1; meanwhile, the remaining parameters are proposed to overcome unexpected events from the histogram equalization scheme under visualization. However, the influence assessment of these parameters on the overall performance of the output images is necessary to be employed in the next simulation.
where max(Xi, j) and min(Xi, j) are the maximum and minimum gray levels, respectively, in block Xi, j. High-contrast sub-blocks give a high EME value, whereas for homogeneous sub-blocks, the EME value should be close to zero. It is worth to note that the EME is highly sensitive to noise. However, for the contrast enhancement application, this value is expected to be EME(Y)>EME(X).
In the next step, an evaluation of the proposed method includes three simulations. Firstly, the authors assess the influence of some parameters in the separation and post-process stage on the overall performance with the quantitative and quality results. Then, the proposed method is compared to the others with subjective assessment for both gray-scale and color images. Finally, the comparison of the objective assessment based on the above quantitative measurements is presented in detail.
Quantitative assessment of parameters on the overall performance
The original image
Absolute mean brightness error (AMBE) and average of AMBEs (AAMBE)
Global HE 
Discrete entropy (DE) and average of DEs (ADE)
Global HE 
Measure of enhancement (EME) and average of EMEs (AEME)
Global HE 
With the second measurement, the DE of the original image will be seen as the standard to be compared with the DE of enhanced images. The important thing to note is that the DE values of modified images are always equal or less than the original. This means that it is difficult to retain the detail of the output like the detail of the input. The behavior of losing detail occurs in most of the enhancement methods because the mapping function is nonlinear, that is, it usually has one output value for many input values. This behavior is absolutely considered through mapping function graphs as in Figures 16 and 19. The other way to explain based on histograms is that many original histogram bins grouped into one bin after enhancement can be the reason of the decrement in the DE values for over-enhanced images. It is not difficult to understand why the DE parameter of output images of these approaches is slightly reduced. Through Table 4, the performance of the proposed method and the RSWHE are quite similar in the average value of DE when both of them with high discrete entropy are better than the other methods. The Global HE gives the worst results in most of the samples with the least value of average as the loss of data of over 15%, while the remaining methods basically keep image content at the moderate level with the largest losing grade of 6%.
The comparison of EME values in Table 5 shows that the Global HE, BBHE, DSIHE, MMBEBHE, and WTHE methods usually get higher EME values than the remaining methods. Since the EME criterion measures a form of contrast, it is no surprise that these methods give the highest values even though they hardly ever produced the most visually pleasing images. Although the enhancement grade is identified through this value with the output value greater than the value of the original image, the high results of the above methods can be the main reason for the degradation of quality. As results for the Toy sample, some methods such as the Global HE, BBHE, DSIHE, MMBEBHE, and WTHE achieve the high value of EME corresponding to the high contrast; however, their outputs are seriously damaged unexpectedly in the quality. For the AGCWD method, increasing the brightness overall can be the cause of depressing the local contrast corresponding to the EME value, especially with the Aircraft sample. Meanwhile, the EME values achieved from the proposed method are enough to realize the difference of contrast between inputs and outputs without visual artifacts.
In summary, it is important to note that the quality of an enhanced image depends on many criteria. Besides increasing the contrast in the adequate grade to avoid the occurrence of artifact unexpectedly, the efficient method needs to preserve not only the overall brightness but also the detail in the output. Based on the experimental results, the proposed method satisfied these criteria at least in this evaluation with 50 test images; however, the trade-off here is the computation fee, that is, the algorithm will need more time for enhancing the steps.
In this work, the authors proposed and experimented on the new contrast enhancement method for both gray-scale and color image, called BPWDRHE. The BPWDRHE method enhanced the contrast with preservation of the overall brightness to generate the natural looking images. Unlike some previous techniques, the proposed method reduced the appearance of visual artifacts in the outputs. The novelty of proposed contrast enhancement is that the sum of weighted within-class variance was utilized to determine the break points for histogram separation based on the minimization of the total squared error of each sub-histogram corresponding to the equalization-based brightness shift. After applying the HE technique for these sub-histograms, the output image histogram will be smoothed and normalized to obtain the good visualization as the post-processes. Moreover, the BPWDRHE was estimated for gray-scale and color images and then compared to the others in various aspects with some common quantitative assessments, such as the absolute mean brightness error, the discrete entropy, and the measure of enhancement.
This research was funded by the MSIP (Ministry of Science, ICT & Future Planning), Korea in the ICT R&D Program 2013.
- Gonzalez RC, Woods RE: Digital Image Processing, 3rd Edition. Prentice Hall, New Jersey; 2007.Google Scholar
- Kim Y-T: Contrast enhancement using brightness preserving bi-histogram equalization. IEEE Trans. Consum. Electron 1997, 43(1):1-8. 10.1109/30.580378View ArticleGoogle Scholar
- Wang Y, Chen Q, Zhang B: Image enhancement based on equal area dualistic sub-image histogram equalization method. IEEE Trans. Consum. Electron 1999, 45(1):68-75. 10.1109/30.754419View ArticleGoogle Scholar
- Chen S-D, Ramli AR: Minimum mean brightness error bi-histogram equalization in contrast enhancement. IEEE Trans. Consum. Electron 2003, 49(4):1310-1319. 10.1109/TCE.2003.1261234View ArticleGoogle Scholar
- Chen S-D, Ramli AR: Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation. IEEE Trans. Consum. Electron 2003, 49(4):1301-1309. 10.1109/TCE.2003.1261233View ArticleGoogle Scholar
- Sim KS, Tso CP, Tan YY: Recursive sub-image histogram equalization applied to gray scale images. Pattern Recogn. Lett 2007, 28(10):15.Google Scholar
- Ibrahim H, Kong NSP: Brightness preserving dynamic histogram equalization for image contrast enhancement. IEEE Trans. Consum. Electron 2007, 53(4):1752-1758.View ArticleGoogle Scholar
- Park G-H, Cho H-H, Choi M-R: A contrast enhancement method using dynamic range separate histogram equalization. IEEE Trans. Consum. Electron 2008, 54(4):1981-1987.View ArticleGoogle Scholar
- Wang Q, Ward RK: Fast image/video contrast enhancement based on weighted thresholded histogram equalization. IEEE Trans. Consum. Electron 2007, 53(2):757-764.View ArticleGoogle Scholar
- Kim M, Chung M: Recursively separated and weighted histogram equalization for brightness preservation and contrast enhancement. IEEE Trans. Consum. Electron 2008, 54(3):1389-1397.View ArticleGoogle Scholar
- Sengee N, Choi H: Brightness preserving weight clustering histogram equalization. IEEE Trans. Consum. Electron 2008, 54(3):1329-1337.View ArticleGoogle Scholar
- Arici T, Dikbas S, Altunbasak Y: A histogram modification framework and its application for image contrast enhancement. IEEE Trans. Image Process 2009, 18(9):1921-1935.MathSciNetView ArticleGoogle Scholar
- Huang S-C, Cheng F-C, Chiu Y-S: Efficient contrast enhancement using adaptive gamma correction with weighting distribution. IEEE Trans. Image Process 2013, 22(3):1032-1041.MathSciNetView ArticleGoogle Scholar
- Zhou Z, Sang N, Hu X: Global brightness and local contrast adaptive enhancement for low illumination color image. Optik - Int. J. Light Electron Opt 2014, 125(6):1795-1799. 10.1016/j.ijleo.2013.09.051View ArticleGoogle Scholar
- Draa A, Bouaziz A: An artificial bee colony algorithm for image contrast enhancement. Swarm Evol. Comput 2014, 16: 69-84.View ArticleGoogle Scholar
- Abdullah-Al-Wadud M, Kabir MH, Dewan MAA, Chae O: A dynamic histogram equalization for image contrast enhancement. IEEE Trans. Consum. Electron 2007, 53(2):593-600.View ArticleGoogle Scholar
- The USC-SIPI Image Database . Accessed 20 Jan 2013 http://sipi.usc.edu/database/
- Kodak Lossless True Color Image Suite . Accessed 5 August 2013 http://r0k.us/graphics/kodak/
- Agaian SS, Silver B, Panetta KA: Transform coefficient histogram-based image enhancement algorithms using contrast entropy. IEEE Trans. Image Process 2007, 16(3):741-758.MathSciNetView ArticleGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.