



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




IEEE International Conference on Computer Vision, Corfu, Greece, September 1999
A non-parametric method for texture synthesis is pro- posed. The texture synthesis process grows a new image outward from an initial seed, one pixel at a time. A Markov random field model is assumed, and the conditional distri- bution of a pixel given all its neighbors synthesized so far is estimated by querying the sample image and finding all sim- ilar neighborhoods. The degree of randomness is controlled by a single perceptually intuitive parameter. The method aims at preserving as much local structure as possible and produces good results for a wide variety of synthetic and real-world textures.
Texture synthesis has been an active research topic in computer vision both as a way to verify texture analysis methods, as well as in its own right. Potential applications of a successful texture synthesis algorithm are broad, in- cluding occlusion fill-in, lossy image and video compres- sion, foreground removal, etc. The problem of texture synthesis can be formulated as follows: let us define texture as some visual pattern on an infinite 2-D plane which, at some scale, has a stationary distribution. Given a finite sample from some texture (an image), the goal is to synthesize other samples from the same texture. Without additional assumptions this problem is clearly ill-posed since a given texture sample could have been drawn from an infinite number of different textures. The usual assumption is that the sample is large enough that it somehow captures the stationarity of the texture and that the (approximate) scale of the texture elements ( texels ) is known. Textures have been traditionally classified as either reg- ular (consisting of repeated texels) or stochastic (without explicit texels). However, almost all real-world textures lie somewhere in between these two extremes and should be captured with a single model. In this paper we have chosen a statistical non-parametric model based on the assumption
of spatial locality. The result is a very simple texture syn- thesis algorithm that works well on a wide range of textures and is especially well-suited for constrained synthesis prob- lems (hole-filling).
Most recent approaches have posed texture synthesis in a statistical setting as a problem of sampling from a probabil- ity distribution. Zhu et. al. [12] model texture as a Markov Random Field and use Gibbs sampling for synthesis. Un- fortunately, Gibbs sampling is notoriously slow and in fact it is not possible to assess when it has converged. Heeger and Bergen [6] try to coerce a random noise image into a texture sample by matching the filter response histograms at different spatial scales. While this technique works well on highly stochastic textures, the histograms are not pow- erful enough to represent more structured texture patterns such as bricks. De Bonet [1] also uses a multi-resolution filter-based ap- proach in which a texture patch at a finer scale is condi- tioned on its “parents” at the coarser scales. The algorithm works by taking the input texture sample and randomizing it in such a way as to preserve these inter-scale dependen- cies. This method can successfully synthesize a wide range of textures although the randomness parameter seems to ex- hibit perceptually correct behavior only on largely stochas- tic textures. Another drawback of this method is the way texture images larger than the input are generated. The in- put texture sample is simply replicated to fill the desired di- mensions before the synthesis process, implicitly assuming that all textures are tilable which is clearly not correct. The latest work in texture synthesis by Simoncelli and Portilla [9, 11] is based on first and second order properties of joint wavelet coefficients and provides impressive results. It can capture both stochastic and repeated textures quite well, but still fails to reproduce high frequency information on some highly structured patterns.
In his 1948 article, A Mathematical Theory of Communi- cation [10], Claude Shannon mentioned an interesting way of producing English-sounding written text using -grams. The idea is to model language as a generalized Markov chain: a set of consecutive letters (or words) make up an -gram and completely determine the probability distri- bution of the next letter (or word). Using a large sample of the language (e.g., a book) one can build probability ta- bles for each -gram. One can then repeatedly sample from this Markov chain to produce English-sounding text. This is the basis for an early computer program called M ARK V. S HANEY , popularized by an article in Scientific American [4], and famous for such pearls as: “I spent an interesting evening recently with a grain of salt”. This paper relates to an earlier work by Popat and Picard [8] in trying to extend this idea to two dimensions. The three main challenges in this endeavor are: 1) how to define a unit of synthesis (a letter) and its context ( -gram) for texture,
2. The Algorithm
In this work we model texture as a Markov Random Field (MRF). That is, we assume that the probability distri- bution of brightness values for a pixel given the brightness values of its spatial neighborhood is independent of the rest of the image. The neighborhood of a pixel is modeled as a square window around that pixel. The size of the window is a free parameter that specifies how stochastic the user be- lieves this texture to be. More specifically, if the texture is presumed to be mainly regular at high spatial frequencies and mainly stochastic at low spatial frequencies, the size of the window should be on the scale of the biggest regular feature.
Figure 1. Algorithm Overview. Given a sample texture im- age (left), a new image is being synthesized one pixel at a time (right). To synthesize a pixel, the algorithm first finds all neighborhoods in the sample image (boxes on the left) that are similar to the pixel’s neighborhood (box on the right) and then randomly chooses one neighborhood and takes its center to be the newly synthesized pixel.
Let be an image that is being synthesized from a tex- ture sample image where is the real in- finite texture. Let be a pixel and let be a square image patch of width centered at. Let denote some perceptual distance between two patches. Let us assume for the moment that all pixels in except for are known. To synthesize the value of we first construct an approximation to the conditional probability distribution and then sample from it. Based on our MRF model we assume that is indepen- dent of given. If we define a set
containing all occurrences of in , then the condi- tional pdf of can be estimated with a histogram of all cen- ter pixel values in. 1 Unfortunately, we are only given , a finite sample from , which means there might not be any matches for in. Thus we must use a heuristic which will let us find a plausible to sample from. In our implementation, a variation of the nearest neighbor technique is used: the closest match is found, and all im- age patches with are included in , where for us. The center pixel values of patches in give us a histogram for , which can then be sampled, either uniformly or weighted by. Now it only remains to find a suitable distance. One choice is a normalized sum of squared differences metric
. However, this metric gives the same weight to any mismatched pixel, whether near the center or at the edge of the window. Since we would like to preserve the local structure of the texture as much as possible, the error for (^1) This is somewhat misleading, since if all pixels in except are known, the pdf for will simply be a delta function for all but highly stochastic textures, since a single pixel can rarely be a feature by itself.
(a) (b) (c) (d) Figure 3. Texture synthesis on real-world textures: (a) and (c) are original images, (b) and (d) are synthesized. (a) images D1, D3, D18, and D20 from Brodatz collection [2], (c) granite, bread, wood, and text (a homage to Shannon) images.
Figure 4. Examples of constrained texture synthesis. The synthesis process fills in the black regions.
Figure 4. The black regions in each image are filled in by sampling from that same image. A comparison with De Bonet [1] at varying randomness settings is shown on Fig- ure 7 using texture 161 from his web site.
4. Limitations and Future Work
As with most texture synthesis procedures, only frontal- parallel textures are handled. However, it is possible to use Shape-from-Texture techniques [5, 7] to pre-warp an image into frontal-parallel position before synthesis and post-warp afterwards. One problem of our algorithm is its tendency for some textures to occasionally “slip” into a wrong part of the search space and start growing garbage (Figure 5a) or get locked onto one place in the sample image and produce ver- batim copies of the original (Figure 5b). These problems occur when the texture sample contains too many different types of texels (or the same texels but differently illumi- nated) making it hard to find close matches for the neigh- borhood context window. These problems can usually be eliminated by providing a bigger sample image. We have also used growing with limited backtracking as a solution.
(a) (b) Figure 5. Failure examples. Sometimes the growing algo- rithm “slips” into a wrong part of the search space and starts growing garbage (a), or gets stuck at a particular place in the sample image and starts verbatim copying (b).
In the future we plan to study automatic window-size se- lection, including non-square windows for elongated tex- tures. We are also currently investigating the use of texels as opposed to pixels as the basic unit of synthesis (similar to moving from letters to words in Shannon’s setting). This is akin to putting together a jigsaw puzzle where each piece has a different shape and only a few can fit together. Cur- rently, the algorithm is quite slow but we are working on ways to make it more efficient.
5. Applications Apart from letting us gain a better understanding of tex- ture models, texture synthesis can also be used as a tool for solving several practical problems in computer vision, graphics, and image processing. Our method is particularly versatile because it does not place any constraints on the shape of the synthesis region or the sampling region, mak- ing it ideal for constrained texture synthesis such as hole- filling. Moreover, our method is designed to preserve local image structure, such as continuing straight lines, so there are no visual discontinuities between the original hole out- line and the newly synthesized patch. For example, capturing a 3D scene from several cam- era views will likely result in some regions being occluded from all cameras [3]. Instead of letting them appear as black holes in a reconstruction, a localized constrained texture synthesis can be performed to fill in the missing informa- tion from the surrounding region. As another example, con- sider the problem of boundary handling when performing a convolution on an image. Several methods exist, such as zero-fill, tiling and reflection, however all of them may in- troduce discontinuities not present in the original image. In many cases, texture synthesis can be used to extrapolate the