Skip to content

jcjohnson/texture-synthesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

texture-synthesis

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:

Input

Output

You can see more examples in the example gallery.

Usage

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. Setting gpu >= 0 will run in GPU mode, and setting gpu < 0 will run in CPU-only mode.

You can see examples using different source images and kernel sizes in the example gallery.

Works Cited:

[1] Efros, Alexei, and Thomas K. Leung. "Texture synthesis by non-parametric sampling." ICCV 1999.

About

Texture synthesis in Torch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published