<p><b>Abstract</b>—This article presents a mathematical definition of texture—the <it>Julesz ensemble</it><tmath>$\Omega({\bf{h}})$</tmath>, which is the set of all images (defined on <tmath>${\rm{Z}}^2$</tmath>) that share identical statistics <tmath>${\bf{h}}$</tmath>. Then texture modeling is posed as an inverse problem: Given a set of images sampled from an unknown Julesz ensemble <tmath>$\Omega({\bf{h}}_\ast)$</tmath>, we search for the statistics <tmath>${\bf{h}}_\ast$</tmath> which define the ensemble. A Julesz ensemble <tmath>$\Omega({\bf{h}})$</tmath> has an associated probability distribution <tmath>$q({\rm{\bf{I}}}; {\bf{h}})$</tmath>, which is uniform over the images in the ensemble and has zero probability outside. In a companion paper [<ref type="bib" rid="bibI055433">33</ref>], <tmath>$q({\rm{\bf{I}}}; {\bf{h}})$</tmath> is shown to be the <it>limit distribution</it> of the FRAME (Filter, Random Field, And Minimax Entropy) model [<ref type="bib" rid="bibI055436">36</ref>], as the image lattice <tmath>$\Lambda \rightarrow {\rm{Z}}^2$</tmath>. This conclusion establishes the intrinsic link between the scientific definition of texture on <tmath>${\rm{Z}}^2$</tmath> and the mathematical models of texture on finite lattices. It brings two advantages to computer vision: 1) The engineering practice of synthesizing texture images by matching statistics has been put on a mathematical foundation. 2) We are released from the burden of learning the expensive FRAME model in feature pursuit, model selection and texture synthesis. In this paper, an efficient Markov chain Monte Carlo algorithm is proposed for sampling Julesz ensembles. The algorithm generates random texture images by moving along the directions of filter coefficients and, thus, extends the traditional single site Gibbs sampler. We also compare four popular statistical measures in the literature, namely, moments, rectified functions, marginal histograms, and joint histograms of linear filter responses in terms of their descriptive abilities. Our experiments suggest that a small number of bins in marginal histograms are sufficient for capturing a variety of texture patterns. We illustrate our theory and algorithm by successfully synthesizing a number of natural textures.</p>