1. Defining Correspondence
I choose portraits of Kanye West and Taylor Swift as example images for morphing.
I used the tool provided in the class to find the corresponding feature points. I selected about 50 featurepoints on each face. After that, I computed the average feature points, and found Delaunay triangulation on the average feature points.
2. Computing the Mid-Face
Let mid_triangles be the triangles in the mid face, im1_triangles be the triangles in the image1, and im2_triangles be the triangles in the image2. (All these images use the same triangulation). Then, for each triangle i, compute the affine transformation T_1i from image1 to the mid face, as well the affine transformation T_2i from image2 to the midface. Then T_1i^{-1} is the inverse matrix of T_1i, and T_1i^{-1} is the inverse matrix of T_2i. Then, get all the points within the triangle i. Apply the inverse warping with T_1i^{-1} to these points and after looping through all triangles we get image1 warped to the midface; Similarly, apply the inverse warping with T_2i^{-1} we get image2 warped to the midface. Note: I also used bilinear interpolation when the points in image1 or image2 are not integer coordinates.
To get the cross-dissolved image of the mid face, I used the alpha = 0.5.
3.The Morphing Sequence
I used 15 frames for the animated gif of the morphing sequence
4.The Mean Face of a Population
I used FEI datasets which contains 100 frontal faces of men and 100 frontal faces of women. Below are some examples of the faces warped to the average face shape
Below is my original face and the population average face
Below is my original face warped to the average face, and the average face warped to my original face
5.Caricature
For my face feature points A and the feature points of the average face B, I compute the caricature face P = A + 1.5*(B - A) and the result is the following
Bells and Whistles
In this part I choose to change my face's age. I found a baby face online, and I morphed my face into a much younger version of myself. Both the warping factor and the cross-dissolve factor are set to 0.6