CS194-26: Image Manipulation and Computational Photography, Fall 2018

Project 4: Face Morphing!

Lavanya Mittal cs194-26-afc


Defining Correspondences

I first pick corresponding points on two images. Here I have a picture of myself and a picture of my friend, Joe. I chose to pick 34 points that labeled around the eyes, nose, mouth, face, hairline, neck, among a myriad of other features. The purpose of these points are to label where certain points in one image need to be at the end of the morph to be at the other image. Below the 2 images, I show a triangulation of the average corresponding points. The triangulation was found using the Delaunary algorithm.


Me!
Joe!
Triangulation

Computing the Mid-way Face

After deciding on corresponding points, I compute the midway face which is a morph of the 2 images at halfway. I do this averaging the corresponding points together to find where the corresponding points should be at the halfway mark. I then find a suitable triangulation for these points using the Delaunay algorithm. Since we want the triangulation to be consistent across the morph, this should be the triangulation of both my image and Joe's image as well. I then find the affine transformation for each triangle from the halfway triangulation to each my and Joe's individual triangulations. Lastly, for each triangle in the halfway triangulation, I average the corresponding pixel from my and Joe's images to get the following result:


MORPHING TIME!

Now I create 46 frames just like how I did the midway frame above except now rather than simply averaging the corresponding points together, I do a weighted average. This weighted average is controlled by a variable that changes between frame to frame so that we can control how much of the first image gets morphed into the second image. In addition, there is another variable - how much to cross dissolve the two pixel values together! First I did a black and white sample of my friend Lisa and I.


Lisa then asked for me to do one of her and her boyfriend, Grant! Here is the result in color.


I didn't realize before that there was a very standard way of picking corresponding points. I, for example, left out picking eyebrows. The morphs may be able to have turned out better if I had more methodically chosen corresponding points (for example, following an example online from one of the datasets). In addition, I've found that hair just "fades in" rather than warps in. I realize I should have selected corresponding points on the edge of hair to points on the side of the face to make it appear that hair is being warped in.

Mean face of a population!

From the FEI database, I downloaded 30 standardized images of females in order to try to generate the average female face. These images were pre-annotated and thus I first found the average of all the points. I then warped each female's face to the average triangulation. Here are some examples!


Original
Warped to average
Original
Warped to average
Original
Warped to average

After averaging all the warped faces together, I find the average female face!


Alright, now let's see what happens when I morph my face into the average geometry and vice versa!


Me
Average woman
My face warped to the average face geometry.
The average face warped to my geometry.

We can notice already that warping my face to the average geometry tries to make my features smaller, such as my eyes, my nose, and my mouth. Warping the average face to my geometry makes these features larger. Let's see what happens when I take the difference of my geometry and the average geometry and add it to my geometry. This should accent the features and create a caricature!


Yikes! My eyes, nose, and mouth are HUGE. Let's try to calm this down by weighting the difference I add by 0.5. On the other hand, let's also see what happens when I weight the difference by 2. In addition, let's see what my face would look like if it were slightly "more normal" by weighting the difference by -0.5.


Weight of 0.5.
Wowza! Okay lol. Weight of 2.
Eh, I just look fat. Weight of -0.5.

Bells & Whistles

I participated in a morphing music video for the class! Here, I morph another student's face with mine. He morphed another student's face with his and another student morphed my face with hers and in the end with many people taking part, we created a long chain of student morphs! Here is the morph I created as well as the video with all the morphs:


In case it does not work, here is a link to the video: https://www.youtube.com/watch?v=h-Oow96qhck&feature=youtu.be