CS 194-26: Image Manipulation and Computational Photography, Fall 2017

Project 4: Face Morphing

Chris Correa, CS194-26-aab



Overview

Part 1: Face Morphing

Defining Correspondences

This section involved selecting corresponding points on the images you wish to morph together. These points will later be linearly interpolated so that the geometry of the faces match, and morph from the first geometry to the second as the video plays.

Me Labelled
Roommate Labelled

Computing "Mid-Way" Face

In this section we are trying to find the transformation matrix of each point A, so that we can insert the pixel values from point p on the original image, to point p' in the morphed image. To do this, we define the following equation:

             Ap' = p        (1)
      [a b tx][p'x]   [px]
      [c d ty][p'y] = [py]
      [0 0  1][ 1 ]   [1 ]
    

To find the A matrix, we define triangles of three points, using the Delauney triangulation scheme. To find the transformation of the points inside the triangle defined by points p'1, p'2, p'3 to p1, p2, p3:

      [a b tx][|   |   | ]   [|  |  | ]
      [c d ty][p'1 p'2 p'3] = [p1 p2 p3]
      [0 0  1][|   |   | ]   [|  |  | ]


      [a b tx]   [|  |  | ] ([ |   |  | ]) -1
      [c d ty] = [p1 p2 p3] ([p'1 p'2 p'3])   
      [0 0  1]   [|  |  | ] ([ |   |  | ])   
    

To find all values p' inside the new warped image, all we have to do now is to multiply this A matrix to p', like in equation (1) above.

Chris
Chralil
Salil

The Morph Sequence

To morph two images together, I did the same thing as in the mid-way face, but instead of doing a simple average of the geometry and pixels, I did a weighted average of the geometry and pixels. For each gif, I took 45 steps from the first image to the second one, with 1/30 of a second in between each image. Here are some examples of things I morphed:

Chris
Morph
Salil
Sahil
Morph
ET
Person #17
Morph
Average Danish Face
Person #22
Morph
Average Danish Face

Part 2: "Mean Face" of a Population

This part involved taking the faces of each person in the dataset, and computing the average geometry. I then transformed each face to have the same geometry, and averaged all the images together. The Results of the average is below, along with the average of just the males, and the average of just the females. As you can see, the overal average is similar to the male average. I suspect this is because the dataset included many more males than females.

Average Male Face
Average Danish Face
Average Female Face

Here is my roommates face transformed into the Average Danish shape, and the Average Danish face transformed into his geometry:

Salil
Salil Transformed
Average Dane Transformed
Average Dane

I morphed some of the faces of the Danish people in the dataset in the previous section

Caricatures: Extrapolating from the mean

Here is the caricature of Salil. To do this, I subtracted the Salil's points from the mean's points. I added these back into Salil's points with some scaling factor, to make his features more apparent. For example, you can see his nose and chin were larger than the average male face, so these become more prominent.

Salil
Salil More Masculine
Average Male

Part 3: Bells and Whistles

Change Gender / Ethnicity

In the next images, I took an image of my roommate, and made him look more like a danish woman

Salil
Salil's facial shape changed
Salil shape and appearance changed
Average Danish Woman

Face Morphing Music Video