# Project 4: Face Morphing

## Melissa Su, cs194-26-aay

### Defining Correspondences

First we select the key points in the image, which are framing the face as well as features in the face. We then add the four corners as points. We compute the Delaunay triangles with these points for each image. We then take the average of the points from image A and image B and compute the Delaunay triangles from the averaged points.

### Computing the Midface and Morphing Sequence

After defining correspondences, we compute the affine tranformation between the source triangles and average triangles. We use the matrix to get the coordinate in the original photo and then get the original pixel value.

### Mean Face of a Population

I used the technique above to get the mean face of Danes. Running my code on a large data set tested my code vectorization skills. Also, reading and parsing input files for the data on the keypoints in each image brought out long forgotten skills (thank you stackoverflow)!

### Caricatures

I used the Mean Danish Face from above, and morphed my face to it with various weights (previously we used 0.5).

### Bells and Whistles

I morphed my family together! My mom and dad came up for parents weekend so we were able to take passport style photos together, and my brother sent in a photo. Result