# CS194-26: Image Manipulation and Computational Photography

## Programming Project #3: Fun with Frequencies and Gradients

### Objective

Smoothly converting one image into another can be a great source of memes

### Midway face

The first step to conversion is finding a midway point, where both features and colors of the image are halfway between the source and target. To do this, you must define the features and find the midway point for each feature individually. Then find a single triangulation at the midway point, and find the affine transformation to bring each triangle to the corresponding triangle in the source and target images. Finally, using that transformation, sample pixels from the source and target and average them.

 Source image Midway image Target image

### Morph Sequence

If you can do the midway face, you can also do a bunch of not-quite-midway faces, string them together, and you have a morph!

 Tortoise ... Senator Me ... Not me

It's a bird! It's a plane! It's a failure case, the triangulation points didn't fully enclose the image, leaving some artifacts along the edges.

### Average Face

Why look at many unique faces when you can have one normal face instead? Turns out the average face looks pretty good. Instead of computing the midway between two images, compute the midway between several.

 Average Danish Computer Scientist Average Danish man Average Danish woman
 Me to average Average to me

### Caricature

Is your face looking too normal? We have a solution for you! Take your ugliest, most erratic features and make them even more noticable! Or less, if you're boring.

 Me Silly me Less silly me

### Mood Change

Some people are just bad at smiling. Luckily we can fix that - for most people, the biggest difference between smiling and not is the curve of the lips. Forcing the lips to curve is the same as smiling, right?

 I'm smiling Smiling Stop smiling Just shape Coloring Both