All studies

Multiresolution synthesis

Image Analogies

Provide a courtyard photograph and its aligned engraving treatment. Neighborhood matching transfers that relationship to a different architectural photograph.

JavaScript · Canvas · Web Workers · Multiresolution synthesis

View source on GitHub

Try it

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

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′ is a registered engraving of the courtyard; B is a separate arcade photograph.

A · source photograph
A · source photograph
A′ · registered engraving
A′ · registered engraving
B · new photograph
B · new photograph
Precomputed Image Analogies example
Example · update 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′ is a registered engraving of the courtyard; B is a separate arcade 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 photo-to-engraving pair, a new architectural input, and the synthesized result.

A · original courtyard photograph
A′ · registered engraving of the courtyard
B · a different architectural photograph
B′ · engraving synthesized from the A → A′ relationship

Source photographs were generated for these studies. The displayed results were computed by the algorithms; they are not generated illustrations of an expected result. Sobel contours and tone-controlled hatching prepare A′ from A. That filter is never applied to B: B′ is synthesized by matching neighborhoods and copying pixels from A′. 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.