Skip to main content
Log in

Mathematical analysis of histogram equalization techniques for medical image enhancement: a tutorial from the perspective of data loss

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

This tutorial demonstrates a novel mathematical analysis of histogram equalization techniques and its application in medical image enhancement. In this paper, conventional Global Histogram Equalization (GHE), Contrast Limited Adaptive Histogram Equalization (CLAHE), Histogram Specification (HS) and Brightness Preserving Dynamic Histogram Equalization (BPDHE) are re-investigated by a novel mathematical analysis. All these HE methods are widely employed by researchers in image processing and medical image diagnosis domain, however, this has been observed that these HE methods have significant limitation of data loss. In this paper, a mathematical proof is given that any kind of Histogram Equalization method is inevitable of data loss, because any HE method is a non-linear method. All these Histogram Equalization methods are implemented on two different datasets, they are, brain tumor MRI image dataset and colorectal cancer H and E-stained histopathology image dataset. Pearson Correlation Coefficient (PCC) and Structural Similarity Index Matrix (SSIM) both are found in the range of 0.6-0.95 for overall all HE methods. Moreover, those results are compared with Reinhard method which is a linear contrast enhancement method. The experimental results suggest that Reinhard method outperformed any HE methods for medical image enhancement. Furthermore, a popular CNN model VGG-16 is implemented, on the MRI dataset in order to prove that there is a direct correlation between less accuracy and data loss.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Data Availability

Data sharing is not applicable to this article as no dataset was generated. Only the existing datasets are experimented with HE techniques. The source of these datasets are already mentioned in Reference section and in manuscript.

