Face Morphing

George Geng

In this assignement, I create morphs. A morph is a simultaneous warp of the image shape and a cross-dissolve of the image colors. The warp is controlled by defining a correspondence (a set of analgous points) between the two pictures. The correspondence should map eyes to eyes, mouth to mouth, chin to chin, ears to ears, etc., to get the smoothest transformations possible.

Morphing 2 Faces

Morphing can be accomplished through triangle transformations, so the first step is to create a set of triangles on each image. This was done by selecting corresponding points by hand on each image to create the correspondance, as shown below:

 
Once we have a set of points, we can create triangles with Delaunay triangulation. A delaunay triangulation for a given set P of discrete points in a plane is a triangulation such that no point in is inside the circumcircle of any triangle. Delaunay triangulations maximize the minimum angle of all the angles of the triangles in the triangulation, so we can avoid overly acute (or sliver-like) triangles. To find the position of the points in the average face, we simply average the points before finding the Delaunay triangulation.
Now, we have to transform triangles from our images into the corresponding triangles in the average image. To transform triangles, we can find the affine transformation between triangles, given by this formula:

 
If our current set of points is given by {(a1,a2), (b1, b2), (c1, c2)} and we seek the matrix T that transforms them into {(x1,x2), (y1, y2), (z1, z2)} we can simply construct the corresponding homogenous matricies from our points and solve for T = X * Inv(A).
Once we are able to transform triangles from both images to the warped positions, we can also blend the pixels by 50% to achieve an average image. Here we have an image of me averaged with actor Eddie Redmayne. Note that this is not an average image of two objects, but an image of the average of two objects, with 50% warp and 50% dissolve for both of us.
Average Face

 
If we alter at warp and dissolve fractions (from 1 to 45), we can create smooth and interesting transformation effects!
Transformation

Averaging Faces

Using a large dataset of Danish faces, we could also explore what the average face would look like. Here are the average faces of 33 males (the same was done for females), who are in color and facing the camera with a serious or neutral expression.
Average Danish Male and Female

 
The idea is identical to morphing 2 images, but now the final correspondance coordinates are determined by the average of 33 point sets, and each image only carries 1/33 of the weight for the fade as well. As expected, the images look blurry and smoothed out due to the large number of data points. Some aliasing is particularly noticeable around the edges of the image because not all images are as nicely aligned. There is a large variation in age and type of face too, causing the average to not be as clear. The results for female faces are similar.
Several Males Morphed into Average Shape

 
This is what some of the faces looked like when they were morphed into the average face shape (before blending). Note how the eyes, nose, and lips are all distorted but roughly aligned into the same position. Less blurry results could be achieved through better aligning the images, or picking images that are roughly from the same demographic (age, for instance).

Caricature

Myself caricatured

 
From above, we notice we can create some interesting caricatures by simply morphing the shape of our faces according to a set of correspondance points, but without any crossfading. Here is a caricature I performed on my own face!