Abstract
This paper introduces a new approach for texture synthesis. We propose a unified framework that both imposes first order statistical constraints on the use of atoms from an adaptive dictionary, as well as second order constraints on pixel values. This is achieved thanks to a variational approach, the minimization of which yields local extrema, each one being a possible texture synthesis. On the one hand, the adaptive dictionary is created using a sparse image representation rationale, and a global constraint is imposed on the maximal number of use of each atom from this dictionary. On the other hand, a constraint on second order pixel statistics is achieved through the power spectrum of images. An advantage of the proposed method is its ability to truly synthesize textures, without verbatim copy of small pieces from the exemplar. In an extensive experimental section, we show that the resulting synthesis achieves state of the art results, both for structured and small scale textures.
Similar content being viewed by others
Notes
Whose range is the range of the pixels’ values.
We recall the normalization \(\tilde{\alpha }_p=\alpha _pZ\) with \(Z = \lceil \tau /\varDelta \rceil ^2\).
References
Aguerrebere, C., Gousseau, Y., Tartavel, G.: Exemplar-based Texture Synthesis: the Efros-Leung Algorithm. Image Processing On Line 2013, 213–231 (2013)
Aharon, M., Elad, M., Bruckstein, A.: K-SVD: An algorithm for designing overcomplete dictionaries for sparse representation. IEEE Transactions on, signal processing, 54(11), 4311–4322 (2006)
Barnes, C., Shechtman, E., Finkelstein, A., Goldman, D.: PatchMatch: A randomized correspondence algorithm for structural image editing. ACM Transactions on Graphics (Proceedings SIGGRAPH) 28(3) (2009)
Bauschke, H.H., Combettes, P.L., Luke, D.R.: Phase retrieval, error reduction algorithm, and fienup variants: a view from convex optimization. JOSA A 19(7), 1334–1345 (2002)
Bonneel, N., Rabin, J., Peyré, G., Pfister, H.: Sliced and radon wasserstein barycenters of measures. to appear in Journal of Mathematical Imaging and Vision (2014). doi:10.1007/s10851-014-0506-3. http://hal.archives-ouvertes.fr/hal-00881872/
Briand, T., Vacher, J., Galerne, B., Rabin, J.:The Heeger and Bergen pyramid based texture synthesis algorithm. Image Processing On Line, preprint (2013)
Cross, G., Jain, A.: Markov random field texture models. IEEE Transactions on, Pattern Analysis and Machine Intelligence 5(1), 25–39 (1983)
Desolneux, A., Moisan, L., Ronsin, S.: A compact representation of random phase and gaussian textures. In: Acoustics, Speech and Signal Processing (ICASSP), 2012 IEEE International Conference on, pp. 1381–1384. IEEE (2012)
Efros, A., Freeman, W.: Image quilting for texture synthesis and transfer. In: Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pp. 341–346. ACM (2001)
Efros, A., Leung, T.: Texture synthesis by non-parametric sampling. In: Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, vol. 2, pp. 1033–1038. IEEE (1999)
Elad, M., Aharon, M.: Image denoising via sparse and redundant representations over learned dictionaries. IEEE Transactions on, Image Processing 15(12), 3736–3745 (2006)
Engan, K., Aase, S., Hakon Husoy, J.: Method of optimal directions for frame design. In: Acoustics, Speech, and Signal Processing, 1999. Proceedings., 1999 IEEE International Conference on, vol. 5, pp. 2443–2446. IEEE (1999)
Galerne, B., Gouseau, Y., Morel, J.M.: Micro-texture synthesis by phase randomization. Image Processing On Line (2011)
Galerne, B., Gousseau, Y., Morel, J.: Random phase textures: Theory and synthesis. IEEE Transactions on, Image Processing 20(1), 257–267 (2011)
Galerne, B., Lagae, A., Lefebvre, S., Drettakis, G.: Gabor noise by example. ACM Trans. Graph. 31(4), 73 (2012)
Heeger, D., Bergen, J.: Pyramid-based texture analysis/synthesis. In: SIGGRAPH ’95, pp. 229–238 (1995)
Julesz, B.: Visual pattern discrimination. IRE Trans. Inf. Theor. 8(2), 84–92 (1962)
Julesz, B.: A theory of preattentive texture discrimination based on first-order statistics of textons. Biol Cybern 41(2), 131–138 (1981)
Kuhn, H.: The hungarian method for the assignment problem. Nav. res. logist. q. 2(1–2), 83–97 (1955)
Kwatra, V., Essa, I., Bobick, A., Kwatra, Kwatra: Texture optimization for example-based synthesis. ACM Trans. Graph. 24, 795–802 (2005)
Lagae, A., Lefebvre, S., Cook, R., Derose, T., Drettakis, G., Ebert, D., Lewis, J., Perlin, K., Zwicker, M.: State of the art in procedural noise functions. EG 2010-State of the Art Reports (2010)
Lagae, A., Lefebvre, S., Drettakis, G., Dutré, P.: Procedural noise using sparse gabor convolution. In: ACM Transactions on Graphics (TOG), vol. 28, p. 54. ACM (2009)
Lefebvre, S., Hoppe, H.: Parallel controllable texture synthesis. ACM Trans. Grap. (TOG) 24(3), 777–786 (2005)
Lewis, A.S., Luke, D.R., Malick, J.: Local linear convergence for alternating and averaged nonconvex projections. Found. Comput. Math. 9(4), 485–513 (2009)
Mairal, J., Bach, F., Ponce, J., Sapiro, G.: Online learning for matrix factorization and sparse coding. J Mach. Learn. Res. 11, 19–60 (2010)
Mallat, S., Zhang, Z.: Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing 41(12), 3397–3415 (1993)
Moisan, L.: Periodic plus smooth image decomposition. J. Math. Imag. Vis. 39(2), 161–179 (2011)
Olshausen, B., Field, D.: Natural image statistics and efficient coding. Network 7(2), 333–339 (1996)
Perlin, K.: An image synthesizer. SIGGRAPH Comput. Graph. 19(3), 287–296 (1985)
Peyré, G.: Sparse modeling of textures. J. Math. Imag. Vis. 34(1), 17–31 (2009)
Pickard, R., Graszyk, C., Mann, S., Wachman, J., Pickard, L., Campbell, L.: Vistex Database. Media Lab, MIT, Cambridge, Massachusetts (1995)
Pitie, F., Kokaram, A., Dahyot, R.: N-dimensional probability density function transfer and its application to color transfer. In: Computer Vision, 2005. ICCV 2005. Tenth IEEE International Conference on, vol. 2, pp. 1434–1439. IEEE (2005)
Portilla, J., Simoncelli, E.: A parametric texture model based on joint statistics of complex wavelet coefficients. Int. J. Comput. Vis. 40(1), 49–70 (2000)
Ramanarayanan, G., Bala, K.: Constrained texture synthesis via energy minimization. IEEE Transactions on Visualization and Computer Graphics 13(1), 167–178 (2007)
Simoncelli, E., Freeman, W., Adelson, E., Heeger, D.: Shiftable multiscale transforms. IEEE Transactions on Information Theory 38(2), 587–607 (1992)
Tartavel, G., Gousseau, Y., Peyré, G.: Constrained sparse texture synthesis. In: Proceedings of SSVM’13 (2013)
Tropp, J.: Greed is good: Algorithmic results for sparse approximation. IEEE Transactions on Information Theory 50(10), 2231–2242 (2004)
Wei, L., Lefebvre, S., Kwatra, V., Turk, G.: State of the art in example-based texture synthesis. In: Eurographics 2009, State of the Art Report, EG-STAR. Eurographics Association (2009)
Wei, L., Levoy, M.: Fast texture synthesis using tree-structured vector quantization. In: SIGGRAPH ’00, pp. 479–488. ACM Press/Addison-Wesley Publishing Co. (2000)
Wexler, Y., Shechtman, E., Irani, M.: Space-time video completion. In: Computer Vision and Pattern Recognition, 2004. CVPR 2004. Proceedings of the 2004 IEEE Computer Society Conference on, vol. 1, pp. I-120. IEEE (2004)
Xia, G.S., Ferradans, S., Peyré, G., Aujol, J.F.: Synthesizing and mixing stationary gaussian texture models. SIAM J. Imag. Sci. 7(1), 476–508 (2014). doi:10.1137/130918010. http://hal.archives-ouvertes.fr/hal-00816342/
Acknowledgments
We would like to thank the reviewers for their valuable suggestions to improve and complete this paper. We thank the authors of the VisTex database [31] for the set of textures they publicly provide. Gabriel Peyré acknowledges support from the European Research Council (ERC project SIGMA-Vision).
Author information
Authors and Affiliations
Corresponding author
Appendix 1: Proofs
Appendix 1: Proofs
1.1 Projection on \({\fancyscript{C}_{\mathrm {s}}}\)
We prove expression (8) of the projection of \(u\) on \({\fancyscript{C}_{\mathrm {s}}}\). The projection is \(u_s\in {\fancyscript{C}_{\mathrm {s}}}\) of the form \(\hat{u}_s(m) = e^{\mathrm {i}\varphi (m)} \hat{u}_0(m)\). Our goal is to minimize
with respect to \(\varphi \).
As the term of the sum are independent, the problem is to minimize
where \(x=\hat{u}(m)\), \(y=\hat{u}_0(m)\) and \(\psi =\varphi (m)\) for any \(m\). The hermitian product of \(x,y \in \mathbb {C}^3\) is denoted by \(x\cdot y = \sum _ix_iy_i^* \in \mathbb {C}\)
The development of the expression of \(f(\psi )\) gives
The function \(f\) being continuous and \(2\pi \)-periodic on \(\mathbb {R}\), it admits (at least) a minimum and a maximum which are critical points \(\psi _c\) satisfying \(f'(\psi _c)=0\). Let’s write \(x\cdot y=Ae^{\mathrm {i}\theta }\) with \(A\ge 0\). The derivative
gives \(e^{2\mathrm {i}\psi _c}=e^{2\mathrm {i}\theta }\) and the critical points \(\psi _c\) are thus characterized by \(e^{\mathrm {i}\psi _c}=\pm e^{\mathrm {i}\theta }\).
The second derivative
provides more information: we know \(e^{\mathrm {i}\theta }\) is a minimum since \(f''(e^{\mathrm {i}\theta })=2A\ge 0\), and \(-e^{\mathrm {i}\theta }\) is a maximum since \(f''(-e^{\mathrm {i}\theta })=-2A\le 0\).
The case \(x\cdot y=0\) leads to \(A=0\) and \(f\) being constant. In other cases, \(A>0\): the minimums \(\psi _\mathrm {min}\) of the functions are strict and satisfy \(e^{\mathrm {i}\psi _\mathrm {min}}=e^{\mathrm {i}\theta }=\frac{x\cdot y}{{\left| x\cdot y\right| }}\), hence the expression of \(\hat{u}_s(m)\) given in (8).
1.2 Projection on \({\fancyscript{C}_{\mathrm {p}}}\)
We provide here the proof that (15) and (16) are the minimizers of (12).
Using (17), the expression (12) is \(\left\| R^{\left( \ell \right) }- w D_0 E_{n,k}\right\| ^2\). Expressing this norm as the sum of the norms of the columns leads to
Let us fix \(k\) and \(n\). The problem
is now an orthogonal projection. Since \(D_n\) is normalized, the solution is
as stated in (16) and Pythagora’s theorem gives the error
Substituting \(w\) in (30) by its optimal value \(w^*\) function of \((k,n)\) simplifies the problem to
Hence the result (17) stating \((k^*,n^*) = {{\mathrm{arg\,max}}}{\left| \langle R^{\left( \ell \right) }_k,D_n \rangle \right| }\) among the set \(\fancyscript{I}_{W^{\left( \ell \right) }}\) of admissible \((k,n)\).
1.3 Complexity of the greedy Algorithm 1
Here we show that the complexity of the greedy Algorithm 1 without the back-projection step is
Initialization. Computing the inner products \(\varPhi =D_0^T P\) between the \(K\) patches and the \(N\) atoms in dimension \(L\) requires \(\fancyscript{O}(KNL)\) operations using standard matrix multiplications. Precomputing the inner products \(D_0^T D_0\) is in \(\fancyscript{O}(N^2 L)\) operations. Initializing \(W\) and \(R\) is in \(KN\) operation.
Building a max-heap from the absolute values of the \(KN\) inner products \(\varPhi _{n,k} = \langle R_k,D_n \rangle \) has a time-complexity of \(\fancyscript{O}\big (KN \log KN))\).
Loop for \(\ell =1\) to \(\lambda SK\). Finding the indices \((k^*,n^*)\) and extracting the maximum \({\left| \varPhi _{n^*,k^*}\right| }\) from the heap requires \(\fancyscript{O}(\log KN)\) operations.
Updating \(W\) with the optimal weight \(w^*=\varPhi _{n^*,k^*}\) is only one operation. Updating \(R\) is in \(\fancyscript{O}(L)\) operations since only the \(L\) coefficients of the \(k^*\)-th column is affected. Similarly, updating \(\varPhi \) is in \(\fancyscript{O}(N \log KN)\) operations since the \(N\) updated coefficients must be relocated in the heap, and we recall that \(D_0^T D_0\) is precomputed.
Conclusion. Since we assume that \(S\ll L\le N\ll K\), previous bounds can be simplified, and in particular \(\log (KN)\in \fancyscript{O}(\log K)\). The initializations and precomputations are in \(\fancyscript{O}(KNL)\). Updating the heap is in \(\fancyscript{O}(\lambda SKN \log K)\); building and searching the heap are cheaper. Hence the complexity (35).
Rights and permissions
About this article
Cite this article
Tartavel, G., Gousseau, Y. & Peyré, G. Variational Texture Synthesis with Sparsity and Spectrum Constraints. J Math Imaging Vis 52, 124–144 (2015). https://doi.org/10.1007/s10851-014-0547-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-014-0547-7