The first part of this project consisted of implementing Texture Synthesis. Texture Synthesis is useful when the goal is to create a natural looking texture block from a smaller texture sample. The challenges of this are either harsh boundaries from simply pasting the sample image together, or blurriness in resizing the original sample texture. The paper suggested 3 different approaches to texture synthesis, each one performing significantly better than its predecessor:
- Randomly Sampled Texture: this approach creates a blank image in the requested output size and fills it by randomly sampling patches from the sample texture image. While simple to implement, this approach does not have favorable results because the boundaries are very harsh and do not look natural at all.
- Overlapping Patches: this approach attempts to pick neighboring patches that are similar on the edges to reduce the appearance of harsh boundaries. For each patch that needed to be filled, I sampled 10% of the pixels in the sample texture image. Then, I calculated the sum of squared distance (SSD) between an overlapping region with the patch on top, and the patch on the left. Then, I filled the output image with the patch that yielded the smallest SSD - in other words, the patch that had the most similar border to its neighboring patches.
- Overlapping Patches with Seam Finding: this approach takes the basis of the overlapping patches approach. However, instead of completely replacing the overlapping region with the new patch, the algorithm finds the minimum cut path between the two patches in the overlapping region. This makes the border between the two patches seem much more organic because it is no longer a straight line.
Comparisons of Texture Synthesis Techniques