Skip to main content
Log in

Variational Contrast Enhancement of Gray-Scale and RGB Images

  • Published:
Journal of Mathematical Imaging and Vision Aims and scope Submit manuscript

Abstract

The aim of this paper is twofold. First, we propose a new method for enhancing the contrast of gray-value images. We use the difference of the average local contrast measures between the original and the enhanced images within a variational framework. This enables the user to intuitively control the contrast level and the scale of the enhanced details. Moreover, our model avoids large modifications of the original image histogram. Thereby it preserves the global illumination of the scene and it can cope with large areas having similar gray values. The minimizer of the proposed functional is computed by a gradient descent algorithm in connection with a polynomial approximation of the average local contrast measure. The polynomial approximation is computed via Bernstein polynomials. In the second part, the approach is extended to a variational enhancement method for color images. The model approximately preserves the hue of the original image and additionally includes a total variation term to correct the possible noise. The method requires no post-  or preprocessing. The minimization problem is solved with a hybrid primal–dual algorithm. Experiments demonstrate the efficiency and the flexibility of the proposed approaches in comparison with state-of-the-art methods.

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
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

References

  1. Abdullah-Al-Wadud, M., Kabir, M.H., Dewan, M., Chae, O.: A dynamic histogram equalization for image contrast enhancement. IEEE Trans. Consumer Electron. 53(2), 593–600 (2007)

    Article  Google Scholar 

  2. Adams, A.: Examples: the making of 40 photographs. Bulfinch (1983)

  3. Adelson, E.H.: Checkershadow illusion. Available at http://persci.mit.edu/gallery/checkershadow 2(1) (1995)

  4. Arici, T., Dikbas, S., Altunbasak, Y.: A histogram modification framework and its application for image contrast enhancement. IEEE Trans. Image Process. 18(9), 1921–1935 (2009)

    Article  MathSciNet  Google Scholar 

  5. Attouch, H., Bolte, J., Svaiter, B.F.: Convergence of descent methods for semi-algebraic and tame problems: proximal algorithms, forward-backward splitting, and regularized gauss-seidel methods. Math. Program. 137(1–2), 91–129 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  6. Aujol, J.F., Gilboa, G., Papadakis, N.: Fundamentals of non-local total variation spectral theory. In: International Conference on Scale Space and Variational Methods in Computer Vision pp. 66–77 (2015)

  7. Bertalmío, M., Caselles, V., Provenzi, E.: Issues about retinex theory and contrast enhancement. Int. J. Comput. Vis. 83(1), 101–119 (2009)

    Article  Google Scholar 

  8. Bertalmío, M., Caselles, V., Provenzi, E., Rizzi, A.: Perceptual color correction through variational techniques. IEEE Trans Image Process. 16(4), 1058–1072 (2007)

    Article  MathSciNet  Google Scholar 

  9. Boccignone, G., Picariello, A.: Multiscale contrast enhancement of medical images. In: IEEE International Conference on Acoustics, Speech, and Signal Processing vol. 4, pp. 2789–2792 (1997)

  10. Celik, T.: Two-dimensional histogram equalization and contrast enhancement. Pattern Recognit. 45(10), 3810–3824 (2012)

    Article  Google Scholar 

  11. Celik, T., Tjahjadi, T.: Contextual and variational contrast enhancement. IEEE Trans. Image Process. 20(12), 3431–3441 (2011)

    Article  MathSciNet  Google Scholar 

  12. Celik, T., Tjahjadi, T.: Automatic image equalization and contrast enhancement using gaussian mixture modeling. IEEE Trans. Image Process. 21(1), 145–156 (2012)

    Article  MathSciNet  Google Scholar 

  13. Chambolle, A., Pock, T.: A first-order primal–dual algorithm for convex problems with applications to imaging. J. Math. Imaging Vis. 40(1), 120–145 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  14. Chambolle, A., Pock, T.: On the ergodic convergence rates of a first-order primal-dual algorithm. In: preprint (2014). http://www.optimization-online.org/DB_FILE/2014/09/4532.pdf

  15. Chan, R., Nikolova, M., Wen, Y.W.: A variational approach for exact histogram specification. In: Scale Space and Variational Methods in Computer Vision, pp. 86–97 (2012)

  16. Chen, S.D., Ramli, A.R.: Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation. IEEE Trans. Consumer Electron. 49(4), 1301–1309 (2003)

    Article  Google Scholar 

  17. Coltuc, D., Bolon, P., Chassery, J.M.: Exact histogram specification. IEEE Trans. Image Process. 15(6), 1143–1152 (2006)

    Article  Google Scholar 

  18. Ferradans, S., Palma-Amestoy, R., Provenzi, E.: An algorithmic analysis of variational models for perceptual local contrast enhancement. Image Process. On Line 5, 219–233 (2015)

    Article  MathSciNet  Google Scholar 

  19. Fitschen, J.H., Nikolova, M., Pierre, F., Steidl, G.: A variational model for color assignment. In: Scale Space and Variational Methods in Computer Vision, pp. 437–448 (2015)

  20. Gatta, C., Rizzi, A., Marini, D.: Ace: An automatic color equalization algorithm. In: Conference on Colour in Graphics, Imaging, and Vision, vol. 1, pp. 316–320 (2002)

  21. Getreuer, P.: Automatic Color Enhancement (ACE) and its Fast Implementation. Image Process. On Line 2, 266–277 (2012). doi:10.5201/ipol.2012.g-ace

    Article  Google Scholar 

  22. Gilboa, G., Osher, S.: Nonlocal operators with applications to image processing. Multiscale Model. Simul. 7(3), 1005–1028 (2008)

    Article  MATH  MathSciNet  Google Scholar 

  23. Gonzalez, R.C., Wintz, P.: Digital Image Processing, 2nd edn. Addison-Wesley, Reading (2007)

    MATH  Google Scholar 

  24. Gonzalez, R.C.: Digital Image Processing, 3rd edn. Prentice Hall, Upper Saddle River (2007)

    Google Scholar 

  25. Hummel, R.: Image enhancement by histogram transformation. Comput. Graph. Image Process. 6(2), 184–195 (1977)

    Article  Google Scholar 

  26. Häuser, S., Nikolova, M., Steidl, G.: Hue and range preserving rgb image enhancement (rgb-hp-enhance). Preprint (2015). Documentation for Matlab toolbox

  27. Jobson, D.J., Rahman, Z.U., Woodell, G.: Properties and performance of a center/surround retinex. IEEE Trans. Image Process. 6(3), 451–462 (1997)

    Article  Google Scholar 

  28. Kaur, M., Kaur, J., Kaur, J.: Survey of contrast enhancement techniques based on histogram equalization. Int. J. Adv. Comput. Sci. Appl. 2(7), 137–141 (2011)

    MATH  Google Scholar 

  29. Kim, Y.T.: Contrast enhancement using brightness preserving bi-histogram equalization. IEEE Trans. Consumer Electron. 43(1), 1–8 (1997)

    Article  Google Scholar 

  30. Laine, A., Fan, J., Yang, W.: Wavelets for contrast enhancement of digital mammography. IEEE Eng. Med. Biol. Mag. 14(5), 536–550 (1995)

    Article  Google Scholar 

  31. Land, E.H.: An alternative technique for the computation of the designator in the retinex theory of color vision. Proc. Natl Acad. Sci. 83(10), 3078–3080 (1986)

    Article  Google Scholar 

  32. Land, E.H., McCann, J.: Lightness and retinex theory. J. Opt. Soc. Am. 61(1), 1–11 (1971)

    Article  Google Scholar 

  33. Li, F., Zeng, T.: Variational image fusion with first and second-order gradient. J. Comput. Math. 34(2), 200–222 (2016)

    Article  MATH  MathSciNet  Google Scholar 

  34. Łojasiewicz, S.: Sur le probleme de la division. Studia Mathematica XVIII, 87–136 (1961)

  35. Maini, R., Aggarwal, H.: A comprehensive review of image enhancement techniques. J. Comput. 2(3), 919–940 (2010)

    Google Scholar 

  36. Mignotte, M.: An energy-based model for the image edge-histogram specification problem. IEEE Trans. Image Process. 21(1), 379–386 (2012)

    Article  MathSciNet  Google Scholar 

  37. Nikolova, M.: A fast algorithm for exact histogram specification. simple extension to colour images. In: Scale Space and Variational Methods in Computer Vision, pp. 174–185 (2013)

  38. Nikolova, M., Steidl, G.: Fast hue and range preserving histogram specification: Theory and new algorithms for color image enhancement. IEEE Trans. Image Process. 23(9), 4087–4100 (2014)

    Article  MathSciNet  Google Scholar 

  39. Nikolova, M., Steidl, G.: Fast ordering algorithm for exact histogram specification. IEEE Trans. Image Process. 23(12), 5274–5283 (2014)

    Article  MathSciNet  Google Scholar 

  40. Nikolova, M., Wen, Y.W., Chan, R.: Exact histogram specification for digital images using a variational approach. J. Math. Imaging Vis. 46(3), 309–325 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  41. Osher, S., Rudin, L.I.: Feature-oriented image enhancement using shock filters. SIAM J. Numer. Anal. 27(4), 919–940 (1990)

    Article  MATH  Google Scholar 

  42. Palma-Amestoy, R., Provenzi, E., Bertalmío, M., Caselles, V.: A perceptually inspired variational framework for color enhancement. IEEE Trans. Pattern Anal. Mach. Intell. 31(3), 458–474 (2009)

    Article  Google Scholar 

  43. Papadakis, N., Provenzi, E., Caselles, V.: A variational model for histogram transfer of color images. IEEE Trans. Image Process. 20(6), 1682–1695 (2011)

    Article  MathSciNet  Google Scholar 

  44. Perona, P., Malik, J.: Scale-space and edge detection using anisotropic diffusion. IEEE Trans. Pattern Anal. Mach. Intell. 12(7), 629–639 (1990)

    Article  Google Scholar 

  45. Piella, G.: Image fusion for enhanced visualization: a variational approach. Int. J. Comput. Vis. 83(1), 1–11 (2009)

    Article  Google Scholar 

  46. Pierre, F., Aujol, J.F., Bugeau, A., Ta, V.T.: Luminance-hue specification in the rgb space. In: Scale Space and Variational Methods in Computer Vision, pp. 413–424 (2015)

  47. Pierre, F., Migerditichan, P.: Débrumage variationnel. In: XXVème colloque GRETSI, pp. 1–4 (2015)

  48. Pock, T., Chambolle, A., Cremers, D., Bischof, H.: A convex relaxation approach for computing minimal partitions. In: IEEE Conference Computer Vision and Pattern Recognition, pp. 810–817 (2009)

  49. Provenzi, E., Caselles, V.: A wavelet perspective on variational perceptually-inspired color enhancement. Int. J. Comput. Vis. 106(2), 153–171 (2014)

  50. Provenzi, E., Marini, D., De Carli, L., Rizzi, A.: Mathematical definition and analysis of the retinex algorithm. J. Opt. Soc. Am. A 22(12), 2613–2621 (2005)

    Article  MathSciNet  Google Scholar 

  51. Rizzi, A., Gatta, C., Marini, D.: A new algorithm for unsupervised global and local color correction. Pattern Recognit. Lett. 24(11), 1663–1677 (2003)

    Article  Google Scholar 

  52. Rizzi, A., Gatta, C., Marini, D.: From retinex to automatic color equalization: issues in developing a new algorithm for unsupervised color equalization. J. Electron. Imaging 13(1), 75–84 (2004)

    Article  Google Scholar 

  53. Rudin, L.I., Osher, S., Fatemi, E.: Nonlinear total variation based noise removal algorithms. Physica D 60(1), 259–268 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  54. Sapiro, G., Caselles, V.: Histogram modification via differential equations. J. Differ. Equ. 135(2), 238–268 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  55. Sim, K., Tso, C., Tan, Y.: Recursive sub-image histogram equalization applied to gray scale images. Pattern Recognit. Lett. 28(10), 1209–1221 (2007)

    Article  Google Scholar 

  56. Sugimura, D., Mikami, T., Yamashita, H., Hamamoto, T.: Enhancing color images of extremely low light scenes based on rgb/nir images acquisition with different exposure times. IEEE Trans. Image Process. 24(11), 3586–3597 (2015)

    Article  MathSciNet  Google Scholar 

  57. Sun, C.C., Ruan, S.J., Shie, M.C., Pai, T.W.: Dynamic contrast enhancement based on histogram specification. IEEE Trans. Image Process. 51(4), 1300–1305 (2005)

    Google Scholar 

  58. Wan, Y., Shi, D.: Joint exact histogram specification and image enhancement through the wavelet transform. IEEE Trans. Image Process. 16(9), 2245–2250 (2007)

    Article  MathSciNet  Google Scholar 

  59. Wang, C., Ye, Z.: Brightness preserving histogram equalization with maximum entropy: a variational perspective. IEEE Trans. Image Process. 51(4), 1326–1334 (2005)

    Google Scholar 

  60. Zhu, M., Chan, T.: An efficient primal-dual hybrid gradient algorithm for total variation image restoration. Tech. rep, UCLA, Center for Applied Math (2008)

