Project 3: Face Morphing

Part 1: Defining Correspondances

For this part, I used the provided tool from last year to define correspondence points in both images. Then I used Delaunay to create appropriate triangulations.

Original cameraman image
Correspondences for my image
Cameraman D_x
Correspondences for the George Clooney Image
Original cameraman image
My delaunay triangulation overlayed on the orignial image
Cameraman D_x
George's triangulation over his image

Part 2: Computing the "Mid-Way" face

This was in my option the most challenging section of the project. As described in the problem statement, we must first warp both faces to the average shape and then averaging the colors together. However, looking forward to section 3, this is just a particular example of the morph function, with both coefficients = 0.5.

To do this, we iterate through each of the triangles in our Delaunay triangulation. In each iteration, we must calculate the values of the pixels of the destination from the source triangle. By solving a linear system, we find the affine matrix that describes the transformation from one triangle to the other. Then, we map the pixel values using bilinear interpolation.

Original cameraman image
My Original image
Cameraman D_x
George Clooney's original image
Original cameraman image
The midway face

Part 3: The Morph Sequence

The next part is based around the objective of creating a smooth transition from one image to another. To do this, we use a very similar approach to that of part 2. Now however, we use the parameters warp_frac and dissolve_frac to accomplish images which are closer to one image than the other. By making both parameters increase slowly, we achieve the desired smooth transitiion.

Cameraman D_x
Morph Gif

Part 4: The Mean Face of a population

In the following section, we explore how to create the average face of a population, and then morph using that face. For this part I used the FEI face database provided in the project assignment. To do this, we first established the average correspondence points of the dataset and Delaunay triangulation. Then we reuse code from part 2 to morph each face into the average shape. Finally, we average the morphed images to obtained the desired average face. Note that for better results I added correspondence points in the corners for all images.

Cameraman D_x
Population mean face
Then, I warped images of people in the dataset to the average face to obtain the following results:
Original cameraman image
Original first image in the dataset
Cameraman D_x
First image morphed to the mean face
Original cameraman image
Original second image in the dataset
Cameraman D_x
Second image morphed to the mean face
Original cameraman image
Original third image in the dataset
Cameraman D_x
Third image morphed to the mean face

In order to warp my face to the average population's, I redefined the correspondence points so that they matched those of the original images. That is, the same number of points in corresponding locations. Using this method, I obtained the following results:

Original cameraman image
My face warped to the average populations'
Cameraman D_x
The average face warped to mine

The reason why the face is deformed is because of inaccuracy in correspondence selection, and image cropping choice.

Part 5: Caricatures: Extrapolating from the mean

In this section, I create caricatures of my face by extrapolating from the population mean that I calculated in the last step. By using an extrapolation factor to alter the destination correspondaces I achieve different levels of caricaturization. In one direction:

Original cameraman image
Extrapolation_factor = 0.75
Cameraman D_x
Extrapolation_factor = 0.5
Cameraman D_x
Extrapolation_factor = 0 (same as from part 4)

In the other:

Original cameraman image
Extrapolation_factor = 1.25
Cameraman D_x
Extrapolation_factor = 1.5
Cameraman D_x
Extrapolation_factor = 2

Note that if we were to set the factor to 1, we would get the original image back.

Bells and whistles: Becoming a Bollywood Actress

For my mandatory bells and whistles, I decided to morph my face into that of the average Bollywood actress. The target is of different sex and race so we expect funny results. Here are the original images:

Original cameraman image
Average Bollywood Actress
Cameraman D_x
Me!

I attempted to first compute the midway shape, and then only change color and shape:

Original cameraman image
Midway Face
Cameraman D_x
Just Color
Cameraman D_x
Just Shape

Despite the rather distrubing shape image, we can see that my lips became smaller, my eyes turned inwards and my jaw became more round. Similarly, the color-only change keeps my features, but turns them into a strange female version. Spooky!