CS 180 Programming Project 3
Defining Correspondences
The first part is to label key points on the face, including the contours around the jaws and eyes. In addition, we would need to add the four corners of our image, which allow us to warp the entire image instead of only the areas of the face. As suggested in the specification, we utilize Delaunay for triangularization to create the mesh of points.
To get better results, we retrieve the average points of the source and the target image and use this information for triangularization. This provides better stability and better visual results.  Target Image (red dots are key points and blue lines is for triangularization):

Source Image (myself):

Computing the Mid-Way Face
To compute the mid-way face, we first calculate the geometric midpoints from the source and target faces. Then, we utilize the affine transformation to transfer each mesh. To calculate the affine transformation, we set up the equations for coordinate transformation and solved them through linear algebra.
The essential idea is to try to fill in the value of the new morphed image and sample the color from both the source and target image. We also use scipy. image.map_coordinates to accelerate the sampling process. Based on our experiments, it could be 10-20x faster than traversing the pixels.
Mid-way face:

Source:

Target:

The Morph Sequence
To calculate the morph sequence, we simply create a for-loop to morph the image pair. We increase the warp and color dissolve parameters simultaneously, and the result is very solid.