Texture synthesis is the process of
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
ically constructing a large
digital image
A digital image is an image composed of picture elements, also known as pixels, each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions f ...
from a small digital sample image by taking advantage of its structural content. It is an object of research in
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
and is used in many fields, amongst others
digital image editing
Image editing encompasses the processes of altering images, whether they are Digital photography, digital photographs, traditional Photographic processing, photo-chemical photographs, or illustrations. Traditional analog image editing is known ...
,
3D computer graphics
3D computer graphics, sometimes called Computer-generated imagery, CGI, 3D-CGI or three-dimensional Computer-generated imagery, computer graphics, are graphics that use a three-dimensional representation of geometric data (often Cartesian coor ...
and
post-production of films.
Texture synthesis can be used to fill in holes in images (as in
inpainting
Inpainting is a conservation process where damaged, deteriorated, or missing parts of an artwork are filled in to present a complete image. This process is commonly used in image restoration. It can be applied to both physical and digital art m ...
), create large non-repetitive background images and expand small pictures.
Contrast with procedural textures
Procedural texture
In computer graphics, a procedural texture is a Image texture, texture created using a mathematical description (i.e. an algorithm) rather than directly stored data. The advantage of this approach is low storage cost, unlimited texture resolution ...
s are a related technique which may synthesise textures from scratch with no source material. By contrast, texture synthesis refers to techniques where some source image is being matched or extended.
Textures
"
Texture
Texture may refer to:
Science and technology
* Image texture, the spatial arrangement of color or intensities in an image
* Surface texture, the smoothness, roughness, or bumpiness of the surface of an object
* Texture (roads), road surface c ...
" is an ambiguous word and in the context of texture synthesis may have one of the following meanings:
# In common speech, the word "texture" is used as a synonym for "surface structure". Texture has been described by five different properties in the
psychology of perception: ''coarseness'', ''contrast'', ''directionality'', ''line-likeness'' and ''roughness'' .
# In
3D computer graphics
3D computer graphics, sometimes called Computer-generated imagery, CGI, 3D-CGI or three-dimensional Computer-generated imagery, computer graphics, are graphics that use a three-dimensional representation of geometric data (often Cartesian coor ...
, a texture is a digital image applied to the surface of a three-dimensional model by
texture mapping
Texture mapping is a term used in computer graphics to describe how 2D images are projected onto 3D models. The most common variant is the UV unwrap, which can be described as an inverse paper cutout, where the surfaces of a 3D model are cut ap ...
to give the model a more realistic appearance. Often, the image is a photograph of a "real" texture, such as
wood grain
Wood grain is the longitudinal arrangement of wood fibers or the pattern resulting from such an arrangement. It has various derived terms refer to different aspects of the fibers or patterns. Wood grain is important in woodworking and it impacts ...
.
# In
image processing
An image or picture is a visual representation. An image can be two-dimensional, such as a drawing, painting, or photograph, or three-dimensional, such as a carving or sculpture. Images may be displayed through other media, including a pr ...
, every digital image composed of repeated elements is called a "texture."
Texture can be arranged along a spectrum going from regular to stochastic, connected by a smooth transition:
* Regular textures. These textures look like somewhat regular patterns. An example of a structured texture is a stonewall or a floor tiled with paving stones.
* Stochastic textures. Texture images of stochastic textures look like
noise
Noise is sound, chiefly unwanted, unintentional, or harmful sound considered unpleasant, loud, or disruptive to mental or hearing faculties. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibrat ...
: colour dots that are randomly scattered over the image, barely specified by the attributes minimum and maximum brightness and average colour. Many textures look like stochastic textures when viewed from a distance. An example of a stochastic texture is
roughcast
Roughcast and pebbledash are durable coarse plaster surfaces used on outside walls. They consists of lime and sometimes cement mixed with sand, small gravel and often pebbles or shells. The materials are mixed into a slurry and are then throw ...
.
Goal
Texture synthesis algorithms are intended to create an ''output image'' that meets the following requirements:
* The output should have the size given by the user.
* The output should be as similar as possible to the sample.
* The output should not have visible artifacts such as seams, blocks and misfitting edges.
* The output should not repeat, i. e. the same structures in the output image should not appear multiple places.
Like most algorithms, texture synthesis should be efficient in computation time and in memory use.
Methods
The following methods and algorithms have been researched or developed for texture synthesis:
Tiling
The simplest way to generate a large image from a sample image is to
tile
Tiles are usually thin, square or rectangular coverings manufactured from hard-wearing material such as ceramic, Rock (geology), stone, metal, baked clay, or even glass. They are generally fixed in place in an array to cover roofs, floors, wal ...
it. This means multiple copies of the sample are simply copied and pasted side by side. The result is rarely satisfactory. Except in rare cases, there will be the seams in between the tiles and the image will be highly repetitive.
Stochastic texture synthesis
Stochastic texture synthesis methods produce an image by randomly choosing colour values for each pixel, only influenced by basic parameters like minimum brightness, average colour or maximum contrast. These algorithms perform well with stochastic textures only, otherwise they produce completely unsatisfactory results as they ignore any kind of structure within the sample image.
Single purpose structured texture synthesis
Algorithms of that family use a fixed procedure to create an output image, i. e. they are limited to a single kind of structured texture. Thus, these algorithms can both only be applied to structured textures and only to textures with a very similar structure. For example, a single purpose algorithm could produce high quality texture images of stonewalls; yet, it is very unlikely that the algorithm will produce any viable output if given a sample image that shows pebbles.
Chaos mosaic
This method, proposed by the Microsoft group for internet graphics, is a refined version of tiling and performs the following three steps:
# The output image is filled completely by tiling. The result is a repetitive image with visible seams.
# Randomly selected parts of random size of the sample are copied and pasted randomly onto the output image. The result is a rather non-repetitive image with visible seams.
# The output image is filtered to smooth edges.
The result is an acceptable texture image, which is not too repetitive and does not contain too many artifacts. Still, this method is unsatisfactory because the smoothing in step 3 makes the output image look blurred.
Pixel-based texture synthesis
These methods, using Markov fields, non-parametric sampling, tree-structured vector quantization and image analogies are some of the simplest and most successful general texture synthesis algorithms. They typically synthesize a texture in scan-line order by finding and copying pixels with the most similar local neighborhood as the synthetic texture. These methods are very useful for image completion. They can be constrained, as in
image analogies, to perform many interesting tasks. They are typically accelerated with some form of Approximate Nearest Neighbor method since the exhaustive search for the best pixel is somewhat slow. The synthesis can also be performed in multiresolution, such as through use of a noncausal nonparametric multiscale Markov random field.
Patch-based texture synthesis
Patch-based texture synthesis creates a new texture by copying and
stitching together textures at various offsets, similar to the use of the
clone tool
The clone tool, as it is known in Adobe Photoshop, Inkscape, GIMP, and Corel PhotoPaint, is used in digital image editing to replace information for one part of a picture with information from another part. In other image editing software, its eq ...
to manually synthesize a texture. Image quilting and graphcut textures are the best known patch-based texture synthesis algorithms. These algorithms tend to be more effective and faster than pixel-based texture synthesis methods.
Deep Learning and Neural Network Approaches
More recently,
deep learning
Deep learning is a subset of machine learning that focuses on utilizing multilayered neural networks to perform tasks such as classification, regression, and representation learning. The field takes inspiration from biological neuroscience a ...
methods were shown to be a powerful, fast and data-driven, parametric approach to texture synthesis. The work of Leon Gatys is a milestone: he and his co-authors showed that filters from a discriminatively trained deep neural network can be used as effective parametric image descriptors, leading to a novel texture synthesis method.
Another recent development is the use of generative models for texture synthesis. The Spatial GAN method showed for the first time the use of fully unsupervised
GANs for texture synthesis. In a subsequent work,
the method was extended further—PSGAN can learn both periodic and non-periodic images in an unsupervised way from single images or large datasets of images. In addition, flexible sampling in the noise space allows to create novel textures of potentially infinite output size, and smoothly transition between them. This makes PSGAN unique with respect to the types of images a texture synthesis method can create.
Implementations
Some texture synthesis implementations exist as
plug-ins for the free image editor
Gimp
Gimp or GIMP may refer to:
Clothing
* Bondage suit, also called a gimp suit, a type of suit used in BDSM
* Bondage mask, also called a gimp mask, often worn in conjunction with a gimp suit
Embroidery and crafts
* Gimp (thread), an ornamental tr ...
:
TexturizeResynthesizer
A pixel-based texture synthesis implementation:
Parallel Controllable Texture Synthesis
Patch-based texture synthesis:
KUVA: Graphcut texturesDeep Generative Texture Synthesis with PSGAN, implemented in Python with Lasagne + Theano:
* https://github.com/zalandoresearch/psgan
Literature
Several of the earliest and most referenced papers in this field include:
Popatin 1993 - "Novel cluster-based probability model for texture synthesis, classification, and compression".
Heeger-Bergenin 1995 - "Pyramid based texture analysis/synthesis".
Paget-Longstaffin 1998 - "Texture synthesis via a noncausal nonparametric multiscale Markov random field"
Efros-Leungin 1999 - "Texture Synthesis by Non-parametric Sampling".
Wei-Levoyin 2000 - "Fast Texture Synthesis using Tree-structured Vector Quantization"
although there was also earlier work on the subject, such as
* Gagalowicz and Song De Ma in 1986, "Model driven synthesis of natural textures for 3-D scenes",
* Lewis in 1984, "Texture synthesis for digital painting".
(The latter algorithm has some similarities to the Chaos Mosaic approach).
The non-parametric sampling approach of Efros-Leung is the first approach that can easily synthesize most types of texture, and it has inspired literally hundreds of follow-on papers in computer graphics. Since then, the field of texture synthesis has rapidly expanded with the introduction of 3D graphics accelerator cards for personal computers. It turns out, however, that
Scott Draves
Scott Draves is an American digital artist. He is the inventor of fractal flames and the leader of the distributed computing project Electric Sheep. He also invented patch-based texture synthesis and published the first implementation of this ...
first published the patch-based version of this technique along with GPL code in 1993 according t
Efros
See also
*
Granular synthesis
Granular synthesis is a sound synthesis method that operates on the microsound time scale.
It is based on the same principle as sampling. However, the samples are split into small pieces of around 1 to 100 ms in duration. These small pieces a ...
, a similar technique for audio rather than images
*
Inpainting
Inpainting is a conservation process where damaged, deteriorated, or missing parts of an artwork are filled in to present a complete image. This process is commonly used in image restoration. It can be applied to both physical and digital art m ...
*
Seam carving
Seam carving (or liquid rescaling) is an algorithm for content-aware image scaling, image resizing, developed by Shai Avidan, of Mitsubishi Electric Research Laboratories (MERL), and Ariel Shamir, of the Interdisciplinary Center and MERL. It fu ...
*
Procedural texture
In computer graphics, a procedural texture is a Image texture, texture created using a mathematical description (i.e. an algorithm) rather than directly stored data. The advantage of this approach is low storage cost, unlimited texture resolution ...
*
Inceptionism
References
External links
texture synthesistexture synthesistexture movie synthesisTexture2005Near-Regular Texture SynthesisThe Texture LabImplementation of Efros & Leung's algorithm with examplesMicro-texture synthesis by phase randomization, with code and online demonstrationImplementation of the Periodic Spatial GAN for texture synthesis
{{DEFAULTSORT:Texture Synthesis
Computer graphics