Started with manually creating correspondences using a small ginput tool I wrote. The corresponding points will be used to create a triangular mesh, which will be used in the morphing process. I created the triangular mesh using Delaunay triangulation.
Roshan Keypoints & Triangulation
George Keypoints & Triangulation
To compute the mid-way face, we follow three steps:
1. Compute the average shape by taking the average of each correspondence point
2. Warp the original faces to the average shape
3. Cross-dissolve the two images to average the colors
To warp a face into another shape, I iterated through each
corresponding triangle on both images and computed its affine matrix, which transforms
the points in the source image to the points in the target image.
Since we are inverse warping, I calculated the original position of the pixels by multiplying the points
in each triangle by the inverse of the affine matrix and interpolated the color using nearest neighbor interpolation.
Me (Unwarped)
Roshan & George Midway Face
George (Unwarped)
Me (Unwarped)
Me (Warped to average shape)
George (Unwarped)
George (Warped to average shape)
The second part of warping is to cross-dissolve the two photos so they blend in together.
There are many metrics that can be used to select how much to cross-dissolve the images by, but I stuck with
a simple linear interpolation. In other words, I averaged the two pictures.
Me (Unwarped)
Roshan & George Mid-way Face
George (Unwarped)
Me (Unwarped)
Me (Warped to average shape)
George (Unwarped)
George (Warped to average shape)
By repeating the process in part 2 for values in the range from [0,1], we can create a morph sequence.
The parameters on how much to morph and cross-dissolve depend where we are in the sequence.
The following is a 46 frame morph sequence at 30fps.
Here is a morph sequence without adding the corners, so all we see is the face morphing
By looking at a large population we can extract the average and see what is common amongst the whole population.
Here I am using the annotated faces from the FEI Face Database.
I am running the same morphing process as outlined above.
Average face after morphing
Neutral Expression Population
Average face shape
5a normal
23a normal
24a normal
5a morphed to average
23a morphed to average
24a morphed to average
My face to average geometry
Average to my geometry
The reason I look bulbous and skewed is probably due to external factors such as distance from the camera. For instance, the average face is almost entirely in the frame; in contrast, my original picture has a lot more background. So, my face will get stretched to fit the frame, and the average face will get squeezed to get more background.
By using the mean face calculated in the previous part, I created caricatures of my face.
The target correspondences were extrapolated with the equation:
(1 - α)(my_face) + α (average_face)
When α < 0, it emphasizes my features. When α > 0, it emphasizes the average face's features
α = -0.8
α = 1.8
With face morphing, we can change the shape and appeareance of a person. Here I changed a picture of myself to look like the average Samoan female.
Me
Average Samoan Female
Shape Change Only
(warp_frac = 0.5)
Appearance Change Only
(dissolve_frac = 0.5)
Shape & Appearance Change
(warp_frac & dissolve_frac = 0.5)