Download references

Acknowledgments

This study has been carried out with financial support from the French State, managed by the French National Research Agency (ANR) in the frame of the Investments for the future Programme IdEx Bordeaux (ANR-10-IDEX-03-02). J-F. Aujol is a member of Institut Universitaire de France. Many thanks to Mr. Bertalmio for providing the code of [8]. The authors thank the reviewers for their valuable comments on the Retinex and HVS models.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fabien Pierre.

An Efficient Computation by Polynomial Approximation

An Efficient Computation by Polynomial Approximation

First, we show how the sign function can be approximated by Bernstein polynomials. The Bernstein polynomial on [0, 1] of degree n is defined by

$$\begin{aligned} B^n_k(t) :={\left( {\begin{array}{c}n\\ k\end{array}}\right) } t^k (1-t)^{n-k}. \end{aligned}$$

By the Weierstraß’ theorem, any continuous function \(f:[0,1] \rightarrow {\mathbb {R}}\) can be approximated by

$$\begin{aligned} b_n(f,t)=\displaystyle \sum _{k=0}^n f\left( \dfrac{k}{n}\right) B^n_k(t) \end{aligned}$$
(35)

and \(\Vert f - b_n(f,\cdot )\Vert _\infty \) goes to zero as \(n \rightarrow \infty \). We approximate the jump function \(g:[0,1]\rightarrow {\mathbb {R}}\) defined by

