CS-194-26 Project 3

Zachary Lieberman

PART 1

Defining Correspondences

I planned a list of 30 correspondences and used ginput to mark both images and collect the point pairs in the same order. I then calculated the Delaunay triangulation of both images and got their individual triangulations. To calculate the mid face triangulation, I took the average of all of the correspondence points. I then calculated the Delaunay triangulation fo this point set, yielding the mid face shape.

Triangulation of the image of myself

Triangulation of the image of George Clooney

Triangulation of the average face

Part 2

Computing the Mid Face

To compute the mid face, I inverse warped the correspondences from part 1 to the mid face triangulation using an affine transformation. I also interpolated the pixel values using the interpolate.RectBivariateSpline function. After warping both faces to the mid face, I took the average pixel value to compute the mid face.

Original image of me

Original image of George

The mid face

PART 3

The Morph Sequence

To make the morphing sequence, I computed alpha * (me) + (1-alpha) * george for 45 frames with the alpha in 45 equally spaced intervals from 0-1. I then calculated the Delaunay triangulation of this intermediate face and used the inverse warp procedure and the affine transformation to get this intermediate face. I then cross dissolved using the same alpha and 1-alpha constants. This would produce an intermediate face and I used the moviepy.editor library to save these images into a gif at 30 fps.

Gif morphing George to me

Part 4

The mean face of a population

I used the Dane dataset for this part. I parsed all of the data files for the correspondences and then averaged them. With this average point set, I computed the Delaunay triangulation. Using this triangulation, I could inverse warp every Dane's correspondences to this mean face. After getting all 40 morphed faces, I averaged the pixel values to get the mean face.

Mean Dane triangulation

Example of a Dane morphed to the mean Dane face

Example of a Dane morphed to the mean Dane face

Example of a Dane morphed to the mean Dane face

The mean Dane face

Side note

I tried to morph my face to the average Dane's gemoetry and vice versa, but could not get the proper alignment and it created incorrect images as the correspondences were all off. As a result, I also couldn't complete the caricature.