This is a Torch implementation of a texture-synthesis algorithm very similar to [1].
Given an input texture patch, the algorithm generates a larger version of the same texture. Here's an example:
You can see more examples in the example gallery.
Texture synthesis is implemented in the script synthesis.lua
. The following command line options are available:
-source
: Path to the source image.-output_file
: Path where the output should be written.-height
: Height of the output file, in pixels.-width
: Width of the output file, in pixels.-k
: Kernel size; must be an odd integer.-gpu
: Which GPU to use. Settinggpu >= 0
will run in GPU mode, and settinggpu < 0
will run in CPU-only mode.
You can see examples using different source images and kernel sizes in the example gallery.
[1] Efros, Alexei, and Thomas K. Leung. "Texture synthesis by non-parametric sampling." ICCV 1999.