Images replaced for licensing. The book is published under a CC BY-NC-ND license, which covers only the book as a whole and not its individual images, so this page does not republish the book’s photographs. License-free images stand in for them:
- The immunohistochemistry image (scikit-image) stands in for a photograph of plums (Figures 28.1, 28.9, and 28.12).
- The brick texture (scikit-image) stands in for a photograph of a zebra (Figure 28.9).
- The gravel texture (scikit-image) stands in for a photograph of pebbles (Figure 28.12).
- The gravel texture (scikit-image) stands in for a photograph of a stone wall (Figures 28.6 and 28.8).
- A generated grid of circles stands in for an image of circles (Figure 28.11).
An ‘infinite’ texture by cropping
Because a texture is stationary, meaning its statistics are the same everywhere, you can generate endless new samples of it simply by cropping different windows from one large reference. Each crop looks like a different image of the same stuff. The book shows this on a photograph of plums.
Texture = statistics: the Heeger-Bergen method
Heeger & Bergen model a texture by the histograms of a multi-scale, multi-orientation decomposition (a steerable pyramid) plus the pixel histogram. To synthesize, start from white noise and repeatedly force those histograms to match the reference. The code uses an isotropic Laplacian pyramid in place of the steerable pyramid, the same histogram-matching idea, and decorrelate color with PCA (as the book does), so the synthesis keeps the reference’s colors instead of turning to rainbow noise.
Watching the synthesis converge
Starting from white noise, each round of histogram matching pushes the sample closer to the reference’s statistics. After a handful of iterations the noise has become a convincing texture.
Histogram matching a single subband
The core operation: a band-pass subband of a texture is heavy-tailed (Laplacian-like), while a subband of white noise is Gaussian. Histogram matching is a pointwise monotonic map that turns the Gaussian subband into the texture’s heavy-tailed one.
Efros-Leung: the context window controls everything
Efros & Leung grow a texture one pixel at a time: for each new pixel, search the sample for neighborhoods (an window) similar to the already-synthesized context, and copy a matching center pixel. A small window reproduces local detail but loses the layout; a large window preserves the regular arrangement.
Efros-Leung on a natural texture
On a natural texture, a large enough context grows a larger image that preserves the pebble structure: coherent elements, not just matched statistics (contrast the Heeger-Bergen output above, which scrambles the arrangement).
Concluding remarks
Texture is captured by statistics of local elements. Parametric (Heeger-Bergen) and nonparametric (Efros-Leung) synthesis trade speed against structural fidelity: the same tension that later reappears in learned (GAN / diffusion) texture and image models.

