Project 3: Face Morphing

Overview

This project dealt with morphing images, particularly when they are not completely aligned. A morph is a simultaneous warp of the image shape and a cross-dissolve of the image colors. To demonstrate my face morphing algorithm, I decided to morph my face with a popular Bollywood actress who I share a similar name with.

Deepshika Dhanasekar
Deepika Padukone

Defining Correspondence Points

The first step in this process is to define correspondence points that serve to anchor the pictures together. Because there is not a clear transformation, we must manually define areas to apply an affine transformation to. We do this by identifying the same correspondence points on both images, then applying the same triangulation to both.

Deepshika Dhanasekar
Deepika Padukone

Computing the Midway Face

Computing the midway face took three steps:

  • Compute the average shape by averaging the correspondence points.
  • Warp both faces into the average shape.
  • Cross fade the two images together.

The trickiest part was the second part. To warp an image into the average shape, I followed what was suggested in lecture to determine an inverse warp average shape to the original image. I needed to find a different affine transformation for each individual triangle of the Delaunay triangulation. I used least squares to find the best estimate for the 6 unknown variables in the 3x3 transformation matrix that would map the original image triangle into the average shape image corresponding triangle. Then, I applied the inverse of this transformation to each pixel in the corresponding triangle in the morphed image.


25% Morph Factor
50% Morph Factor
75% Morph Factor

The Morph Sequence

I applied the same technique as above to using different morph factors to create a morph sequence as seen here

The Mean Face of a Population

I used the above technique to calculate the mean face of the Brazilian face database. Unfortunatately, the images that had the corresponding points annotated already were only in grayscale, so the following photos are not colorized.

Average Face Shape of Population
Average Face of Population

Individual #24 (Original)
Individual #24 (Warped)
Individual #35 (Original)
Individual #35 (Warped)

Individual #90 (Original)
Individual #90 (Warped)
Individual #195 (Original)
Individual #195 (Warped)

Me (Original)
My Face Warped to Average Brazil Face Geometry

Brazil Average Face
Average Brazil Face Warped to My Geometry

Caricatures: Extrapolating from the Mean

We can use the computing average brazilian face to produce a caricature of my face. I did this by using the same morphing technique as above but this time, I chose warp factor values outside of the original [0, 1] range. If the warp factor is negative, then we are "subtracting" brazilian features from my face. If the warp factor is positive, then we are "adding" more brazilian features to my face.

-0.5 Warp Factor
-0.25 Warp Factor
Me (Original)
1.5 Warp Factor
1.75 Warp Factor

Bells and Whistles

I participated in this face morphing video of students in this class.


I also attempted to change my gender and ethnicity in the following morphs:


Me
Me (as an Indian Male)
Average Indian Male

Me
Me (as an Chinese Female)
Average Chinese Female