next up previous
Next: Experimental Results Up: Texture Synthesis by Bunch Previous: Texture Synthesis by a

Subsections

Bunch Sampling

The bunch sampling algorithm is based on the results of the structural identification of a generic MGRF model, i.e, the geometric structure and the placement rule derived from a training texture. The geometric structure is used as a mask for sampling texels from the training image, while the placement rule guides the placement of each texel into the synthetic texture. The bunch sampling is similar to the methods based on non-parametric sampling in also transferring and rearranging image signals sampled from the training image into the synthetic one.

For a regular texture, the locations of a texel in the training and the synthetic images are related in order to preserve the placement rule. That is, the two locations have a same relative shift with respect to the estimated placement gird tessellating both images. But for a stochastic texture without an explicit placement rule, each texel is copied to a random location in the synthetic image.

Such a retrieve-and-place procedure repeats until the entire image plane of a new texture is fully covered. Since each step is independent of any previous steps, the synthesis is non-causal.

Algorithm Details


\begin{algorithm}
% latex2html id marker 4839\caption{Bunch Sampling for Regul...
...NEND}\setcounter{SYNEND}{\value{ALC@line}}
\par
\end{algorithmic}\end{algorithm}

The bunch sampling algorithm for synthesising a regular texture is outlined in Algorithm 7. Generally, the algorithm might be divided into an analysis stage (from lines 0 to 0) and a synthesis stage (from lines 0 to 0).

Analysis Stage

involves collecting the GLCH statistics from a training image and computing partial energy for each clique family to form an MBIM( lines 0 to 0), followed by analysing the resulting MBIM to derive the geometric structure and the placement grid for texels, specified by four grid parameters ( lines 0 to 0).

Synthesis Stage

involves selecting a sampling location of training texels for each synthesis location in line with the placement grid (line 0) and transferring a selected texel onto the output image (line 0). The process of sampling and transferring loops until the entire image plane of the synthetic texture is fully covered (lines. 0 to 0).

Implementation Issues

A few issues regarding implementing the algorithm are discussed below.

Signal Collisions.

In synthesis of a stochastic texture, signal collision might happen when a texel has to be placed into a region that has been partly synthesised. A simple heuristic rule of preserving the already synthesised signals is applied to resolve signal collisions [40].

Texel Selection.

Since most of textures are not strictly homogeneous, a stack of different texels might be associated with a same relative shift reflecting local variations of textures. Two strategies could be used for texel selection in the synthesis. The first method is to compute an approximate Bayesian estimate of texels, based on the maximum marginal posterior (MMP) probabilities of image signals by superposing all associated texels, for each relative shift. The resulting estimate represents the most probable texel at each relative position and is used in texture synthesis. The second method is to select a random texel from the stack as a representative for each relative shift. Synthesis results with both methods are shown and discussed in the next section.

Synthesis of a Colour Texture.

To date most of texture analysis methods have been limited only to grey level images. For instance, a generic MGRF model is usually restricted to 16 grey levels because otherwise model creation and identification become computationally too expensive. A possible approach is to process each channel as a grey-image separately and then to combine the retrieved information [107]. But integrating different colour channels might require computational intensive iterative optimisation procedure. The bunch sampling assumes that texture features are invariant to the colour distribution in an image, so that it converts a colour texture to a grey level image for analysis, i.e. the geometric structure and placement rules of texels are estimated from only the intensity channel of the image. But, at the synthesis stage, the original colour texture is used as a source of texels for sampling. In so doing, colour texels are retrieved and used as construction units to generate a new colour texture. In this case, the synthesis of a colour texture has no much difference from the synthesis of a grey-level one except an extra step needed for converting the training textures from RGB space into grey levels. Since the approach neglects all information preserved in colour channels (hue and saturation), it might fail on certain textures in which texture features are relevant to the distribution of colours. Nevertheless, for most of colour textures used in our experiments, this simple method produces generally good results.

Time Complexity.

The bunch sampling is a fast synthesis algorithm compared to other major synthesis techniques. At the analysis stage, the running time for computing the grid parameters includes the time for both collecting the GLCHs and performing a spatial analysis of the MBIM. Similar to a un-partitioned convolution algorithm, collecting the GLCHs for all clique families inside $ \mathcal{W}$ over a training image $ {g}^{\circ}$ involves quadratic time complexity, proportional to $ \vert{g}^{\circ}\vert\cdot\vert\mathcal{W}\vert$. Since typically a search window has a size proportional to the training image, e.g., $ \vert\mathcal{W}\vert = \vert{g}^{\circ}\vert/3$, the time complexity is roughly $ O({\vert{g}^{\circ}\vert}^2)$. The running time for the spatial analysis of an MBIM is $ O(\vert\mathcal{W}\vert)$, which is linear to the window size. Therefore, the overall time complexity of the analysis stage is $ O({\vert{g}^{\circ}\vert}^2)$.

At the synthesis stage, the running time for synthesising each pixel is constant, if a hash table is built to store signal values for each relative shift at a pre-processing stage so that the synthesis of a pixel involves only an operation of querying the hash table. So the time complexity for synthesising the entire texture is $ O(\vert{g}^{syn}\vert)$. Building the hash table requires to scan the training image $ {g}^{\circ}$ pixel by pixel in a raster scanline order, which has time complexity of $ O(\vert{g}^{\circ}\vert)$. Usually $ \vert{g}^{\circ}\vert<\vert{g}^{syn}\vert$. Therefore, the overall time complexity at the synthesis stage is still $ O(\vert{g}^{syn}\vert)$, which is linearly proportional to the size of the synthetic image.

