Abstract
We consider the problem of exact histogram specification for digital (quantized) images. The goal is to transform the input digital image into an output (also digital) image that follows a prescribed histogram. Classical histogram modification methods are designed for real-valued images where all pixels have different values, so exact histogram specification is straightforward. Digital images typically have numerous pixels which share the same value. If one imposes the prescribed histogram to a digital image, usually there are numerous ways of assigning the prescribed values to the quantized values of the image. Therefore, exact histogram specification for digital images is an ill-posed problem. In order to guarantee that any prescribed histogram will be satisfied exactly, all pixels of the input digital image must be rearranged in a strictly ordered way. Further, the obtained strict ordering must faithfully account for the specific features of the input digital image. Such a task can be realized if we are able to extract additional representative information (called auxiliary attributes) from the input digital image. This is a real challenge in exact histogram specification for digital images. We propose a new method that efficiently provides a strict and faithful ordering for all pixel values. It is based on a well designed variational approach. Noticing that the input digital image contains quantization noise, we minimize a specialized objective function whose solution is a real-valued image with slightly reduced quantization noise, which remains very close to the input digital image. We show that all the pixels of this real-valued image can be ordered in a strict way with a very high probability. Then transforming the latter image into another digital image satisfying a specified histogram is an easy task. Numerical results show that our method outperforms by far the existing competing methods.
Similar content being viewed by others
Notes
E.g., \(D_{1}^{j}\mathcal{J}\) is the jth differential of \(\mathcal{J}\) in (2) with respect f and \(D_{2}^{j}\mathcal{J}\) is with respect to u.
Here we use the terminology in [19].
For 512×512, 8-bits images, this value is \(255^{ {512}^{2}}\)—the amount of all 512×512, 8-bits pictures that people can ever take with their digital cameras.
These polynomial functions yield also arbitrarily large values that exceed the bounded set \(\mathcal{P}\).
If we had \(g^{T}D\mathcal{F}(\mathbf{u})=0\) then \(g^{T}=\left(D\mathcal {F}(\mathbf{u})\right )^{-1}0=0\) which would contradict the fact that \(g \in\mathcal{G}\).
We use the following extension of the constant rank theorem, restated in our context (for details one can check [4, p. 96]). Let f be a \(\mathcal{C}^{s}\) application from an open set \(\mathcal{O}\subset\mathbb{R}^{n}\) to ℝ. Assume that Df(u) has constant rank r for all \(\mathbf{u}\in\mathcal{O}\). Given a c∈ℝ, the inverse image f −1(c) (supposed nonempty) is a \(\mathcal{C}^{s}\)-manifold of ℝn of dimension n−r.
Remind that A=A T.
References
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)
Aubert, G., Kornprobst, P.: Mathematical Problems in Image Processing, 2nd edn. Springer, Berlin (2006)
Avanaki, A.N.: Exact global histogram specification optimized for structural similarity. Opt. Rev. 16(6), 613–621 (2009)
Avez, A.: Calcul Différentiel. Masson, Paris (1991)
Baus, F., Nikolova, M., Steidl, G.: Fully smoothed ℓ 1−TV models: bounds for the minimizers and parameter choice. Tech. report, hal-00722743, v2. See http://hal.archives-ouvertes.fr/hal-00722743
Bonnans, J.-F., Gilbert, J.-C., Lemaréchal, C., Sagastizábal, C.: Numerical Optimization (Theoretical and Practical Aspects). Springer, Berlin (2003)
Bioucas-Dias, J., Figueiredo, M., Nowak, R.: Total variation-based image deconvolution: a majorization-minimization approach. In: Proc. IEEE International Conference on Acoustics, Speech and Signal Processing ICASSP 2006, vol. 2, pp. 861–864, 14–19 May (2006)
Black, M., Rangarajan, A.: On the unification of line processes, outlier rejection, and robust statistics with applications to early vision. Int. J. Comput. Vis. 19, 57–91 (1996)
De Bruijn, N.G.: Some classes of integer-valued functions. Indag. Math. 17(3) (1955)
Cahen, P.-J., Chabert, J.-L.: Integer-valued Polynomials. Mathematical Surveys and Monographs, vol. 48. Amer. Math. Soc., Providence (1997)
Chan, R., Nikolova, M., Wen, Y.: A variational approach for exact histogram specification. In: Scale Space and Variational Methods in Computer Vision. Lecture Notes in Computer Science, vol. 6667, pp. 86–97 (2012)
Chen, S., Ramli, A.R.: Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation. IEEE Trans. Consum. Electron. 49(4), 1301–1309 (2003)
Cheng, H.D., Jiang, X.H., Sun, Y., Wang, J.: Color image segmentation: advances and prospects. Pattern Recognit. 34(12), 2259–2281 (2001)
Ciarlet, P.G.: Introduction to Numerical Linear Algebra and Optimization. Cambridge University Press, Cambridge (1989)
Coltuc, D., Bolon, P.: Robust watermarking by histogram specification. In: Image Processing. International Conference on ICIP 99, vol. 2, pp. 236–239. IEEE, New York (1999). 1999
Coltuc, D., Bolon, P., Chassery, J.-M.: Exact histogram specification. IEEE Trans. Image Process. 15(5), 1143–1152 (2006)
Cox, I.J., Roy, S., Hingorani, S.L.: Dynamic histogram warping of image pairs for constant image brightness. In: International Conference on Image Processing, vol. 2, pp. 366–369 (1995)
Delon, J.: Midway image equalization. J. Math. Imaging Vis. 21(2), 119–134 (2004)
Dontchev, A.L., Zollezi, T.: Well-Posed Optimization Problems. Springer, New York (1993)
Evans, L.C., Gariepy, R.F.: Measure Theory and Fine Properties of Functions. Studies in Advanced Mathematics. CRC Press, Roca Baton (1992)
Ferradans, S., Xia, G.-S., Peyré, G., Aujol, J.-F.: Optimal transport mixing of Gaussian texture models. Tech. report, Preprint Hal-00662720 (2012)
Fiacco, A., McCormic, G.: Nonlinear Programming. Classics in Applied Mathematics. SIAM, Philadelphia (1990)
Figueiredo, M.A.T., Bioucas-Dias, J.M., Nowak, R.D.: Majorization-minimization algorithms for wavelet-based image restoration. IEEE Trans. Image Process. 16(12), 2980–2991 (2007)
Gonzalez, R.C., Woods, R.E.: Digital Image Processing. Publishing House of Electronics Industry, Beijing (2005)
Gousseau, Y., Morel, J.M.: Are natural images of bounded variation? SIAM J. Math. Anal. 33(3), 634–648 (2001)
Hall, E.L.: Almost uniform distributions for computer image enhancement. IEEE Trans. Comput. C-23, 207–208 (1974)
Hazewinkel, M. (ed.): Diophantine Equations. Encyclopaedia of Mathematics. Springer, Berlin (2001)
Hunter, D., Lange, K.: A tutorial on MM algorithms. Am. Stat. 58(1), 30–37 (2004)
Jongen, H.T., Jonker, P., Twilt, F.: Nonlinear Optimization in Finite Dimensions, 1st edn. Kluwer Academic, Amsterdam (1986)
Kim, Y.: Contrast enhancement using brightness preserving bi-histogram equalization. IEEE Trans. Consum. Electron. 43(1), 1–8 (1997)
Lafontaine, J.: Introduction aux Variétés Différentielles, 2nd edn. EDP Sciences, France (2010)
Krishnan, D., Lin, P., Tai, X.: An efficient operator splitting method for noise removal in images. Commun. Comput. Phys. 1, 847–858 (2006)
Meyer, C.D.: Matrix Analysis and Applied Linear Algebra. SIAM, Philadelphia (2000)
Mignotte, M.: An energy based model for the image edge histogram specification problem. IEEE Trans. Image Process. 21, 379–386 (2012)
Mumford, D., Desolneux, A.: Pattern Theory: The Stochastic Analysis of Real-World Signals. A.K. Peters, Natick (2010)
Nesterov, Y.: Smooth minimization of non-smooth functions. Math. Program., Ser. A 103(1), 127–152 (2005)
Portilla, J., Simoncelli, E.P.: A parametric texture model based on joint statistics of complex wavelet coefficients. Int. J. Comput. Vis. 40, 49–71 (2000)
Lysaker, M., Tai, X.: Noise removal using smoothed normals and surface fitting. IEEE Trans. Image Process. 13(10), 1345–1357 (2004)
Narasimhan, S., Nayar, S.: Contrast restoration of weather degraded images. IEEE Trans. Pattern Anal. Mach. Intell. 25, 713–724 (2003)
Ni, K., Bresson, X., Chan, T., Esedoglu, S.: Local histogram based segmentation using the Wasserstein distance. Int. J. Comput. Vis. 84(1), 97–111 (2009)
Nikolova, M.: Local strong homogeneity of a regularized estimator. SIAM J. Appl. Math. 61, 633–658 (2000)
Nikolova, M.: A variational approach to remove outliers and impulse noise. J. Math. Imaging Vis. 20(1–2), 99–120 (2004)
Nikolova, M.: Weakly constrained minimization. Application to the estimation of images and signals involving constant regions. J. Math. Imaging Vis. 21(2), 155–175 (2004)
Pólya, G.: Über ganzwertige ganze Funktionen. Rend. Circ. Mat. Palermo 40, 1–16 (1915)
Pratt, W.K.: Digital Image Processing, 2nd edn. Wiley, New York (1991)
Rosenfeld, A., Kak, K.: Digital Picture Processing. Academic Press, Upper Saddle River (1982)
Reza, A.M.: Realization of the contrast limited adaptive histogram equalization (CLAHE) for real-time image enhancement. J. VLSI Signal Process. 38(1), 35–44 (2004)
Rolland, J.-P., Vo, V., Bloss, B., Abbey, C.K.: Fast algorithms for histogram matching: Application to texture synthesis. J. Electron. Imaging 9(1), 39–45 (2000)
Rudin, L., Osher, S., Fatemi, E.: Nonlinear total variation based noise removal algorithms. Physica D 60, 259–268 (1992)
Russ, J.C.: The Image Processing Handbook, 2nd edn. CRC Press, New York (1995)
Sapiro, G., Caselles, V.: Histogram modification via partial differential equations. In: International Conference on Image Processing 1995, vol. 3, pp. 632–635. IEEE, New York (2002)
Sen, D., Sankar, P.: Automatic exact histogram specification for contrast enhancement and visual system based quantitative evaluation. IEEE Trans. Image Process. 20, 1211–1220 (2011)
Sim, K., Tso, C., Tan, Y.: Recursive sub-image histogram equalization applied to gray scale images. Pattern Recognit. Lett. 28, 1209–1221 (2007)
Tan, T., Sim, K., Tso, C.: Image enhancement using background brightness preserving histogram equalisation. Electron. Lett. 48(3), 155–157 (2012)
Vogel, C., Oman, M.: Iterative method for total variation denoising. SIAM J. Sci. Comput. 17, 227–238 (1996)
Wan, Y., Shi, D.: Joint exact histogram specification and image enhancement through the wavelet transform. IEEE Trans. Image Process. 16(9), 2245–2250 (2007)
Wang, C., Ye, Z.: Brightness preserving histogram equalization with maximum entropy: a variational perspective. IEEE Trans. Consum. Electron. 51(4), 1326–1334 (2005)
Author information
Authors and Affiliations
Corresponding author
Additional information
Y.-W. Wen research was supported in part by NFSC Grant.
R. Chan research was supported in part by HKRGC Grant CUHK400412 and DAG Grant 2060408.
Appendix A
Appendix A
Given a square matrix A, the expression A≻0 means that A is positive definite and A⪰0 that A is positive semi-definite.
1.1 A.1 Proof of Proposition 1
By Hypothesis 1, for any u∈ℝn, the function \(\mathcal {J}(\cdot,\mathbf{u})\) in (2) is strictly convex and coercive, hence for any u and β>0, it has a unique minimizer. Each minimizer point \(\widehat{\mathbf{f}}\) of \(\mathcal{J}(\widehat {\mathbf{f}},\mathbf{u})\) is determined by \(D_{1}\mathcal{J}(\widehat{\mathbf{f}},\mathbf{u})=0\). We have
where
Differentiation with respect to \(\widehat{\mathbf{f}}\) yet again yields
Here, \(D_{1}^{2}\varPsi(\widehat{\mathbf{f}},\mathbf{u})\) is an n×n diagonal matrix with strictly positive entries according to Hypothesis 1:
Hence \(D_{1}^{2}\varPsi(\mathcal{F}(\mathbf{u}),\mathbf{u})\succ0\). Furthermore,
so \(D_{1}^{2}\varPhi(\widehat{\mathbf{f}})\succeq0\). It follows that \(D_{1}^{2}\mathcal{J}(\widehat{\mathbf{f}},\mathbf{u})\succ0\), for any u∈ℝn.
Consequently, Lemma 1 holds true for any u∈ℝn and any β>0. The same lemma shows that the statement of Proposition 1 holds true for \(\mathcal{O}=\mathbb{R}^{n}\).
1.2 A.2 Proof of Lemma 2
Since \(\mathcal{F}\) is a local minimizer function,
We can thus differentiate with respect to u on both sides of (24) which yields
Note that \(D\mathcal{F}(\mathbf{u})\) and \(D_{2}D_{1}\mathcal{J}(\mathcal {F}(\mathbf{u}),\mathbf{u})\) are n×n real matrices. The Hessian matrix \(H(\mathbf{u})=D_{1}^{2}\mathcal{J}(\mathcal {F}(\mathbf{u}),\mathbf{u})\) can be expanded using (21):
Replacing \(\widehat{\mathbf{f}}\) by \(\mathcal{F}(\mathbf{u})\) in (22) and (23) yields
as stated in (5). Using Hypothesis 1, it is readily seen that
Then H(u)≻0, hence H(u) is invertible.
Using (19) and (A.1), where we consider \(\mathcal {F}(\mathbf{u})\) in place of \(\widehat{\mathbf{f}}\), shows that
Then (25) is equivalent to
Obviously, \(\mathrm{rank}\big(D\mathcal{F}(\mathbf{u})\big)=n\). This result is independent of the value of β>0.
1.3 A.3 Proof of Theorem 1
The proof consists of two parts.
(I) Given \(g\in\mathcal{G}\), where \(\mathcal{G}\) is given in (8), consider the function f g :ℝn→ℝ defined by
By Lemma 2, \(D\mathcal{F}(\mathbf{u})\) is invertible. HenceFootnote 5 \(g^{T}D\mathcal {F}(\mathbf{u})\neq0\) and thus
In particular, f g does not have critical points. Its inverse of the origin K g reads
By an extensionFootnote 6 of the constant rank theorem [4], the subset K g in (28), supposed nonempty, is a \(\mathcal{C}^{s-1}\) manifold of ℝn of dimension n−1. Hence \(\mathbb{L}^{n}(K_{g})=0\) (see e.g. [20, 31]). Using Proposition 1, f g is \(\mathcal{C}^{s-1}\)-continuous, so K g is closed.
The set \(K_{\mathcal{G}}\) in (9) also reads
Using that \(\mathcal{G}\) is of finite cardinality, it follows that \(K_{\mathcal{G}}\) is closed in ℝn and that
The conclusion is clearly independent of the value of β>0. (II) Given \((i,j)\in\mathbb{I}_{n}\times \mathbb{I}_{n}\) (including i=j), define the subset K i,j ⊂ℝn as
From Proposition 1, \(\mathcal{F}_{i}:\mathbb{R}^{n}\to\mathbb {R}\) is \(\mathcal{C}^{s-1}\) continuous, so K i,j is closed in ℝn. By Lemma 2, all rows of \(D\mathcal{F}(\mathbf{u})\in\mathbb{R}^{n\times n}\) are linearly independent, ∀u∈ℝn. Consequently, for any \(i\in\mathbb{I}_{n}\),
Using the same arguments as in (I), K i,j is a \(\mathcal{C}^{s-1}\) submanifold of ℝn of dimension n−1, hence
Noticing that \(K_{\mathcal{I}}\) in (10) is a finite union of (n−1)-dimensional submanifolds in ℝn like K i,j entails the result. The independence of these results from β>0 is obvious.
1.4 A.4 A Lemma Needed to Prove Proposition 2
Lamma 3
Let (A, B)∈ℝn×n×ℝn×n satisfy
Consider the n×n matrix \(M\stackrel{\mathrm{def}}{=}(A+B)^{-1}A\). Then all eigenvalues of M T M belong to (0,1].
Proof
Let λ be an eigenvalue of (A+B)−1 A and v∈ℝn∖{0} a right eigenvector corresponding to λ. Then
If λ=0 then (31) yields A v=0 which is impossible because A≻0, A T=A and v≠0. Hence
Furthermore, (31) yields
Using that A≻0 and B⪰0, the last equation shows that
Combining the latter inequality with (32) entails that
Hence all eigenvalues of M live in (0,1].
Using that A is diagonal with positive diagonal entries, we can write down
Then the definition of M shows thatFootnote 7
Using (35), the expression in (30) is equivalent to
Combining the last result with (36) yields
Consequently, λ 2 is an eigenvalue of M T M corresponding to an eigenvector given by \((A^{\frac{1}{2}}\mathbf{v})\). Thus all eigenvalues of M T M belong to (0,1] as well. □
1.5 A.5 Proof of Proposition 2
Let us denote
as well as
Then \(D\mathcal{F}(\mathbf{u})=M(\mathbf{u})\). We have
Using Lemma 3 and Hypothesis 1, for any v∈ℝn, all eigenvalues of (M(v))T M(v) are in (0,1]. By the definition of the matrix 2-norm [33] one obtains
Noticing that M(⋅) is a continuous mapping, the mean value theorem (see e.g. [4, 14]) shows that
Rights and permissions
About this article
Cite this article
Nikolova, M., Wen, YW. & Chan, R. Exact Histogram Specification for Digital Images Using a Variational Approach. J Math Imaging Vis 46, 309–325 (2013). https://doi.org/10.1007/s10851-012-0401-8
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-012-0401-8