References

  1. Abdullah-Al-Wadud M, Kabir MH, Dewan MAA, Chae O (2007) A dynamic histogram equalization for image contrast enhancement. IEEE Transactions on Consumer Electronics 53(2):593–600

    Google Scholar 

  2. Aboshosha S, Zahran O, Dessouky MI, Abd El-Samie FE (2019) Resolution and quality enhancement of images using interpolation and contrast limited adaptive histogram equalization. Multimedia Tools and Applications 78(13):18751–18786

    Google Scholar 

  3. Agarwal M, Mahajan R (2018) Medical image contrast enhancement using range limited weighted histogram equalization. Procedia Computer Science 125:149–156

    Google Scholar 

  4. Akila K, Jayashree L, Vasuki A (2015) Mammographic image enhancement using indirect contrast enhancement techniques-a comparative study. Procedia Computer Science 47:255–261

    Google Scholar 

  5. Aquino-Morínigo PB, Lugo-Solís FR, Pinto-Roa DP, Ayala HL, Noguera JLV (2017) Bi-histogram equalization using two plateau limits. Signal, Image and Video Processing 11(5):857–864

    Google Scholar 

  6. Chen, X, Wu, Y, Zhao, G, Wang, M, Gao, W, Zhang, Q, Lin, Y (2019) Automatic histogram specification for glioma grading using multicenter data. Journal of healthcare engineering, 2019

  7. Chen SD, Ramli AR (2003) Minimum mean brightness error bi-histogram equalization in contrast enhancement. IEEE transactions on Consumer Electronics 49(4):1310–1319

    Google Scholar 

  8. Chen SD, Ramli AR (2003) Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation. IEEE Transactions on consumer Electronics 49(4):1301–1309

    Google Scholar 

  9. Chen SD, Ramli AR (2004) Preserving brightness in histogram equalization based contrast enhancement techniques. Digital Signal Processing 14(5):413–428

    Google Scholar 

  10. Chen X, Zhang Q, Lin M, Yang G (2019) He, C (2019) No-reference color image quality assessment: from entropy to perceptual quality. EURASIP Journal on Image and Video Processing 1:1–14

    Google Scholar 

  11. Coltuc D, Bolon P, Chassery JM (2006) Exact histogram specification. IEEE Transactions on Image Processing 15(5):1143–1152

    Google Scholar 

  12. Demirel H, Ozcinar C, Anbarjafari G (2009) Satellite image contrast enhancement using discrete wavelet transform and singular value decomposition. IEEE Geoscience and Remote Sensing Letters 7(2):333–337

    Google Scholar 

  13. Deng, J, Dong, W, Socher, R, Li, LJ, Li, K, Fei-Fei, L (2009) Imagenet: A large-scale hierarchical image database. In: 2009 IEEE conference on computer vision and pattern recognition, pp 248–255. Ieee

  14. El Houby EM, Yassin NI (2021) Malignant and nonmalignant classification of breast lesions in mammograms using convolutional neural networks. Biomedical Signal Processing and Control 70:102954

    Google Scholar 

  15. Fu X, Wang J, Zeng D, Huang Y, Ding X (2015) Remote sensing image enhancement using regularized-histogram equalization and dct. IEEE Geoscience and Remote Sensing Letters 12(11):2301–2305

    Google Scholar 

  16. Gonzales, RC, Woods, RE (2002) Digital image processing

  17. Haralick RM (1979) Statistical and structural approaches to texture. Proceedings of the IEEE 67(5):786–804

    Google Scholar 

  18. Haralick RM, Shanmugam K, Dinstein IH (1973) Textural features for image classification. IEEE Transactions on Systems, man, and Cybernetics 6:610–621

    Google Scholar 

  19. Ibrahim H, Kong NSP (2007) Brightness preserving dynamic histogram equalization for image contrast enhancement. IEEE Transactions on Consumer Electronics 53(4):1752–1758

    Google Scholar 

  20. Kandhway P, Bhandari AK, Singh A (2020) A novel reformed histogram equalization based medical image contrast enhancement using krill herd optimization. Biomedical Signal Processing and Control 56:101677

    Google Scholar 

  21. Kim YT (1997) Contrast enhancement using brightness preserving bi-histogram equalization. IEEE transactions on Consumer Electronics 43(1):1–8

    Google Scholar 

  22. Kim M, Chung MG (2008) Recursively separated and weighted histogram equalization for brightness preservation and contrast enhancement. IEEE Transactions on Consumer Electronics 54(3):1389–1397

    Google Scholar 

  23. Li Y, Zhang Y, Geng A, Cao L, Chen J (2016) Infrared image enhancement based on atmospheric scattering model and histogram equalization. Optics & Laser Technology 83:99–107

    Google Scholar 

  24. Liang X, Hu P, Zhang L, Sun J, Yin G (2019) Mcfnet: Multi-layer concatenation fusion network for medical images fusion. IEEE Sensors Journal 19(16):7107–7119

    Google Scholar 

  25. Majeed SH, Isa NAM (2020) Iterated adaptive entropy-clip limit histogram equalization for poor contrast images. IEEE Access 8:144218–144245

    Google Scholar 

  26. Manimekalai M, Vasanthi N (2019) Hybrid lempel-ziv-welch and clipped histogram equalization based medical image compression. Cluster Computing 22(5):12805–12816

    Google Scholar 

  27. Mayathevar K, Veluchamy M, Subramani B (2020) Fuzzy color histogram equalization with weighted distribution for image enhancement. Optik 216:164927

    Google Scholar 

  28. McCann MT, Mixon DG, Fickus MC, Castro CA, Ozolek JA, Kovacević J (2014) Images as occlusions of textures: A framework for segmentation. IEEE Transactions on Image Processing 23(5):2033–2046

    MathSciNet  Google Scholar 

  29. Ooi CH, Isa NAM (2010) Adaptive contrast enhancement methods with brightness preserving. IEEE Transactions on Consumer Electronics 56(4):2543–2551

    Google Scholar 

  30. Ooi CH, Kong NSP, Ibrahim H (2009) Bi-histogram equalization with a plateau limit for digital image enhancement. IEEE Transactions on Consumer Electronics 55(4):2072–2080

    Google Scholar 

  31. Oppenheim, AV, Willsky, AS, Nawab, SH, Hernández, GM, et al (1997) Signals & systems. Pearson Educación

  32. Panetta K, Gao C, Agaian S (2013) No reference color image contrast and quality measures. IEEE transactions on Consumer Electronics 59(3):643–651

    Google Scholar 

  33. Papoulis, A, Pillai, SU (2002) Probability, random variables, and stochastic processes. Tata McGraw-Hill Education

  34. Parihar AS, Verma OP (2016) Contrast enhancement using entropy-based dynamic sub-histogram equalisation. IET Image Processing 10(11):799–808

    Google Scholar 

  35. Patel, S, Bharath, K, Balaji, S, Muthu, RK (2020) Comparative study on histogram equalization techniques for medical image enhancement. In: Soft Computing for Problem Solving, pp 657–669. Springer

  36. Pizer, SM (1990) Contrast-limited adaptive histogram equalization: Speed and effectiveness stephen m. pizer, r. eugene johnston, james p. ericksen, bonnie c. yankaskas, keith e. muller medical image display research group. In: Proceedings of the First Conference on Visualization in Biomedical Computing, Atlanta, Georgia, vol 337

  37. Pizer SM, Amburn EP, Austin JD, Cromartie R, Geselowitz A, Greer T, ter Haar Romeny B, Zimmerman JB, Zuiderveld K (1987) Adaptive histogram equalization and its variations. Computer Vision, Graphics, and Image Processing 39(3):355–368

    Google Scholar 

  38. Reddy, PS, Singh, H, Kumar, A, Balyan, L, Lee, HN (2018) Retinal fundus image enhancement using piecewise gamma corrected dominant orientation based histogram equalization. In: 2018 International Conference on Communication and Signal Processing (ICCSP):pp. 0124–0128. IEEE

  39. Reddy E, Reddy R (2019) Dynamic clipped histogram equalization technique for enhancing low contrast images. Proceedings of the National Academy of Sciences, India Section A: Physical Sciences 89(4):673–698

    MathSciNet  Google Scholar 

  40. Reinhard E, Adhikhmin M, Gooch B, Shirley P (2001) Color transfer between images. IEEE Computer graphics and applications 21(5):34–41

    Google Scholar 

  41. Roy, S (2021) Algorithms for color normalization and segmentation of liver cancer histopathology images. Ph.D. thesis, National Institute of Technology Karnataka, Surathkal

  42. Roy, S, Panda, S, Jangid, M.: Modified reinhard algorithm for color normalization of colorectal cancer histopathology images. In: 2021 29th European Signal Processing Conference (EUSIPCO):pp 1231–1235. IEEE (2021)

  43. Roy, S, Tyagi, M, Bansal, V, Jain, V (2022) Svd-clahe boosting and balanced loss function for covid-19 detection from an imbalanced chest x-ray dataset. Computers in Biology and Medicine pp 106092

  44. Roy S, kumar Jain, A, Lal, S, Kini, J, (2018) A study about color normalization methods for histopathology images. Micron 114:42–61

  45. Roy S, Lal S, Kini JR (2019) Novel color normalization method for hematoxylin & eosin stained histopathology images. IEEE Access 7:28982–28998

    Google Scholar 

  46. Ruderman DL, Cronin TW, Chiao CC (1998) Statistics of cone responses to natural images: implications for visual coding. JOSA A 15(8):2036–2045

    Google Scholar 

  47. Sajeev, S, Bajger, M, Lee, G (2015) Segmentation of breast masses in local dense background using adaptive clip limit-clahe. In: 2015 International Conference on Digital Image Computing: Techniques and Applications (DICTA):pp 1–8. IEEE

  48. Sanagavarapu, S, Sridhar, S, Gopal, T (2021) Covid-19 identification in clahe enhanced ct scans with class imbalance using ensembled resnets. In: 2021 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS):pp 1–7. IEEE

  49. Sengee N, Choi HK (2008) Brightness preserving weight clustering histogram equalization. IEEE Transactions on Consumer Electronics 54(3):1329–1337

    Google Scholar 

  50. Sheet D, Garud H, Suveer A, Mahadevappa M, Chatterjee J (2010) Brightness preserving dynamic fuzzy histogram equalization. IEEE Transactions on Consumer Electronics 56(4):2475–2480

    Google Scholar 

  51. Sheikh HR, Bovik AC (2006) Image information and visual quality. IEEE Transactions on Image Processing 15(2):430–444

    Google Scholar 

  52. Siddhartha, M, Santra, A (2020) Covidlite: A depth-wise separable deep neural network with white balance and clahe for detection of covid-19. arXiv:2006.13873

  53. Sim KS, Tso CP, Tan YY (2007) Recursive sub-image histogram equalization applied to gray scale images. Pattern Recognition Letters 28(10):1209–1221

    Google Scholar 

  54. Simonyan, K, Zisserman, A (2014) Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556

  55. Singh K, Kapoor R (2014) Image enhancement via median-mean based sub-image-clipped histogram equalization. Optik 125(17):4646–4651

    Google Scholar 

  56. Singh H, Kumar A, Balyan L, Singh GK (2018) Swarm intelligence optimized piecewise gamma corrected histogram equalization for dark image enhancement. Computers & Electrical Engineering 70:462–475

    Google Scholar 

  57. Sirinukunwattana K, Pluim JP, Chen H, Qi X, Heng PA, Guo YB, Wang LY, Matuszewski BJ, Bruni E, Sanchez U et al (2017) Gland segmentation in colon histology images: The glas challenge contest. Medical image analysis 35:489–502

    Google Scholar 

  58. Sun CC, Ruan SJ, Shie MC, Pai TW (2005) Dynamic contrast enhancement based on histogram specification. IEEE Transactions on Consumer Electronics 51(4):1300–1305

    Google Scholar 

  59. Wang Z, Bovik AC (2002) A universal image quality index. IEEE Signal Processing Letters 9(3):81–84

    Google Scholar 

  60. Wang Z, Bovik AC (2009) Mean squared error: Love it or leave it? a new look at signal fidelity measures. IEEE signal processing magazine 26(1):98–117

    Google Scholar 

  61. Wang C, Ye Z (2005) Brightness preserving histogram equalization with maximum entropy: a variational perspective. IEEE Transactions on Consumer Electronics 51(4):1326–1334

    Google Scholar 

  62. Wang Z, Bovik AC, Sheikh HR, Simoncelli EP (2004) Image quality assessment: from error visibility to structural similarity. IEEE transactions on Image Processing 13(4):600–612

    Google Scholar 

  63. Weiss K, Khoshgoftaar TM, Wang D (2016) A survey of transfer learning. Journal of Big Data 3(1):1–40

    Google Scholar 

  64. Wongsritong, K, Kittayaruasiriwat, K, Cheevasuvit, F, Dejhan, K, Somboonkaew, A (1998) Contrast enhancement using multipeak histogram equalization with brightness preserving. In: IEEE. APCCAS 1998. 1998 IEEE Asia-Pacific Conference on Circuits and Systems. Microelectronics and Integrating Systems. Proceedings (Cat. No. 98EX242):pp 455–458. IEEE

  65. Wu X, Kawanishi T, Kashino K (2020) Reflectance-guided histogram equalization and comparametric approximation. IEEE Transactions on Circuits and Systems for Video Technology 31(3):863–876

    Google Scholar 

  66. Yadav, G, Maheshwari, S, Agarwal, A (2014) Foggy image enhancement using contrast limited adaptive histogram equalization of digitally filtered image: Performance improvement. In: 2014 International conference on advances in computing, communications and informatics (ICACCI):pp 2225–2231. IEEE

  67. Zheng, Z, Ma, L, Yang, S, Boumaraf, S, Liu, X, Ma, X (2021) U-sdrc: a novel deep learning-based method for lesion enhancement in liver ct images. In: Medical Imaging 2021: Image Processing, vol 11596, pp 115962O. International Society for Optics and Photonics

  68. Zhu Y, Huang C (2012) An adaptive histogram equalization algorithm on the image gray level mapping. Physics Procedia 25:601–608

    Google Scholar 

  69. Zhuang, L, Guan, Y (2017) Image enhancement via subimage histogram equalization based on mean and variance. Computational Intelligence and Neuroscience, 2017

  70. Zhuang, L, Guan, Y (2018)Adaptive image enhancement using entropy-based subhistogram equalization. Computational Intelligence and Neuroscience, 2018

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Santanu Roy.

