In this project, we learned to generate morphing between images of faces to get a smooth transition sequence, and compute the "average face" of a population by morphing every faces into their overall average shape. At the end, I also created a morphing music video using the face morphing algorithm I've implemented.
To start off, I chose two pairs of front facing images and manually selected 30 key points in each image. For each pair, compute its average points and apply the dalaunay function on the average points to generate the triangulation of these points that will be used for morphing.
Jay Chou |
Eason Chan |
Eric Clapton |
John Mayer |
After we obtained all the corresponding points as well as their averages and triangulation, we could compute the average shape (by computing an affine matrix of each triangle) to warp both faces into that shape. After that, blend the two warped images by averaging the their colors. Here are the results:
Jay Chou + Eason Chan |
Eric Clapton + John Mayer |
The morph sequence is basically a set of interpolated images between the two source images with alpha = range [0, 1]. For the below results, I combined two sequences (image1 to image2, image2 to image1) to form a loop for each pair.
Jay Chou + Eason Chan |
Eric Clapton + John Mayer |
Face morphing also allows us to compute the average face of a population. I manually picked 50 female faces from the FEI's Brazilian face database to work with. I found the average face shape and morphed each of the faces in the dataset into the average shape. Here are some images in my dataset and the bottom row shows the results after they are warped into the average shape.
Then, blend all the warped faces to get the average face of the population:
Morphing some Asian male faces into the average face of Brazilian females and vice-versa:
original |
avg warped into original |
original warped into avg |
average face |
I also produced a few caricatures by extrapolating from the population mean from the last part (alpha < 0) as well as the original face (alpha > 1). Here are the results from four different alpha values:
alpha = -1 |
alpha = -.5 |
alpha = 1.5 |
alpha = 2 |