The main algorithm I will use refers to this paper
<
Fast texture synthesis using tree-structured vector quantization
Li-Yi Wei, Marc Levoy (SIGGRAPH '00)>
The reasons why I'd like to use this algorithm are as following:
1. This algorithm is a general one which can deal with most of the input texture patches.
2. It obtains nice results.
3. It's simple to implement. (LOL)
4. The speed of this algorithm is really slow and has potential to improve.
The algorithm can be illustrated using the following figure.
(a) is the input texture and (b)-(d) show different synthesis stages of the output image. Pixels in the output image are assigned in a raster scan ordering. The value of each output pixel p is determined by comparing its spatial neighborhood with all neighborhoods in the input texture. The input pixel with the most similar neighborhood will be assigned to the corresponding output pixel. Neighborhoods crossing the output image boundaries (shown in (b) and (d)) are handled toroidally. Although the output image starts as a random noise, only the last few rows and columns of the noise are actually used. For clarity, we present the unused noise pixels as black. (b) synthesizing the first pixel, (c) synthesizing the middle pixel, (d) synthesizing the last pixel.
Here's the pseudo code of the algorithm.
No comments:
Post a Comment