All studies

Multiresolution synthesis

Image Analogies

Show an algorithm an image and its painted counterpart. It uses that relationship to synthesize a treatment for a different image.

JavaScript · Canvas · Web Workers · Multiresolution synthesis

View source on GitHub

Try it

Runs locally in your browser. Uploaded images stay on your device.

All processing stays in your browser. Image uploads are resized to a 256px preview and paired inputs must have matching proportions.

A and A′ must be an aligned pair. The sample A′ was computed by the painterly renderer; B is a separate photograph.

A · source photograph
A · source photograph
A′ · computed painting
A′ · computed painting
B · new photograph
B · new photograph
Precomputed Image Analogies example
Computed example · run to make your own

Ready when you are.

Worker processing · local inputs · downloadable output

How it works

A and A′ must be an aligned pair. The sample A′ was computed by the painterly renderer; B is a separate photograph.

  1. Build matched Gaussian pyramids for A, A′, and the new image B.
  2. Compare source appearance and already-synthesized neighborhoods to find candidate correspondences.
  3. Choose between appearance matches and coherent neighbor predictions, then copy pixels from A′ into B′.

Read the original research
Hertzmann, Jacobs, Oliver, Curless & Salesin · 2001

Computed examples

An aligned example pair, a new input, and the synthesized result.

Original harbor photograph used as exemplar A
A · original harbor photograph
The same harbor painted by the curved-stroke algorithm, aligned with A
A′ · the same image, processed by the painterly renderer
A separate landscape photograph used as the new target B
B · a different photograph
A landscape reconstructed with the painted appearance of an example image pair
B′ · synthesized from the relationship between A and A′

Source photographs were generated for these studies. The displayed results were computed by the algorithms; they are not generated illustrations of an expected result. The painted exemplar was produced by the painterly study and stays spatially aligned with its original. Published previews are compressed for the web.

Implementation and limits

A small, bounded multiresolution synthesis study with sampled search. It does not use a neural network or infer semantic style; patch artifacts are visible, especially across unrelated scenes.

Interactive settings are bounded to keep the experiment practical in a browser. Higher detail can cost more processing time without guaranteeing a better result. The implementation and its tests are available in the source repository.