This project experiments with face morphing using correspondences and warps, and also explores a few other related image effects.
Rather than doing a simple cross-dissolve between two faces, we attempt to also warp the images during the transition to line up features and create a smoother morphing. For this project, I morph George Clooney into Lena. This involves a few steps:
We define corresponding points in each face by hand (putting points on key features like eyes, mouths, chins, etc.). Since the posture of Lena is different from that of George, this was a bit arbitrary for certain features. I defined 25 points for George and Lena like so:
George | Lena |
Using our picked key points, we can split each image into distinct triangles. As the points between the two images are correlated, we would like the triangulation to be the same for both images. To accomplish this, I took the average of the key points and computed a Delaunay triangulation for this midway shape, which I used for both images:
We would like to warp both faces to the midway shape before cross-dissolving, so for each triangle in our triangle mesh, we compute the affine transformation between the source image and the target key point positions, then transform the texture of the triangle accordingly. With both of our warped images, taking the average between the two yields our "Mid-Way" face:
George Original | Lena Original | "Mid-Way" Face |
Using the same idea as used to create the mid-way face, we can create a continuous sequence of intermediate faces by doing a simple linear interpolation to compute an intermediate face structure (the corresponding key points), warping each face to the intermediate shape, then doing another simple linear interpolation between the resulting warped images. Here's the result of this approach for morphing George into Lena:
George -> Lena |
This morphing looks best in transitioning between the two faces, and less so in transitioning between the background / hat / body. The majority of the key points were placed around the face, and the backgrounds and postures varied significantly between the two images, so this was expected.
Using a dataset of annotated Danish faces, I seek to compute the average face of the population. This is accomplished with a few simple steps:
Danish Face 0 | Warped Result |
Danish Face 42 | Warped Result |
Mean Face |
I also defined correspondences between Lena and the computed mean face, then warped Lena to the shape of the mean face.
Lena | Warped Lena |
Similarly, I also did the reverse, warping the mean face to match the shape of Lena.
Danish Mean Face | Warped Mean Face |
I produce a caricature of Lena by using a lambda > 1 (I used 1.5) when linearly interpolating the face shape, then warping Lena to this shape, which accentuates Lena's unusual features:
Lena | Caricature Lena |
Going back to the Danish face dataset, I compute the average face for Danish females using the same process with a filtered dataset.
Mean Danish Female |
I can thereby change George's appearance to look more feminine by morphing between his face and that of the mean Danish female face, using the same process as described earlier:
George Original | More Feminine (lambda = 0.3) | Even More Feminine (lambda = 0.5) |