Final Project 1 – Image Quilting

Part 1: Randomly Sampled Texture

First, I fill the output image with randomly sampled patches from the texture image. Here is the result.

original texture 1

original texture 1

original texture 2

original texture 2

Randomly Sampled Texture 1

Randomly Sampled Texture 1

Randomly Sampled Texture 2

Randomly Sampled Texture 2

The parameters: patch_size = 25, out_size = 200

Part 2: Overlapping Patches

Then, to improve the quality of result, I search for the best patch with low overlapping errors with a tolerance of 5. The result is shown below:

Overlapping Patches

Overlapping Patches

Overlapping Patches

Overlapping Patches

The parameters: patch_size = 25, overlap = 7, tolerance = 5

Part 3: Seam Finding

Then, I implemented a more complicated image quilting, which is cutting patches to better fit them. The result is shown below:

Seam Finding Result 1

Seam Finding Result 1

Seam Finding Result 2

Seam Finding Result 2

before Cut (template Patches)

before Cut (template Patches)

after Cut (template Patches)

after Cut (template Patches)

before Cut Patch

before Cut Patch

after cut Patch

after cut Patch

SSD Errors

SSD Errors (top overlaps)

Horizontal Mask

Horizontal Mask

Vertical Mask

Vertical Mask

Combination Mask

Combination Mask

Additional Quilting Result 1

Additional Quilting Result 1

Additional Quilting Result 2

Additional Quilting Result 2

Part 4: Texture Transfer

Texture transfer is a computer graphics technique that combines the texture of one image (source) with the structure or layout of another (target). The goal is to synthesize a new image that maintains the visual characteristics of the source texture while conforming to the design or features of the target. This is achieved by balancing two constraints: preserving texture authenticity and respecting the target's structural details.

The process involves dividing the source texture into small, overlapping patches and arranging them to construct the output image. Patch-based synthesis ensures texture consistency and minimizes artifacts. Overlapping regions between patches are blended using techniques like minimal error boundary cuts, resulting in smooth transitions and a seamless appearance.

To guide patch selection, an error metric evaluates both texture and guidance alignment. The texture matching error ensures patches resemble the source texture, while the guidance matching error aligns patches with the target structure. A weighting factor (alpha) adjusts the influence of each constraint.

Applications of texture transfer include artistic rendering, style transfer, and gaming. It enables realistic textures to be applied to sketches, stylized designs, or virtual environments. By blending textures and structures, texture transfer is a versatile tool for creating visually striking and contextually relevant images.

The result is shown below:

Texture Transfer Result 1

Texture Transfer Result 1

Texture Transfer Result 2

Texture Transfer Result 2