Ethics declarations

Conflicts of interest

The authors declare that they have no conflict of interest for this manuscript.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix

Appendix

Lemma1: For any contrast enhancement method, (with having transformation function which has number of roots 1),

$$\begin{aligned} If,\hspace{0.1 cm} \frac{p_r(r)}{p_s(s)}\approx 1,\hspace{0.1 cm} then \hspace{0.1 cm} Corr_{sr}\approx 1 \end{aligned}$$
(53)

where, \(p_{r}\) (r) is the PDF of source image, \(p_{s}\) (s) is the PDF of the processed image, \(Corr_{sr}\) is the correlation co-efficient between processed image and source image.

From (6), we got (as the number of roots of the transformation function is 1),

$$\begin{aligned} p_s(s)= p_r(r)|\frac{dr}{ds}| \end{aligned}$$
(54)

Now if \(p_{r}\) (r)\(\approx p_{s}\) (s), according to the Lemma1, then from (54), we got, (for simplicity of calculation let’s assume \(p_{r}\) (r)=\(p_{s}\) (s))

$$\begin{aligned} \int {dr} =\int {ds} \end{aligned}$$
(55)
$$\begin{aligned} or, \hspace{0.1 cm} s = r+k \end{aligned}$$
(56)

where k is integration constant.

