CS194-26 Project 4 - Face Morphing

Parsa Fereydouni - cs194-26-agy

Overview

In this assignment we will produce a "morph" animation of one face into someone else's face, compute the mean of a population of faces and extrapolate from a population mean to create a caricature.
Morphing is done by: (1) Aligning, and (2) Cross-disolve.

(1) Aligning: To align we apply an affine transformation on the source traingle to adjust it's shape to the target traignle. Our affine transformation can be described as 3 basic transformation which stretch, rotate and translate. Our resulting transfomation, represented as a (change of basis) matrix is the following:

$$T_{affine} = \left[ {\begin{array}{cc} a & b & c\\ d & e & f\\ 0 & 0 & 1\\ \end{array} } \right] $$

(2) Cross-disolving: Here we simply add the image's color such that it sums to 1

Additionally, in order to create a smooth morphing transition, we will generate a sequence with progressing adjustment value by shifting the triangulation points to one side rather than the other. The adjustment value is effectively the importance of each image with respect to our transfomation.

Defining Correspondences

We define key points corresponding between both images for triangulation purposes

In [143]:
 
In [238]: