About Me

Sunday, May 31, 2009

Texture Synthesis by Non-parametric Sampling

The algorithm is based on the paper: "Texture Synthesis by Non-parametric Sampling" by A. Efros

Texture Synthesis is the process of generating an arbitrarily big texture consistent with the pattern of a smaller sample given as input. Assumed a Random Markov Field model, the probability of a pixel belonging to the new texture to have a certain value depends on its spatial neighborhood. That is, the color of a pixel X with an l-shaped neighborhood nX, will be the color of the pixel Y that has the most similar neighborhood nY to nX.

Wednesday, May 20, 2009

Image Quilting

This project is based on the paper: "Image Quilting for Texture Synthesis and Transfer" by Alexei A. Efros.
Prior to this paper Texture Synthesis, that is the process of generating an arbitrarily big texture consistent with the pattern of a smaller sample given as input, was performed sampling and transferring one pixel at the time. The process, besides being deterministic, was also really slow.

In this paper Texture Synthesis is performed sampling and transferring entire tiles (or patches), that once stiched together generate the new image. Basically the new image is a collage made of sub-tiles taken from a smaller existing image.

To avoid noticeable artifacts samples are selected based on the similarity of their border with the border of their neighbors. This region (the border of the sub-tiles) will eventually overlap and will be cut, to further reduce the non-similarities between adjacent patches.


Catmull-Clark Subdivision Surface

The algorithm that generates smooth surfaces is performed in two steps: Subdivision and Averaging.

During the Subdivision step a new vertex is added at the midpoint of each edge and at the centroid of each face. Given a face with n vertices {v1, v2, v3, v4} the centroid is given as (v1 + v2 + ... + vn) / n. Subsequently the vertices are connected to form m quads out of each m-sided polygon.

In the Averaging step the position of each vertex is set to be the sum of the centroids of the faces incident to it divided by the vertex valence, that is the number of edges connected to it.