From (56), this is concluded that the transformation function of such contrast enhancement method will be linear.

Taking global standard deviation both of the sides in (56), we got,

$$\begin{aligned} \sigma _{gl}(s)= {\sigma _{gl}(r)} \end{aligned}$$
(57)

Similarly, by taking global mean both side of the (56), we got,

$$\begin{aligned} \mu _{gl}(s)= {\mu _{gl}(r)}+k \end{aligned}$$
(58)

Now, Covariance between processed image (s) and source image (r) is given by the following equation. (from 13)

$$\begin{aligned} \sigma _{sr}=\frac{1}{MN}{\sum _{i=1}^{M}{\sum _{j=1}^{N}{(s_i-\mu _{gl}(s_i))*(r_j-\mu _{gl}(r_j))}}} \end{aligned}$$
(59)

Now, substituting the value from (56) and (58) into (59), we got,

$$\begin{aligned} \sigma _{sr}=\frac{1}{MN}{\sum _{i=1}^{M}{\sum _{j=1}^{N}{(r_j-\mu _{gl}(r_j))}^{2}}} \end{aligned}$$
(60)
$$\begin{aligned} or, \hspace{0.1 cm} \sigma _{sr}={\sigma _{gl}^{2}(r)} \end{aligned}$$
(61)

Now the correlation coefficient between processed image and original image is given by following equation. (from 17)

