Image Contrast Enhancement by using Histogram Clipping and 2-D Histogram
Subject Areas : Signal Processing; Image ProcessingMahdis Golabian 1 , Azar Mahmoodzadeh 2 * , Hamed Agahi 3
1 - the Department of Electrical Engineering,Shiraz Branch, Islamic Azad University, Iran, Shiraz
2 - Electrical Engineering,Islamic azad University,Shiraz Branch,Shiraz,Fars,Iran
3 - Department of Electrical Engineering,Shiraz Branch, Islamic Azad University, Iran, Shiraz
Keywords: Skewness, Contrast Enhancement, Visual machine algorithm, 2-D Histogram, clipped Histogram,
Abstract :
Several factors are affected images' contrast and eliminated details in images. Therefore, contrast enhancement is a critical process for any visual machine algorithms. To achieve this purpose, in this paper, a novel algorithm based on 2-D histogram and clipped histogram is introduced. To improve the performance of the algorithm, the histogram is divided into three sub-histograms based on mean and standard deviation. For each sub-histogram image, clipped histogram is calculated, separately. The threshold for clipping of histogram is obtained based on median of 2-D histogram of image. Based on the pervious researches we know that the desired distribution for 2-D histogram is Gaussian distribution. Hence, we introduce a novel iterative algorithm for transforming the available histogram to desired histogram. On the other words, our method modifies image histogram to improve its contrast. Our proposed method is based on Skewness, where algorithm is attempted to minimize the absolute value of Skewness. The performance of the algorithm is compared by several algorithms based on different factors. Simulation results indicate the proposed algorithm has the best performance than other algorithms.
Signal Processing and Renewable Energy, Month XX Year XXXXXX
Signal Processing and Renewable Energy Month–Year-(pp XX - XX ) ISSN: 2588-7327 eISSN: 2588-7335 |
Image Contrast Enhancement by using Histogram Clipping and 2-D Histogram
Mahdis Golabian1, Azar Mahmoodzadeh*1, Hamed Agahi1
Department of Electrical Engineering, Shiraz Branch, Islamic Azad University, Iran, Shiraz (*Corresponding Author’s Email: mahmoodzadeh@iaushiraz.ac.ir).
ABSTRACT
Several factors are affected images' contrast and eliminated details in images. Therefore, contrast enhancement is a critical process for any visual machine algorithms. To achieve this purpose, in this paper, a novel algorithm based on 2-D histogram and clipped histogram is introduced. To improve the performance of the algorithm, the histogram is divided into three sub-histograms based on mean and standard deviation. For each sub-histogram image, clipped histogram is calculated, separately. The threshold for clipping of histogram is obtained based on median of 2-D histogram of image. Based on the pervious researches we know that the desired distribution for 2-D histogram is Gaussian distribution. Hence, we introduce a novel iterative algorithm for transforming the available histogram to desired histogram. On the other words, our method modifies image histogram to improve its contrast. Our proposed method is based on Skewness, where algorithm is attempted to minimize the absolute value of Skewness. The performance of the algorithm is compared by several algorithms based on different factors. Simulation results indicate the proposed algorithm has the best performance than other algorithms.
Visual machine algorithm, Contrast enhancement, 2-D Histogram, clipped Histogram, Gaussian distribution, Skewness
1. INTRODUCTION
Contrast is defined as a difference between luminance in gray or color images. Extracting features and details are too difficult in low contrast images. The contrast of images is affected by several factors such as defect in camera or transmission systems, environment effects such as shadow, light or etc. Contrast is a vital factor in images and it is so important for any machine visions systems. Visual image quality is actively enriched using contrast enhancement approaches, which are increasingly essential for the design of consumer electronic devices and digital multimedia systems. Image contrast enhancement is an important process to improve dynamic intensity range of pixels. In this process, an intensity of images is changed to increase contrast of image[1].
Conventional contrast enhancement such as histogram equalization (HE) method is used widely in many practical applications. These methods usually increase image contrast at peaks values and may cause noisy effect on images[2]. In pervious papers, researchers introduced some methods. Such as, Brightness preserving bi-histogram equalization (BBHE)[3], Dominant Orientation-based Texture Histogram Equalization (DOTHE) [4]exposure based sub-image HE algorithm (ESIHE) [5]to overcome these challenges. Whole above algorithms divide image histogram to several partitions and use
HE algorithm to process sub histograms. The main disadvantage of these methods still is intensity saturation at some of the sub histograms. In some recent papers, researchers use histogram clipping methods such as CLAHE [6]to prevent intensity saturation. Clipped histogram equalization technique is a novel version of HE methods that control undesired increasing of contrast and avoiding image saturation[7]. In[8], histogram is clipped based on median of histogram. This median is named threshold and calculated adaptively for any images. In both papers, if the value of histogram is more than the threshold value, histogram is clipped. In [9]histogram of image is divided to several sub-histogram based on the mean and variance of histogram. In[10] authors used adaptive gamma correction for improving image contrast. Gamma correction is a nonlinear method for enhancing luminance and contrast in images. Another method for improving image contrast is a method based on discrete cosine transform (DCT). This method is introduced in[11], where the method operates in the DCT domain and is computationally efficient, which makes it suitable for real-time imaging systems.
Due to the importance of contrast improvement, in addition to the above research, contrast improvement has also been considered by scientists. For instance, in[12], researchers used Fuzzy logic method for improving image contrast which adaptive fuzzy inferencing system determines the pixel value of the output based on the contrast measure of the input image. In[13], authors introduced a method based on the adaptive non-linear contrast stretching. Contrast stretching improves the contrast in an image by stretching the range of intensity values. Optimization algorithm still used by researchers for this purpose. For instance, in[14], Artificial Bee Colony Algorithm is used for introducing adaptive image contrast enhancement. This research investigates the system performance based on the different metrics such as peak signal to noise ratio (PSNR), SSIM (Structural Similarity Index), SNR (Signal to Noise Ratio), MSE (Mean Squared Error). Wavelet transform can be used for image contrast enhancement. In[15], researchers introduced an algorithm in the wavelet domain. In that paper, a contrast sensitivity function is obtained for each sub-band which is applied to weight the wavelet coefficients in the sub-band.
All pervious papers are based on one dimensional (1-D) histogram modification for contrast enhancement. In some recent papers, authors use 2-D histogram. The main advantage of 2-D histogram is that, it can counts the pairs of adjacent pixels with gray levels and represent the gray level difference between the pixels of an input image and their neighbors[16]. As a comparison, a 1-D histogram is nothing more than counting how many voxels with a particular intensity occur in the image. The intensity range of the image is divided in bins. A voxel then belongs to the bin if its intensity is included within the range the bin represents. Therefore, we use 2-D histogram in our paper. In addition, we use clipped histogram equalization technique to avoid any undesired increasing pixel intensity. We use three level thresholds for clipping histogram. Three level thresholds cause to eliminate outlier values and increase image contrast algorithm. As mentioned above, for 2-D histogram, a desired distribution is Gaussian distribution. For ideal Gaussian distribution, the amount on Skewness is equal to zero. Therefore, in our proposed algorithm, we attempt to minimize the value of Skewness for 2-D histogram of image. Hence, the algorithm is an iterative algorithm improves image quality, adaptively.
The rest of this paper is organized as follows; in the section 2, we introduce our proposed algorithm, mathematically. In the section 3, simulation results are presented and discussed, conclusion is explained in the section 4.
2. PROPSED ALGORITHM
In this section, the proposed algorithm is described. The proposed algorithm flowchart is shown in the figure 1. In the proposed algorithm the image contrast is improved based on the iterative algorithm. Skewness of the histogram is used as decision metric. The algorithm is repeated until the Skewness be less than threshold value. In the first subsection, 2-D histogram is introduced. In the second subsection, the Clipped histogram is presented mathematically and in the third subsection, the proposed algorithm is described. The proposed clipped histogram algorithm is obtained based on the standard division and mean of the image histogram.
Figure 1. Flowchart of the proposed algorithm
2.1 Sub-section Head Style
As mentioned before, 2-D image histogram gives more information than 1-D image histogram. Therefore, in this research, uses 2-D histogram for improving image contrast. For calculating 2-D image histogram, assume color or gray level image with low contrast quality. For gray image, the histogram intensity has values between zeros to 255. Color images have three channels for main colors (i. e. Blue, Green, Red) which each one has values between zeros to 255. Letting as input image where and are number of pixels in row and columns, respectively. as a sorted k distinct gray level of image . 2-D histogram is defied mathematically as follows[16]:
| (1) |
Where
| (2) |
| (3) |
| (4) |
| (5) |
| (6) |
| (7) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (8) |
| (9) |
|
(10) |
| (11) |
|
(12)
|
| (13)
|
Input: image Output: image 1. Calculate Skewness based on Eq. 5 2. While upper than threshold value do 3. Calculate 2-D histogram based on Eq. 2 4. Calculate mean and standard deviation based on Eq. 7 and Eq. 8, respectively 5. Divide histogram into three parts 6. Calculate median of histogram based on Eq. 9 for each parts 7. Calculate new value for 2-D histogram based on Eq. 10 8. For each intensity value, calculate a new value for pixels based on Eq. 11 9. Check the value for output image 10. If condition in Eq. 13 is satisfied the algorithm is finished, otherwise return to step 1
2.4 Sub-section Head Style
To evaluate the performance of the algorithms; we need to examine our proposed algorithm's performance by different metrics. Nowadays, there are a several metrics that are used by researchers for investigating their algorithms. In this research, we use five metrics including PSNR, SSIM, AMBE, Entropy and spatial frequency. The first one is peak signal-to-noise ratio (PSNR) where is used widely in many researches. PSNR is defined as follows[18]:
Figure 6 and table 2 indicate the results for the second image test. For this image it is observed the performance of the proposed algorithm has the better than other algorithms. It is worth to note that, it may possible our algorithm has the worth performance than a spatial algorithm in one metrics but it has better than that algorithm in other metrics. Indeed, we should consider the performance of algorithms in whole metrics. For more investigating, we apply different images in our algorithm and other algorithms. In the following figures and tables, the results for other images are presented. It is observed for all images, our proposed algorithm has the best performance.
Figure 6. original, low contrast and reconstructed images by different algorithms for the second image test Table 2. the metrics results for different algorithms for the second image test
Figure 7. original, low contrast and reconstructed images by different algorithms for the third image test Table 3. the metrics results for different algorithms for the third image test
Figure 8. original, low contrast and reconstructed images by different algorithms for the fourth image test Table 4. the metrics results for different algorithms for the fourth image test
Figure 9. original, low contrast and reconstructed images by different algorithms for the fifth image test Table 5. the metrics results for different algorithms for the fifth image test
4. Conclusion
We proposed a novel method for contrast enhancement in this research. The proposed algorithm is used 2-D histogram and divided it into three parts based on the statistical parameters. In addition, the clipping histogram method is used in this algorithm. Clipping method is a procedure to avoid image saturation. The main idea behind this research is to use Skewness to transform histogram distribution to Gaussian distribution. An iterative method is designed in this paper to minimize the Skewness of the histogram. At the end, the performance of the proposed algorithm is compared with different algorithms based on the different metrics and it is observed the proposed algorithm has the better performance than other investigated algorithms.
References 1. Gonzalez R. C. and Woods R. E., “Digital Image Processing”, 2nd ed. Englewood Cliffs, NJ: Prentice- Hall, 2002 2. Mousania, Younes, Salman Karimi, and Ali Farmani. "Optical remote sensing, brightness preserving and contrast enhancement of medical images using histogram equalization with minimum cross-entropy-Otsu algorithm." Optical and Quantum Electronics 55.2 (2023): 105 3. Abin, Deepa, et al. "Brain Tumor Image Enhancement Using Blending of Contrast Enhancement Techniques." International Conference on Image Processing and Capsule Networks. Cham: Springer International Publishing, 2022 4. Singh N, Kaur L, Singh K, Histogram equalization techniques for enhancement of low radiance retinal images for early detection of diabetic retinopathy, Engineering Science and Technology, an International Journal 2019; 22: 736-745 5. Chaudhary, Suneeta, Anuj Bhardwaj, and Puneet Rana."Image enhancement by linear regression algorithm and sub-histogram equalization."Multimedia Tools and Applications 81.21 (2022): 29919-29938 6. Sonali, et. Al., An approach for de-noising and contrast enhancement of retinal fundus image using CLAHE, Optics & Laser Technology 2019; 110: 87-98 7. Fu X, Cao X, Underwater image enhancement with global–local networks and compressed-histogram equalization, Signal Processing: Image Communication, 2020: 86 8. Kandhway P, Bhandari A. K., An optimal adaptive thresholding based sub‑histogram equalization for brightness preserving image contrast enhancement, Multidimensional Systems and Signal Processing 2019; 66 9. Guo,Jiawei, et al. "A survey on image enhancement for Low-light images." Heliyon (2023) 10. Veluchamy M, Subramani B, Image contrast and color enhancement using adaptive gamma correction and histogram equalization, Optik, 2019; 183: 329-337 11. Parihar A. S, Histogram modification and DCT based contrast enhancement, 2nd International Conference on Inventive Systems and Control (ICISC), 2018. 12. Fernandes S., Shetty A., Vashi H., Kelkar V., Adaptive Contrast Enhancement using Fuzzy Logic, International Conference on Advances in Computing, Communication and Control (ICAC3), 2019. 13. Yelmanov S., Romanyshyn Y., A New Image Enhancement Technique Based on Adaptive Non-linear Contrast Stretching. IEEE 2nd UkraineConference on Electrical and Computer Engineering (UKRCON), 2019. 14. Keerthanaa K., Radhakrishnan A., Performance Enhancement of Adaptive Image Contrast Approach by using Artificial Bee Colony Algorithm, Fourth International Conference on Computing Methodologies and Communication (ICCMC), 2020. 15. Bin X, et. Al., Brightness and contrast controllable image enhancement based on histogram specification, Neuro computing 2018; 275: 2798-2809 16. Mittal H, Saraswat M, An optimum multi-level image thresholding segmentation using non-local means 2D histogram and exponential Kbest gravitational search algorithm, Engineering Applications of Artificial Intelligence 2018; 71: 226-235 17. King K.M, Kim D. S, McCabe C. j, Random responses inflate statistical estimates in heavily skewed addictions data, Drug and Alcohol Dependence 2018; 183: 102-110 18. Borda, Monica, Fundamentals in Information Theory and Coding. Springer. 2011. 19. Ponticorvo A, et. al., Spatial Frequency Domain Imaging (SFDI) of clinical burns: A case report, Burns Open 2020; 4: 67-71 20. https://data.mendeley.com/datasets/3hfzp6vwkm/3
Authors
Mahdis Golabain received the B.Sc. and M.Sc. degrees in Electrical Engineering from the Islamic Azad University, Shiraz, and Neyriz branches, Iran, in 2013 and 2016, respectively. She is a Ph.D. student in Electrical Engineering at Shiraz University, Shiraz, Iran. Her research interests include image processing and computer vision.
Azar Mahmoodzadeh received B.Sc., M.Sc. and Ph.D. degrees in Electrical Engineering from University of Shiraz, University of Shahed and University of Yazd, Iran, in 2005, 2008 and 2013, respectively. From 2009, she was with the Islamic Azad University, Shiraz Branch, Shiraz, Iran. Her research interests include pattern recognition and image and signal processing. corresponding author. e-mail: mahmoodzadeh@iaushiraz.ac.ir
Hamed Agahi received B.Sc. M.Sc. and Ph.D. degrees in Electrical Engineering from University of Shiraz, Amirkabir University of Technology and University of Tehran, Iran, in 2005, 2008 and 2013, respectively. From 2009, he was with the Islamic Azad University, Shiraz Branch, Shiraz, Iran. His research interests include pattern recognition, image and signal processing, and fault detection and diagnosis applications. e-mail: agahi@iaushiraz.ac.ir
Related articles
The rights to this website are owned by the Raimag Press Management System. |