The objective of this project is to implement a face warping / morphing algorithm that will enable a smooth transition from one face to another. The first step in achieving this is defining "correspondances" for each image (key feature points). Below, we have two of our beloved EECS professors at Berkeley as an example:
Professor Anant Sahai
Professor Gireeja Ranade
To actually morph the two images, we find a Delaunay triangulation of the mean correspondances / feature points for the two images. We can see Professor Sahai and Professor Ranade's images with this mean triangulation below. To complete a midway morph, we warp each image to the halfway shape / triangulation and then average the pixel color values from each image to get a 1/2 Professor Sahai and 1/2 Professor Ranade.
To compute a full morph, we simply replicate the process above but with different interpolating values for image shape and image color. A gif transformation of the entire morph can be seen here.
Using this same technique, we can find interesting population averages. Here we look at the results for population average of Danish male faces from the IMM face database. We have three examples of each face warped to the mean shape of danish male faces in this dataset, and then an image of the average danish male face overall.
Before we used a parameter alpha for interpolation of images (e.g. (1-a)*im1 + a*im2). If we increase this parameter to be above 1, we extrapolate from the mean to emphasize specific features, and thus create cariactures. An example of this is seen below:
As an extra fun tidbit, I also tried transforming myself into a peruvian version of myself.
Warping just shape
Warping just appearance
Warping both shape and appearance