Computing the midway face took three steps:
-
Compute the average shape by averaging the correspondence points.
-
Warp both faces into the average shape.
-
Cross fade the two images together.
The trickiest part was the second part. To warp an image into the average shape, I followed what was suggested in lecture to determine an
inverse warp average shape to the original image. I needed to find a different affine transformation for each individual triangle of the Delaunay
triangulation. I used least squares to find the best estimate for the 6 unknown variables in the 3x3 transformation matrix that would map the original image triangle
into the average shape image corresponding triangle. Then, I applied the inverse of this transformation to each pixel in the corresponding triangle in the
morphed image.
25% Morph Factor
50% Morph Factor
75% Morph Factor