# CS194-26 Proj 3: Face Morphing

## Overview:

In this project, I worked with some cool face morphing techniques

## Part 1: The Morph Sequence

### The Midway Face

Before we implement the morph, we wanted to see what the midway face would look like. The process to get the midway face involved:

• 1. Defining a set of corresponding points in both images (using cpselect)
• 2. Averaging the 2 sets of points to get a set of average points
• 3. Getting a delanuay triangulation of the average points
• 4. For each triangle, we have a original shape triangle X and average shape triangle Y. We get the affine transformation matrix T = Y*inv(X)
• 5. We then apply the inverse affine (inv(T)) to all pixels (x,y) in the average shape triangle, getting the corresponding pixels (x', y') that should replace (x,y)

Merging these 2 photos:

We first get the 2 faces in the average shape:

We then cross dissolve these images to get the midpoint of the morph

### The Morph Sequence

Using the same method used to get the midway face, we can compute the morph sequence using various propportions of each image's shape and color

### The Mean Population Face

In this part, we use the Danes face dataset to obtain the average face from the dataset. In particular, we chose to use only male, neutral faces in order to get the best results. We still yielded pretty good results given there was about 33 images in the set. We obtained the following average face:

Using the average shape obtained, we also tried morphing several dane faces to the average shape, to different effects.

We also tried morphing my face into the average geometry, and warping the average face into my geometry. This didn't work so well do to the differences in head sizes. The points labelled in the dane dataset only cover the eyes, nose, mouth and jawline. This does not cover the shape of the head, leading to images with larger heads having distortedly big heads in proportion to their face.

Lastly, we used extrapolation to create a caricature of my face using the average dane face. While my face morphed into the average dane shape was already pretty caricaturic, this was a more extreme version of that.

### Bells and Whistles: Morphing Gender

As an extra part, I tried morphing my face into the average asian female face, using the same morphing method in the first part. Using the following average female face:

I morphed my geometry into the female shape. This got a really strange result. This might be attributed to the head tilt in the original photo of me that did not exist in the average_female image, causing some features (eyes) to be twisted.

After cross dissolving with the avg_female face, this looked a lot better.