$$\begin{aligned} Corr_{sr}= \frac{\sigma _{sr}}{\sigma _{gl}(s)*\sigma _{gl}(r)} \end{aligned}$$
(62)

Substituting values from (57) and (61) into (62) we got,

$$\begin{aligned} Corr_{sr}= 1 \hspace{0.2 cm} (Hence \hspace{0.1 cm} Proved) \end{aligned}$$
(63)

Lemma2: For any contrast enhancement method,

$$\begin{aligned} If,\hspace{0.1 cm} p_r(r)=\frac{1}{c}{p_s(s)},\hspace{0.1 cm} then \hspace{0.1 cm} Corr_{sr}\approx 1. \end{aligned}$$
(64)

whereas, c is a real constant, \(p_r(r)\) is the PDF of source image, \(p_s(s)\) is the PDF of processed image, \(Corr_{sr}\) is the correlation co-efficient between processed image and source image. In other words, if the transformation function of contrast enhancement method is linear, then there will be no data loss.

For simplicity of calculation let’s assume \(p_r (r)=1/c* p_s (s))\) then from (54) we got,

$$\begin{aligned} \int {dr} =\frac{1}{c}*{\int {ds}} \end{aligned}$$
(65)
$$\begin{aligned} s =\frac{1}{c}*(r+k) \end{aligned}$$
(66)

where k is an integration constant.

From (66), this is concluded that the transformation function of such contrast enhancement method is linear.

Taking global standard deviation both of the sides in (66), we got,

$$\begin{aligned} \sigma _{gl}(s)=\frac{1}{c} *{\sigma _{gl}(r)} \end{aligned}$$
(67)

Similarly, by taking global mean both side of the (66), we got,

$$\begin{aligned} \mu _{gl}(s)= \frac{1}{c}*{\mu _{gl}(r)}+k_1 \end{aligned}$$
(68)

Now, substituting the value from (66) and (68) into (59), we got,

$$\begin{aligned} \sigma _{sr}=\frac{1}{c}*{\frac{1}{MN}{\sum _{i=1}^{M}{\sum _{j=1}^{N}{(r_j-\mu _{gl}(r_j))}^{2}}}} \end{aligned}$$
(69)
$$\begin{aligned} or, \hspace{0.1 cm} \sigma _{sr}=\frac{1}{c}*{\sigma _{gl}^{2}(r)} \end{aligned}$$
(70)

Now, substituting values from (67) and (70), into (62) we got,

$$\begin{aligned} Corr_{sr}= 1 \hspace{0.2 cm} (Hence \hspace{0.1 cm} Proved) \end{aligned}$$
(71)

Hence, it is proved that a linear transformation doesn’t prone to data loss.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Roy, S., Bhalla, K. & Patel, R. Mathematical analysis of histogram equalization techniques for medical image enhancement: a tutorial from the perspective of data loss. Multimed Tools Appl 83, 14363–14392 (2024). https://doi.org/10.1007/s11042-023-15799-8

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-023-15799-8

Keywords

Navigation