Abstract
In the past 20 years, variational principles in image processing and computer vision flourished, often allowing a deep comprehension and a more efficient solution to many problems. As this chapter presents, this also holds true for color image processing. We start by discussing the fundamental result about the interpretation of histogram equalization as the minimization of a suitable functional. This functional is given by two opponent terms: the first being a global quadratic adjustment to the middle gray level, and the second representing a global contrast enhancement term. It is proven here that this analytical form is shared by the so-called perceptual functionals, which allow an enhancement of color images in line with the most important human visual system features. For perceptual functionals, the adjustment is entropic and contrast enhancement is local and invariant under global illumination changes. It is also highlighted that the variational setting provides a unified framework where existing perceptually inspired color improvement models can be seen as particular instances. In the end, the wavelet version of this framework is discussed in detail.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Weber’s law is approximately valid not only for the visual sense, but also for all the other senses, with different values of Weber’s constant.
- 2.
In general, the first variation of a homogeneous functional of degree \(n\) is a homogeneous functional of degree \(n-1\), in our case \(E_{\mu ,I_0,w,\varphi }(I)\) has degree 0, so its first variation has degree -1.
References
Ambrosio, L., Gigli, N., Savaré, G.: Gradient flows in metric spaces and in the space of probability measures. Lectures in Mathematics, Birkhauser (2005)
Banich, N., Loncaric, S.: Light random sprays retinex: Exploiting the noisy illumination estimation. IEEE Signal Process. Lett. 20, 1240–1243 (2013)
Bertalmío, M., Caselles, V., Provenzi, E., Rizzi, A.: Perceptual color correction through variational techniques. IEEE Trans. Image Process. 16, 1058–1072 (2007)
Bertalmío, M., Caselles, V., Provenzi, E.: Issues about the retinex theory and contrast enhancement. Int. J. Comput. Vision. 83,101–119 (2009)
Ciarlet, P.: Introduction to numerical linear algebra and optimisation. Cambridge University Press, Melbourne (1989)
Frankle, J., McCann, JJ.: Method and apparatus for lightness imaging. United States Patent, US 4,348,336. (1983)
Gonzales, R., Woods, R.: Digital image processing. Prentice Hall, Upper Saddle River (2002)
Han, Y., Zheng, D., Baciu, G., Feng, X., Li, M.: Fuzzy region competition-based auto-color-theme design for textile images. Textile Res. J. 83(6), 638–650 (2013)
Hubel, D.: Eye, brain, and vision. Scientific American Library, New York (1995)
Kimmel, R., Elad, M., Shaked, D., Keshet, R., Sobel, I.: A variational framework for retinex. Intern. J. Comput. Vis. 52(1), 07–23 (2003)
Kuang, J., Johnson, G.M., Fairchild, M.D.: iCAM06: A refined image appearance model for HDR image rendering. J. Vis. Commun. Image R. 18, 406–414 (2007)
Land, E., McCann, J.: Lightness and retinex theory. J. Opt. Soc. Am. 61(1), 1–11 (1971)
Li, H., Zhang, L., Shen, H.: A perceptually inspired variational method for the uneven intensity correction of remote sensing images. IEEE Trans. Geosci. Remote Sens. 50(8), 3053–3065 (2012)
Mallat, S.: A wavelet tour of signal processing, 3rd ed. Academic Press, San Diego (1999)
Montagna, R., Finlayson, G.D.: Constrained pseudo-Brownian motion and its application to image enhancement. J. Opt. Soc. Am. A. 28(8), 1677–1688 (2011)
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)
Provenzi, E.: Boosting the stability of wavelet-based contrast enhancement of color images through gamma transformations. J. Modern Opt. 60, 1145–1150 (2013)
Provenzi, E., Caselles, V.: A wavelet perspective on variational perceptually-inspired color enhancement. Int. J. Comput. Vis. 106, 153–171 (2014)
Provenzi, E., De Carli, L., Rizzi, A., Marini, D.: Mathematical definition and analysis of the Retinex algorithm. J. Opt. Soc. Am. A. 22(12), 2613–2621 (2005)
Provenzi, E., Fierro, M., Rizzi, A., De Carli, L., Gadia, D., Marini, D.: Random spray retinex: A new retinex implementation to investigate the local properties of the model. IEEE Trans. Image Process. 16(1), 162–171 (2007)
Rizzi, A., Gatta, C., Marini, D.: A new algorithm for unsupervised global and local color correction. Pattern Recognit. Lett. 24, 1663–1677 (2003)
Sapiro, G., Caselles, V.: Histogram modification via differential equations. J. Diff. Eq. 135, 238–266 (1997)
Shapley, R., Enroth-Cugell, C.: Visual adaptation and retinal gain controls. Prog. Retin. Res. 3 (Chap 9), 263–346 (1984)
Strang, G., Nguyen, T.: Wavelets and filter banks. Wellesley-Cambridge Press, Wellesley (1996)
von Kries, J.: Chromatic Adaptation. Festschrift der Albrecht-Ludwigs-Universität 135:145–158 (1902)
Wyszecky, G., Stiles, W.S.: Color science: Concepts and methods, quantitative data and formulas. Wiley, New York (1982)
Acknowledgements
The author would like to dedicate this work to the memory of Prof. Vicent Caselles with infinite gratitude for sharing his deep intelligence, culture, passion for science, and, last but not least, honesty.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
Appendix 1
We provide here the proof of Theorem 5.1. We think that this proof is instructive because it explicitly shows the link between the variations of the functionals appearing in Theorem 5.1 and histogram equalization, which is far from being intuitive at the first sight.
Let us start with a useful lemma.
Lemma 5.1.
Given the two functionals
where \(\psi \) is a differentiable function defined on the codomain of \(I\), and \(\phi \) is a differentiable function defined on the 2-th Cartesian power of the codomain of \(I\), then their first variations are, respectively:
and
The proof of this lemma can be found in any book on variational principles and we do not report it here, preferring passing directly to the proof of Theorem 5.1.
Proof
By linearity, we can compute the first variation of the two terms of the energy functional separately and then add the results. For that, let us recall that we have written:
By virtue of formula (5.27), we have
and by virtue of formula (5.28), we have
Now, interchanging the role of the “mute” variables \(x\) and \(y\) in the second integral of the last step, we have that
but then, using the oddness of the sign function,
Hence, we can write
that can be conveniently rearranged as follows:
Now, since \(\delta E_{\rm hist \; eq}(I,J)=\delta D_{\frac {1}{2}}(I,J)-\delta C(I,J)\), by using formulas (5.31) and (5.36) we have
that is,
The stationary condition \(\delta E_{\rm hist \; eq}(I,J)=0\), \(\forall J\), implies that the expression in the square bracket must be zero, that is,
so that the Euler–Lagrange equation relative to the energy functional \(E_{\rm hist \; eq}\) is the following implicit equation
that can be suitably rewritten as
Now, using the identity \({\rm sign} (t)=2{\rm sign} ^+(t)-1\), we can express the left-hand side of the Euler–Lagrange equation as
where we have used the fact that \(\frac {1}{|\Omega |}\int _\Omega {\rm sign} ^+(I(x)-I(y))\, dy\) is the spatial version of the cumulative histogram \(H(I(x))\), as noticed in Eq. (5.5).
Thus, the Euler–Lagrange Eq. (5.41) is equivalent to \(2H(I(x))-1 = 2I(x)-1\), that is, to \(H(I(x))=I(x)\), but then
which means that the image function \(I\) which satisfies the Euler–Lagrange equations of the functional \(E_{\rm hist \; eq}(I)\) has an equalized histogram.
The proof of existence and uniqueness of the solution of the gradient descent scheme written in Theorem 5.1 is quite long and technical and can be foundin[22]. □
Appendix 2
Let us start this section by briefly recalling the basic information about wavelet theory in 1D, then we will extend the discussion to 2D wavelets, the main reference for all the results quoted hereafter is [14]. A 1D (mother) wavelet \(\psi \in L^2(\mathbb{R} )\) is a unit norm and null-mean function. Of course this is possible only if \(\psi \) oscillates, but, unlike infinite waves, wavelets can have compact support. The \(\psi \)-wavelet transform \(W_\psi f\) of \(f\in L^2(\mathbb{R} )\) in the point \(\xi \) at the scale \(s\) is given by the inner product \(W_\psi f(\xi ,s) = \int _\mathbb {R} f(x) \frac {1}{\sqrt {s}} \overline \psi \left ( \frac {x-\xi }{s} \right ) dx\). \(W_\psi f\) gives a “measure of similarity” between \(f\) and \(\psi \) around the point \(\xi \) at the scale \(s\). So, if a signal is constant or do not vary “too much” in the support of a wavelet, then its wavelet transform will be zero or very small, this is how wavelets provide a multiscale information about the local contrast of a signal.
The set \(\{\psi _{j,k}\}_{(j,k)\in \mathbb {Z}^2} \subset L^2(\mathbb{R} )\) given by \(\psi _{j,k}(x)\equiv \frac {1}{\sqrt {2^j}}\psi \left (\frac {x-2^j k}{2^j}\right )\) is a complete orthonormal system of \(L^2(\mathbb{R} )\). Moreover, \(L^2(\mathbb{R} )\) can be recovered by the closure of the union of a sequence of nested closed subspaces \(V_j \subset V_{j-1}\) with suitable properties (see Mallat’s book [14] for more details). The orthogonal projections of \(f\in L^2(\mathbb{R} )\) onto \(V_j\) and \(V_{j-1}\) give the approximation of \(f\) at the scales \(2^j\) and \(2^{j-1}\), respectively. The \(2^j\)-approximation is coarser and the missing details with respect to the finer \(2^{j-1}\)-approximation are contained in the orthogonal complement \(W_j\) of \(V_j\) in \(V_{j-1}\): \(V_{j-1} = V_j \oplus W_j\). \(W_j\) is called the \(j\)-th detail space and it can be proven that the orthogonal projection of \(f\) on \(W_j\) is given by \(P_{W_j} f = \sum _{k\in \mathbb Z} \langle f,\psi _{j,k} \rangle \psi _{j,k} \equiv \sum _{k\in \mathbb Z} d_{j,k} \psi _{j,k}\). The coefficients \(d_{j,k}\) are called detail coefficients of \(f\) at the scale \(2^j\). Fine-scales detail coefficients at fine scale are sparse, in fact, they are non-null only when the support of \(\psi _{j,k}\) intersects a high contrast zone, that is, around sharp edges.
Finally, let us recall that every wavelet \(\psi \) is related to a mirror filter \(h\) and to a function \(\phi \), called scale function, through the following equation that involves their Fourier transforms: \(\hat \psi (2\omega ) = \frac {1}{\sqrt {2}} e^{-i\omega } \hat h^\ast \left ( \omega + \pi \right ) \hat \phi \left ( \omega \right )\), see [24] for a complete and detailed description of how to generate wavelets using the filter design methodology. \(\phi \) appears in the orthogonal projection of a signal \(f\) onto the approximation space \(V_j\), in fact it can be proven that \(P_{V_j} f = \sum _{k\in \mathbb Z} \langle f,\phi _{j,k} \rangle \phi _{j,k} \equiv \sum _{k\in \mathbb Z} a_{j,k} \phi _{j,k}\), where \(\phi _{j,k}(x) = \frac {1}{\sqrt {2^j}}\phi \left (\frac {x-2^j k}{2^j}\right )\) and \(a_{j,k}\) are called approximation coefficients at the scale \(2^j\). It follows that \(P_{V_{j-1}} f = P_{V_j}f + P_{W_j} f = \sum _{k\in \mathbb Z} a_{j,k} \phi _{j,k} + \sum _{k\in \mathbb Z} d_{j,k} \psi _{j,k}\).
In practical applications one is interested in a multiresolution analysis between two fixed scales \(2^L\) and \(2^J\), \(L,J\in \mathbb{Z} \), \(L<J\). In this case \(V_{J-1} = V_J \oplus W_J\), \(V_{J-2} = V_{J-1} \oplus W_{J-1} = V_J \oplus W_J \oplus W_{J-1}\) and so on, thus \(V_{L} = V_{J} \oplus \bigoplus _{2^J \geq 2^j \geq 2^{L+1}} \; W_j\). For this reason, following [14], we say that a discrete orthogonal wavelet multiresolution representation of a 1D signal \(f\) between two fixed scales \(2^L\) and \(2^J\), \(L,J\in \mathbb{Z} \), \(L<J\), is given by the collection of detail coefficients \(\{d_{j,k}\}\) at all scales, completed by the approximation coefficients at the coarser scale, that is, \(\{a_{J,k}\}\).
When we deal with 2D signals, as images, we have to consider a multiresolution analysis of \(L^2(\mathbb{R} ^2)\). Multidimensional wavelet bases can be generated with tensor products of separable basis functions defined along each dimension. In this case, an orthogonal wavelet multiresolution representation between two scales \(2^L\) and \(2^J\), \(L,J\in \mathbb{Z} \), \(L<J\), is given by three sets of detail coefficients \(\{d^H_{j,k},d^V_{j,k},d^D_{j,k}\}\) at all scales, which correspond to the horizontal, vertical, and diagonal detail coefficients, respectively, completed by the approximation coefficients at the coarser scale, that is, \(\{a_{J,k}\}\).
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Provenzi, E. (2015). Spatial and Frequency-Based Variational Methods for Perceptually Inspired Color and Contrast Enhancement of Digital Images. In: Celebi, E., Lecca, M., Smolka, B. (eds) Color Image and Video Enhancement. Springer, Cham. https://doi.org/10.1007/978-3-319-09363-5_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-09363-5_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-09362-8
Online ISBN: 978-3-319-09363-5
eBook Packages: EngineeringEngineering (R0)