Figure 7.2: Synthesis of regular textures by bunch sampling: The sizes of training textures, MBIMs, and synthetic textures are $ 128\times 128$, $ 125\times 125$ and $ 360\times360$, respectively. The training textures are taken from [82,8].
\includegraphics[width=0.6in]{d6.bmp.eps}
 
\includegraphics[width=0.6in]{d6.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d6_g.bmp.eps}
  D6
\includegraphics[width=0.6in]{d14.bmp.eps}
 
\includegraphics[width=0.6in]{d14.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d14_g.bmp.eps}
  D14
\includegraphics[width=0.6in]{d20.bmp.eps}
 
\includegraphics[width=0.6in]{d20.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d20_g.bmp.eps}
  D20
\includegraphics[width=0.6in]{d34.bmp.eps}
 
\includegraphics[width=0.6in]{d34.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d34_g.bmp.eps}
  D34
\includegraphics[width=0.6in]{d52.bmp.eps}
 
\includegraphics[width=0.6in]{d52.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d52_g.bmp.eps}
  D52
\includegraphics[width=0.6in]{d101.bmp.eps}
 
\includegraphics[width=0.6in]{d101.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d101_g.bmp.eps}
  D101
\includegraphics[width=0.6in]{d102.bmp.eps}
 
\includegraphics[width=0.6in]{d102.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d102_g.bmp.eps}
  D102
\includegraphics[width=0.6in]{tile07.bmp.eps}
 
\includegraphics[width=0.6in]{tile07.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{tile07_g.bmp.eps}
  Tile07

Figure 7.3: Synthesis of stochastic textures by bunch sampling: The sizes of training textures, MBIMs, and synthetic textures are $ 128\times 128$, $ 125\times 125$ and $ 360\times360$, respectively. The training textures are taken from [82,8].
\includegraphics[width=0.6in]{d4.bmp.eps}
 
\includegraphics[width=0.6in]{d4.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d4_g.bmp.eps}
  D4
\includegraphics[width=0.6in]{d24.bmp.eps}
 
\includegraphics[width=0.6in]{d24.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{d24_g.bmp.eps}
  D24
\includegraphics[width=0.6in]{bark0009.bmp.eps}
 
\includegraphics[width=0.6in]{bark0009.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{bark0009_g.bmp.eps}
  Bark0009
\includegraphics[width=0.6in]{water02.bmp.eps}
 
\includegraphics[width=0.6in]{water02.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{water02_g.bmp.eps}
  Water0002
\includegraphics[width=0.6in]{flowe04.bmp.eps}
 
\includegraphics[width=0.6in]{flowe04.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{flowe04_g.bmp.eps}
  Flower0004
\includegraphics[width=0.6in]{metal05.bmp.eps}
 
\includegraphics[width=0.6in]{metal05.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{metal05_g.bmp.eps}
  Metal0005
\includegraphics[width=0.6in]{grass01.bmp.eps}
 
\includegraphics[width=0.6in]{grass01.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{grass01_g.bmp.eps}
  Grass01
\includegraphics[width=0.6in]{fabri16.bmp.eps}
 
\includegraphics[width=0.6in]{fabri16.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{fabri16_g.bmp.eps}
  Fabric0016

Figure 7.4: Synthesis of colour textures by bunch sampling: The sizes of training textures, MBIMs, and synthetic textures are $ 128\times 128$, $ 125\times 125$ and $ 360\times360$, respectively. The training textures are taken from  [65].
\includegraphics[width=0.6in]{TN_Ncollege-inn256.bmp.eps}
 
\includegraphics[width=0.6in]{TN_Ncollege-inn256.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{TN_Ncollege-inn256_g.bmp.eps}
  Cans
\includegraphics[width=0.6in]{TN_SWeave1_t.bmp.eps}
 
\includegraphics[width=0.6in]{TN_SWeave1_t.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{TN_SWeave1_t_g.bmp.eps}
  Weave
\includegraphics[width=0.6in]{Sdesign24.bmp.eps}
 
\includegraphics[width=0.6in]{Sdesign24.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{Sdesign24_g.bmp.eps}
  Dots
\includegraphics[width=0.6in]{Stile-floor1_c.bmp.eps}
 
\includegraphics[width=0.6in]{Stile-floor1_c.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{Stile-floor1_c_g.bmp.eps}
  Floor
\includegraphics[width=0.6in]{tn_n64.bmp.eps}
 
\includegraphics[width=0.6in]{tn_n64.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{tn_n64_g.bmp.eps}
  Flowers
\includegraphics[width=0.6in]{TN_Nfloral4.bmp.eps}
 
\includegraphics[width=0.6in]{TN_Nfloral4.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{TN_Nfloral4_g.bmp.eps}
  Flora
\includegraphics[width=0.6in]{TN_NKNIT-FINE.bmp.eps}
 
\includegraphics[width=0.6in]{TN_NKNIT-FINE.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{TN_NKNIT-FINE_g.bmp.eps}
  Knit
\includegraphics[width=0.6in]{TN_Rdesign5.bmp.eps}
 
\includegraphics[width=0.6in]{TN_Rdesign5.m.bmp.eps}
MBIM
\includegraphics[width=1.8in]{TN_Rdesign5_g.bmp.eps}
  Design


next up previous
Next: Experimental Results Up: Texture Synthesis by Bunch Previous: Texture Synthesis by a
dzho002 2006-02-22