Abstract
Contrast enhancement and Mean brightness conservation are two important parameters of image enhancement. A high contrast image is good in subjective quality assessment but also high contrast may cause over or under enhancement in the enhanced image. In this paper a new unsharp mask filtering technique with the combination of histogram equalization is used for the general-purpose images which maximizes the entropy of the image as well as controls the over and under enhancement by clipping the histogram of the image. After rigorous experimentation on standard data-set, it is observed that the information present in the image is highest in the proposed method i.e. the entropy value is highest and the mean brightness is also comparable with the other histogram based image enhancement methods. Mean opinion score(MOS) result shows that visual quality of the image is also better than existing methods.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The image enhancement process changes the pixel’s intensity in order to produce esthetically pleasing image to human eye. Histogram equalization (HE) [2] is generally used due to its simple and efficient approach for image enhancement. It basically redistributes the image intensity values uniformly which gives a higher contrast. In HE, the contrast of the image is increased by taking transformation function as cumulative density function (CDF) of the image. However, there are some drawbacks when HE is applied. The image mean brightness is disturbed and some artifacts may be introduced in the enhanced image.
Bi-histogram equalization (BBHE) technique [6] is introduced to conserve mean brightness of the input image. In BBHE image histogram is sub divided based on the input image’s intensity mean value. After that these sub-images are equalized independently. In dualistic sub-image histogram equalization (DSIHE) [20], the input image is divided into two histograms based on its median gray level, by keeping CDF = 0.5 or with the help of equal area property. Alex Stark proposed Adaptive image contrast enhancement using generalizations of histogram equalization (AHE) in 2000 [19] which had two variable parameters. Histogram equalization results were modulated by one of the parameter and other parameter regulated the image contrast.
In recursive mean sub-image histogram equalization (RMSHE) [14], the mean based histogram sub-division is done more than once. Mean brightness is preserved as we increase the number of partitions. The RMSHE preserved the image brightness as well as enhanced the contrast better than the above three methods. In recursive sub-image histogram equalization (RSIHE) [14] histogram separation is done based on the median more than once. RSIHE preserves mean brightness similar to RMSHE. This method produces better image quality as compared to previously discussed methods.
RSWHE-M (Recursive Separated and Weighted Histogram Equalization Mean) method was given in 2008 after further extending RMSHE and RSIHE methods. It maintains the image brightness as well as enhances the contrast of image. In RSWHE-M [7], histogram segmentation is done in the same way as in RMSHE, and then an accumulative probability weighted factor αx is calculated for each sub-histogram. RSWHE-D (Recursive Separated and Weighted Histogram Equalization Median) is similar to RSWHE-M except that histogram segmentation is done with the help of median. The major drawback of the recursive methods is that they are very time consuming as the division process is done more than once.
In minimum mean brightness error bi-histogram equalization (MMBEBHE) [1] the image histogram is divided into sub histograms on the basis of minimum mean brightness error and thereafter each sub-divided histogram are equalized independently with HE. But image get over enhanced or under enhanced if PDF of image is very narrow in shape.
Survey of contrast enhancement techniques based on histogram equalization was presented in 2011 [5] which discussed the comparative study of different HE techniques. Similarly Survey on histogram equalization method based image enhancement techniques was presented that also compared the various HE based methods [10]. Contrast enhancement techniques for images also showed the different methods of enhancement [13].
Exposure based sub Image Histogram Equalization(ESIHE) [15] was proposed in 2014. This is very effective for over enhanced images and provides maximum entropy along with enhancement. In this technique, one clipping threshold is calculated and the histogram is clipped according to this clipping threshold. This clipping process prevents the over enhancement problem. ESIHE control only over enhancement [4, 16], it does not preserve mean brightness.
Contrast enhancement using entropy-based dynamic sub-histogram equalization (CEDHE) [11] proposed in 2016 used a iterative division of the histogram depending on the entropy of the sub histograms. Finally the sub-histograms were equalized to obtain the enhanced image. This technique enhanced the contrast of the image but the resultant image is not smooth as well as the image is over enhanced.
In the proposed method unsharp masking technique is first used to sharpen the image, then the image is clipped and equalized based on the histogram equalization. The over and under enhancement problem is avoided by clipping. Finally the resultant image is again smoothed and sharpened by the filter employed in unsharp masking. This technique is very effective for general-purpose images. The objective results of this method are much better as compared to all the previous methods as well as the subjective quality is also highest among all.
Rest of the paper is organized as follows. Section 2 discuss about motivation for this work. Proposed work is presented in the Section 3. In Section 4 evaluation parameters are discussed which are used in results to verify the proposed method justification. Results are discussed in Section 5, which consist of three subsections to verify the proposed method differently. Finally conclusions held in Section 6.
2 Motivation
The main purpose behind introducing this method is to basically avoid the over and under enhancement problem which is observed in all the histogram equalization techniques [3] discussed above. This method can well preserve the brightness of the image as well as prevents artifacts in the enhanced image unlike the other HE methods. The other reason to put forward this method is that, it can very well bring out the details of the image while maintaining the natural appearance of the image. Since, the filter is being employed in this method, the variable parameter of the filter makes it suitable to be used for different types of images. If compared to Recursive methods and MMBEBHE method as discussed in Section 1 the proposed method is also very fast.
In HE techniques, gray values are transformed to a higher or lower gray levels depending on probability density function (PDF) of image. Figure 1a shows the original Einstein image and histogram equalized Einstein image is shown in Fig. 1b. Figure 1c shows change in the intensity level after HE technique. The x-coordinate is showing the input intensity and the y-coordinate is the increment or decrement of each intensity level. Figure 1d shows the modified values of intensity by using the curve illustrated in Fig. 1c. Figure 1b shows that the face portion of Einstein has became extra white, this shows high change in intensity and that is also clear from Fig. 1d. Figure 2a and b shows the F16 image and histogram equalization of F16 image respectively. Figure 2c again shows change in the intensity level after HE technique. Figure 2d shows the modified values of intensity by using the curve illustrated in Fig. 2c. Figure 2b shows that HE makes more dark then original image, this shows high change in intensity and that is also clear from Fig. 2d. A higher change in gray levels leads to over enhancement or under enhancement of the enhanced image. If graph of HE technique is much above the reference line then output image gets over enhanced as in Fig. 1b and if the graph of HE technique is much below reference line, output image is under enhanced as in Fig. 2b. In the proposed technique the over and under enhancement of images is avoided along with the sharpening. of images.
Figure 3 shows the histogram results of Girl image at different stages. The idea behind combining Sharpening process with HE is explained from this figure. Figure 3a is the input Girl image. Figure 3b is the histogram of input image. Figure 3c is obtained after applying HE to input image. Figure 3d histogram is the difference between Fig. 3c and b. Figure 3e is the FFT generated for the Fig. 3d.
Figure 3f is the histogram of sharpened image. Figure 3g is obtained after applying HE to the sharpened image. Figure 3h histogram is final enhanced image histogram obtained after applying filter again. It can be clearly seen that sharpening process only sharps the image but, if we combine it with HE than it can also increase the dynamic range of the image providing over all enhancement as can be seen in Fig. 3h. Figure 3i histogram is the difference between Fig. 3h and b. Now, if we compare Fig. 3i and d the change in number of pixels in y-direction is smooth in Fig. 3i rather than Fig. 3d. In Fig. 3d there are more oscillations produced in the number of pixels. This can also be observed from Fig. 3e and j which are the FFT of Fig. 3d and i respectively. In Fig. 3e the oscillation is too high as compared to Fig. 3j. Due to this reason the enhanced image obtained through HE method has arte-facts. Hence, this was the motivation for proposing this particular technique.
3 Proposed method
The steps of the proposed algorithm is explained by the flowchart below (Fig. 4).
3.1 Image sharpening
Basically sharpening is a method to improve the apparent sharpness of an image. It describes the information present in the image, especially those which are missed out by the viewer [17]. Here, Unsharp masking technique is used for sharpening. Basically a blurred (unsharp) copy of the image is subtracted from the original image to find out all the edges. Using this edge details a mask is created. The edges contrast is then improved and the overall effect is made applicable to the original image.
The specimen image is spatially filtered with a Gaussian filter to produce a unsharp mask [8, 12]. This filter can be treated as a convolution operation of an image with a kernel mask giving a two-dimensional Gaussian function hg(x,y) and is given as:
The parameterσ defines the size of the Gaussian kernel mask, and the dimension of the kernel mask decides the domain of frequencies that are rejected by the Gaussian filter. The original image subtracts the unsharp mask according to the equation:
In (3), the brightness value of a pixel at the coordinate (x,y) in the filtered image is given by the function F(x,y), and I(x,y) and U(x,y) represent the brightness values of the corresponding pixels in the original and unsharp mask (blurred) images, respectively. The constant c controls the relative weightings of the original and blurred images in the difference equation. The benefit of using this method over other sharpening filters is the flexibility of control due to adjustable parameter. In this filter, there are two variable parameters i.e. one is standard deviation σ as mentioned in (1) and the other is c mentioned in (3). Generally the range of c lies between 0.5 to 1 and the value of σ is calculated in pixels.
3.2 Clipping threshold
After obtaining the Sharpened image by above procedure the histogram of the image is now generated and clipped to avoid the over and under enhancement caused by the regular HE techniques. Here, the clipping threshold is computed as the mean of gray level occurrences. The reason for selecting this particular method of histogram clipping is due to its efficiency and fast speed. Let F is the filtered image, range of the gray values lies between 0 to L-1(F0,F1,...,Fi,...,FL− 1). H(F) = (n0,n1,...,ni,...,nL− 1) is the histogram of the filtered image, where ni is the number of pixels with i gray level. Let N is total number of pixels in image. Clipping threshold (CT) is calculated as:
Clipped Histogram is calculated as:
Figure 5 shows the clipped and un-clipped histogram for the F16 image. It can be observed from the figure that the part of the histogram which has peaks is smoothed by the clipping process and the rest part is overlapped.
3.3 Segmentation threshold
Clipped histogram (HC(F)) is now bisected on the basis of the mean intensity value like in BBHE technique. Let Fm denotes the mean intensity value of the clipped histogram. Hence, histogram subdivision is done with Fm and this process generates two sub images Fl and Fu as
where
The sub image Fl composed of (F0,F1,...,Fm) and the other sub image Fu composed of (Fm+ 1,Fm+ 2,...FL− 1).
3.4 Equalization process
After the segmentation of the clipped histogram the histogram equalization process is applied to the two sub images. Probability density function(PDF) of the sub images is calculated as:
where i = 0,1,...,m and nL is the total number of pixels from F0 to Fm intensity levels.
where i = (m + 1),(m + 2),...,(L − 1) and nU is the total number of pixels from Fm+ 1 to FL− 1 intensity levels. Cumulative density functions (CDF) are then defined as
Transform functions in terms of cumulative density functions:
Transform function of the image is given by TF
The TF image obtained above is again passed through a gaussian filter for sharpening purpose as in Section 3.1 and a final enhanced image is produced.
4 Evaluating parameters
In literature two parameters Absolute Mean Brightness Error (AMBE), [18, 21] and Entropy are widely-used as a quantative assessment parameters for image enhancement.
ABME is used to measure the brightness difference between the original and the enhanced image and is defined as
where Im is mean intensity of the input image and Iem is mean intensity of enhanced image. For better preservation of mean brightness, the value of AMBE is much less, means the value of Im and Iem are close to each other. Im and Iem can be calculated as:
where, I(i,j) and Ie(i,j) are the input and enhanced image respectively which contains M * N pixels.
Entropy is simply the amount of information (in the Shannon sense) that would be needed to specify the details of the image [9].
where p(Ii) is the probability value of the ith intensity level. The higher value of entropy indicates a image with high contrast.
Histogram utilization efficiency (Effhist) [11] is one more important parameter which can be tested to analyze the image histograms property. It is given as:
where NZbe and NZbo represents the number of non-zero bins(utilized gray levels) of enhanced and original image correspondingly. (Effhist) value should be approaching to 1.
5 Results and discussion
In this section, first of all the results of proposed method is analyzed at each step in Figs. 6, 7, 8, 9 and 10. Next, proposed technique is applied over some standard images like F16, couple, lena, einstein, lady, U2, girl, Sphinx and Cactus and its performance is compared with some HE based methods including BBHE, DSIHE, RSIHE,RSWHE-D, MMBEBHE, ESIHE, CEDHE. Quantitative evaluation is done with the help of three parameters i.e. Entropy, AMBE and Histogram Utilization Efficiency.
Figure 6 shows the enhancement result for Girl image at different stages of the proposed method. Figure 6a is the original image. Figure 6b is obtained after applying initial unsharp mask filter to the input image. As we can see that the girl features are sharped at this step. Figure 6c is obtained after applying HE to the sharped image. We can observe that image is overall enhanced together with sharpened features. Figure 6d is final enhanced image obtained after applying filter again to Fig. 6c. If carefully observed Fig. 6d is more pleasing than Fig. 6c. Every details of the image is very sharp and clear. Specifically, if we see the girl’s hair, every curls of hair is clearly visible.
Similarly we can analyze Fig. 7. Figure 7a is the original F16 image. In Fig. 7b it can be seen that plane and the surrounding mountain linings are very sharped. In Fig. 7c the overall image is enhanced with very good contrast. Finally in Fig. 7d the image looks very clean and sharp with enhanced contrast, brightness as well as detail richness. Similar analysis can be done for other images as well (Figs. 8, 9 and 10).
5.1 Quantitative assessment
Table 1 shows the results for different images and different techniques. The best and second best values are marked in bold. The higher value of entropy indicates more detail in an image. It can be observed that the proposed method achieves higher entropy values for all images as compared to other techniques. Hence, the details richness is best in proposed method. However for other HE techniques the entropy values are very less than the original image entropy values.
The value of AMBE must be small for better brightness preservation. From table, it is clear that RSWHE-D and MMBEBHE are preserving maximum brightness. Proposed method also have lower AMBE compared to HE, BBHE, DSIHE, ESIHE and CEDHE. Hence it can be concluded that proposed method preserve the brightness up to a certain level that helps to avoid the artifacts present in the HE method.
The Histogram utilization efficiency (Effhist) values obtained by proposed method for F16, Couple, Lena, Einstein, Lady, U2 and Girl images are 0.97, 0.99, 0.98, 0.96, 0.97, 0.95 and 0.98 respectively, which are the highest values among all. CEDHE method achieves second highest values for Effhist.
5.2 Performance analysis based on visual quality
Proposed method provide control on under and over enhancement and maintains the brightness of image and give natural appearance compared to image generated using HE, BBHE, DSIHE, RMSHE, RSIHE, RSWHED, MMBEBHE, ESIHE, CEDHE techniques.
In proposed technique, sharpening process is used to sharpen the edges, as it can be seen that all the edges around the plane in Fig. 11j are highlighted. Due to under enhancement problem in most of the HE techniques natural clouds become more darker so the high gray level are transformed in low gray level. Proposed method provide proper enhancement without under enhancement.
For Einstein image in Fig. 12, the face portion is over enhanced in HE, BBHE, DSIHE and RSIHE methods while in weighted technique the image looks like blur image. Although the AMBE values is less in RSWHE-D but the visual appearance of the image is not good. MMBEBHE ESIHE and CEDHE images are also not very much appealing as compared to proposed technique.
In Fig. 13 the background of the girl image has artifacts in all the HE techniques except ESIHE and CEDHE. Also the face of the girl is distorted in all the techniques except ESIHE technique. The image enhanced by CEDHE method is not smooth and clear. The proposed technique has control on enhancement and gives the proper result compared to all the methods.
Figure 14 shows the result for couple image. As we can see that original image is dark image, HE method enhanced the image but it has over enhanced it making the image too bright. Result for BBHE, DSIHE and RSIHE for couple image looks nearly same but these methods introduced arte-facts in the image. Some parts of the image are blurred in the RSWHE-D and MMBEBHE enhanced image. Image obtained by CEDHE is not very smooth. ESIHE produced good contrast enhancement result. Proposed method enhanced the image very well with good contrast and brightness. It gives much better visual quality than ESIHE as well.
Figure 15 shows the result for Lady image. HE, BBHE and DSIHE methods made the Lady face and background too much white. RSIHE and MMBEBHE techniques also produced arte-facts in the enhanced image. The image obtained by RSWHE-D is completely distorted as we can see from the figure. ESIHE enhanced the image upto some level but it also made face of the Lady bright in comparison to original image. CEDHE resulted in somewhat dull image. The image enhanced by proposed method looks visually very well with sharp front and background features.
Figures 16 and 17 shows the result for color images. It can be observed that the HE and BBHE enhanced images have distortion in the background area. DSIHE and RSIHE images are almost same as the original image. MMBEBHE and RSWHE-D again produces the artifacts. ESIHE and CEDHE has good contrast enhancement, but the proposed method gives the best image with the clear background.
In Fig. 17 the HE, BBHE and MMBEBHE makes the image too much bright. DSIHE, RSIHE and ESIHE enhances the contrast upto some level. RSWHE-D has artifacts in the background portion. CEDHE and proposed technique enhances the image very well.
A mean opinion score (MOS) test was conducted on test images shown above to support the visual assessment results. The opinion was taken from 20 people and the image ratings were given from 1–5, where 1 means worst and 5 corresponds to best. Table 2 shows the MOS results for HE, BBHE, DSIHE, RSIHE, RSWHE-D, MMBEBHE, ESIHE, CEDHE and proposed method. In the table it can be very well observed that the MOS value for the proposed technique is highest for all the images except the sphinx image.
5.3 Discussion on over enhancement and under enhancement
HE techniques are used to enhance the image but some time image gets over enhanced or under enhanced by some of HE technique and creates artifacts because of over enhancement and objects are not clearly distinguished with background because of under enhancement. Figures 18 and 19 shows the transformed intensity comparison between the proposed method and the other techniques. Figure 18 shows the over enhancement of the different techniques for the couple image. As it can be seen from Fig. 18a to h that the intensity curve of enhanced image is far away from the reference line in all the methods except the proposed one. Figure 19 shows both over and under enhancement for the girl image. Again it can be seen that the intensity curve of enhanced image both in upper part and in lower part is far away from the reference line in HE, BBHE, DSIHE, RSWHE-D, MMBEBHE and CEDHE. Here RSIHE and ESIHE are close to proposed technique.
6 Conclusion
In this paper a new method of histogram equalization with the unsharp masking technique and controlled enhancement is proposed that can effectively solve the problem of artifacts and visual effect. It prevents the image to be over enhanced and under enhanced and also gives the highest information present in it. Proposed method outperformed state of art existing methods in terms of entropy, Histogram utilization efficiency and mean opinion score. The visual assessment results also shows the robustness of the method and superiority on existing methods for different variety of general-purpose images. In future this work can be extended for enhancement of satellite and agriculture based images by utilizing and analyzing the variable parameters of the filter.
References
Chen S D, Ramli A R (2003) Minimum mean brightness error bi-histogram equalization in contrast enhancement. IEEE Trans Consum Electron 49(4):1310–1319
Gonzalez R C, Woods R E (2008) Digital image processing, 3rd edn. Prentice Hall, Englewood Cliffs
Huang S-C, Cheng F-C, Chiu Y-S (2013) Efficient contrast enhancement using adaptive gamma correction with weighting distribution. IEEE Trans Image Process 22 (4):1032–1041
Kapoor R, Singh K (2014) Image enhancement via median-mean based sub-image clipped histogram equalization. Optik 125:4646–4651
Kaur M, Kaur J, Kaur J (2011) Survey of contrast enhancement techniques based on histogram equalization. Int J Adv Comput Sci Appl (IJACSA) 2(7):137–141
Kim Y T (1997) Contrast enhancement using brightness preserving bi-histogram equalization. IEEE Trans Consum Electron 43(1):1–8
Kim M, Chung M G (2008) Recursively separated and weighted histogram equalization for brightness preservation and contrast enhancement. IEEE Trans Consum Electron 54(3):1389–1397
Kotera H, Wang H (2005) Multiscale image sharpening adaptive to edge profile. J Electron Imaging 14(1)
Moon T K, Stirling W C (2000) Mathematical methods and algorithms for signal processing. Prentice-Hall, Upper Saddle River
Nithyananda C R, Ramachandra A C, Preethi (2016) Survey on histogram equalization method based image enhancement techniques. In: IEEE international conference on data mining and advanced computing (SAPIENCE)
Parihar A S, Verma O P (2016) Contrast enhancement using entropy-based dynamic sub-histogram equalization. IET Image Process 10(11):799–808
Ramponi G (1998) A rational unsharp masking technique. J Electron Imaging 7 (2):333–338
Ritika, Kaur S (2013) Contrast enhancement techniques for images. Int J Comput Appl 64(17):20–25
Sim K S, Tso C P, Tan Y Y (2007) Recursive sub-image histogram equalization applied to gray scale images. Pattern Recogn Lett 28:1209–1221
Singh K, Kapoor R (2014) Image enhancement using exposure based sub image histogram equalization. Pattern Recogn Lett 36:10–14
Singh K, Kapoor R, Sinha S K (2015) Enhancement of low exposure images via recursive histogram equalization algorithms. Optik 126:2619–2625
Spring K, Russ J C, Mathew J, Hill P, Fellers T, Davidson MW (2016) Unsharp mask filtering. In: Interactive tutorials-optical microscopy primer
Sridhar S (2011) Digital image processing. Oxford University press, Oxford
Stark J A (2000) Adaptive image contrast enhancement using generalizations of histogram equalization. IEEE Trans Image Process 9(5):889–896
Wang Y, Chen Q, Zhang B (1999) Image enhancement based on equal area dualistic sub-image histogram equalization method. IEEE Trans Consum Electron 45 (1):68–75
Zimmerman JB, Pizer SM, Staab EV, Perry JR, McCartney W, Brenton BC (1988) An evaluation of the effectiveness of adaptive histogram equalization for contrast enhancement. IEEE Trans Med Imaging 7(4):304–312
Acknowledgements
This work was supported by Dept. of Electronics and Communication Engineering, NIT Delhi
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Kansal, S., Purwar, S. & Tripathi, R.K. Image contrast enhancement using unsharp masking and histogram equalization. Multimed Tools Appl 77, 26919–26938 (2018). https://doi.org/10.1007/s11042-018-5894-8
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-018-5894-8