Image Quilting, Wang Tiling, and Texture Transfer

(Main Website)
Robert Burke

 

Hill Of Beans

 



 

 

These utilties provide C# implementations of key ideas from two Siggraph papers: Efros and Freeman's "Image Quilting for Texture Synthesis and Transfer" (2001) and Cohen et. al.'s "Wang Tiles for Image and Texture Generation" (2003). The first utility generates Wang Tiles for non-periodically tiling the plane with textures (like the hill of beans shown above).  The second performs texture transfer, as depicted below.

The reader is referred to the following Siggraph papers for more information about the algorithms:

Efros, A. A. and W. T. Freeman (2001). Image Quilting for Texture Synthesis and Transfer. Siggraph 2001, Los Angeles, California.

Cohen, M. F., J. Shade, et al. (2003). Wang Tiles for Image and Texture Generation. Siggraph 2003, San Diego.

 

Downloads:

Source, Executables, and Visual Studio 2003.NET Solutions and Project Files

Documentation

(This is released under a 'you can do whatever you want with this' license, and includes no support (but please feel free to mail me if you have questions).

Related:

Microsoft .NET Framework Version 1.1 Redistributable Package (required)

 

The "Texture Quilting and Wang Tiling" Utility takes a small sample of a texture and performs Efros and Freemans' Image Quilting technique to generate a large block of texture. It also takes a large block of texture (either generated using Image Quilting, or loaded in from another source) and generates a set of non-periodic Wang Tiles using Cohen et. al.'s algorithm.

In the example shown to the right, image quilting is used to take a small sample of moss and make a large quilt, from which Wang tiles are generated to tile a non-periodic landscape.

 

Image quilting is used to take a small sample of moss and make a large quilt, from which wang tiles are generated to tile a landscape.

The "Image Quilting Texture Transfer" Utility takes four bitmaps: the source texture, its correspondence map, the target image, and its correspondence map. The correspondence maps are compared to determine the similarity between the source texture and the target image. The source texture is quilted together, respecting both the correspondence map and the texture synthesis requirements.

In the example shown to the right, Gustav becomes a Monet painting, as the texture from the Monet is transferred onto his image using the colors in the images as the two correspondence maps.  Results that are more interesting can be obtained using properties like  luminance to define the correspondence map.

Gustav becomes a Monet painting, as the texture from the Monet is transferred onto his image using the colors in the images as the two correspondence map.

 

Here's a little more documentation that is also included in the download.

Google the title of either of the papers to find more information, including the home pages of the esteemed authors.  Here are links to the home pages of the first authors: Efros and Cohen.

It should go without saying that, since this was a weekend project, it's provided as-is, without any warranties, and all that jazz.. but I welcome comments and I hope this will be useful to someone out there.

If you'd like to contribute (for example, by implementing quilting inhomogeneity (requires that the "corners" implementation on the Wang Tiles is finished up), or by experimenting with the quilting algorithm from another paper (for example, Kwatra et. al.'s Siggraph 2003 paper on GraphCut textures)), please let me know!

-rob
10 Aug 2003

Back to Rob's Home Page