Final Project 1: Image Quilting

Kush Khanolkar

Part 1: Randomly Sampled Texture

In this section I used brick texture patterns of 30x30 randomly tiled from the sample image to generate a sample texture:

Originals
Italian Trulli Italian Trulli Italian Trulli
Sampled:
Italian Trulli

Part 2: Overlapping Patches

In this section I overlapped the patches such that the difference in the overlap textures was within a certain threshold and then chose randomly among those to create a randomized texture that looks much better :

Italian Trulli Italian Trulli Italian Trulli

Part 3: Seam Finding

In this section I used seam finding to find the optimal place to cut the new tile before pasting it on the image. This was done using a min cost finding algorithm within the overlapping area:

Italian Trulli Italian Trulli Italian Trulli

Bells and Whistles

For bells and whistles I implemented my own dyanmic programming algorithm to minimize the cut without consulting the the provided cut code. This runs efficently so that it can be used for all n^2 tiles. An example of my testing of the cut algorithm is below:
Italian Trulli

Final Project 2: Lightfield Camera

Part 1: Depth Refocusing

In this section by shifting the images by their offset from the original image (based on the image name) we were able to replicate the effect of depth refocusing. After realigning the images in different ways an average was taken. If the images weren't adjusted much the back images became sharp since they didn't move much. If adjusted maximally the front images come in focus. The adjustment parameters was controlled by a variable c that ranged from 0 - 3 that scaled how much the images were moved. The below images are the result of this adjustment. :

Three different locations (0,0) , (8,8) , (16,16) :
Italian Trulli Italian Trulli Italian Trulli
Three different depth focuses far, middle, close :
Italian Trulli Italian Trulli Italian Trulli
Gif of smooth transition between them! :
Italian Trulli

Part 3: Summary

From this project I learned about how parallax can be abused to create cool effects digitally!