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.

Delaunay triangles for key points

Delaunay triangles for average key points. Notice the differences in the cheeks and eye areas.

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.

My mom, me, midface, and finally morph sequence!

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)!

Danish average, me morphed to the Danish average, Danish average morphed to me

On the left are original images from the data set, and on the right is that image morphed to the mean face. Below are individual 8, 27, and 38.


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

0.0 (original img), 0.5, 1.0, 1.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