$$\begin{aligned} g(t) := \left\{ \begin{array}{ll} 0&{}\mathrm{if} \; t \in [0,\tfrac{1}{2}),\\ \tfrac{1}{2} &{}\mathrm{if} \; t = \tfrac{1}{2},\\ 1&{}\mathrm{if} \; t \in (\tfrac{1}{2},1], \end{array} \right. \end{aligned}$$

and use \( P(t) := 2b_n\left( g,\dfrac{t+1}{2} \right) -1 \) as an approximation of the sign function. Next, we write \(b_n\left( g,\dfrac{t+1}{2} \right) \) as the sum of monomials

$$\begin{aligned} \left( \dfrac{1}{2} \right) ^n\sum _{k=0}^n {\left( {\begin{array}{c}n\\ k\end{array}}\right) } g \left( \dfrac{k}{n} \right) \sum _{i=0}^k \sum _{j=0}^{n-k} {\left( {\begin{array}{c}k\\ i\end{array}}\right) }{\left( {\begin{array}{c}n-k \\ j\end{array}}\right) } (-1)^j t^{i+j}. \end{aligned}$$
(36)

Having a polynomial representation \( P(t) = \sum _{m=0}^n c_m t^m \) available, we use [8] to efficiently compute \(\nabla \tilde{C}(u)(x)\) if \(w(x,y) = G(x-y)\):

$$\begin{aligned} \nabla \tilde{C}(u)(x)&=\sum _{y \in \Lambda } w(x,y)\sum _{m=0}^n c_{m}(u(x)-u(y))^m \\&=\sum _{y \in \Lambda }w(x,y)\sum _{m=0}^n c_{m} (-1)^{k} \sum _{k=0}^{m}\genfrac(){0.0pt}1{m}{k}u(y)^k u(x)^{m-k}\\&=\sum _{k=0}^n a_{k}(x) \sum _{y\in \Lambda } w(x,y)u(y)^k\\&=\sum _{k=0}^n a_{k}(x)(G * u^k)(x) \end{aligned}$$

with \( a_{k}(x)\) a polynomial depending on u(x). The convolution can be computed in a fast way using the fast Fourier transform. Note that in [8], the sign function is not directly approximated, but a continuous approximation of it, namely a slope function. Even for this function, the Chebyshev approximation will not stay within \([-1,1]\).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Pierre, F., Aujol, JF., Bugeau, A. et al. Variational Contrast Enhancement of Gray-Scale and RGB Images. J Math Imaging Vis 57, 99–116 (2017). https://doi.org/10.1007/s10851-016-0670-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10851-016-0670-8

Keywords

Navigation