# A1-DustinShean

## Video Textures

Video textures solve the problem of taking a video clip and making it run forever. However due to limits of memory each of the following clips are extended in time, but is restricted to a time range.

Algorithm:

1) Setup: Acquire a video and export into image files.

2) Similar Information: Calculate the l2 distance between each image file. This is done in order to determine the similarities of the files so that a transition will look as smooth as possible.

3) Dynamic Solution: Look at the frame before and the frame after the current frame in order to preserve a flow of images and the dynamics of the action. Images are weighted with the binomial coefficients of a 4-tap filter in order to still put emphasis on the current frame. The beginning and last frame were replaced with a zero weight for the respective before and after frames in order to deter from picking one of the end frames, since end frames tend to be harder to match with other frames.

4) Anticipated Cost: I try to determine the future cost of moving to a new frame in order to avoid dead ends. This is the Q-Learning part of the algorithm.

5) Prune: Look at the anticipated cost of each image and frames that are do not pass the threshold are set to zero to avoid picking a bad transition.

6) Random Loop: For all videos I did 1,000 iterations and used the random play for sequencing the video texture.

• Some of the videos I had to reformat or cut some of the iterations in order to fit under the 100MB limit for uploading a file on wikipedia. I used iMovie and Quiktime to accomplish these tasks.

## Candle Flickering

I decided to do the candle since it was an example showed in class. The flickering in the original video makes it seem as if someone is blowing on the candle. This video especially would have benefited from more frames to make for a better transition.

Original: The original was a three second clip that can be found at the link below:

Each frame had a probability to be chosen:

All frames below a threshold were set to zero:

## WaterFall

I decided to do the waterfall since I could directly compare my video texture with the video texture in SIGGRAPH.

The original was a three second clip taken directly from the article.

Each frame had a probability it could be chosen:

All frames below a threshold were set to zero:

## Vegeta Powering Up

I decided to do this video texture because I believe video textures seem helpful to a traditional cartoonish. I think that this example is the best because the sequence of images in the actual show is somewhat random and is therefore not hindered by the video's dynamics.

The original a few second clip from the following video (my sequence starts at 1:04):

Each frame had a probability to be chosen:

## Possible Improvements

I think the video textures would be of a higher quality if the original sequences that I looked at were longer than a few seconds. By having more data the transition would have a better chance of being smoother.

However due to high initial processing times, all the options were purposely chosen to be only a few seconds.