The first part of this project involves defining correspondences, or pairs of corresponding points that relate two images. These points must be consistent labels between eyes, noses and other notable features and are selected with this tool. Then, Delaunay triangulation is performed on the mid-way shape. The respective triangulation of the two selected faces (me and Victoria DeAngelis) is shown below.
To compute the mid-way face between me and Vic, (1) the average shape is computed, (2) both faces are warped into that shape and (3) the colors are averaged. Inverse warping is implemented with an affine warp for each triangle in the triangulation above. The colors of the mid-way image are then interpolated and averaged.
Next, the function morph(im1, im2, im1_pts, im2_pts, tri, warp_frac, dissolve_frac)
is created
to perform a warp between im1
(me) and im2
(Vic). The video sequence of a morph
from my face to Vic's face is shown in the following gif, which has 45 1/30-second frames.
The FEI Face Database has a collection of frontal images of 200 individuals with a smiling facial expression. First, the average face shape of this population is computed. Then, faces in the dataset are morphed into the average shape. Some examples:
Next, the average face of the population (the average of all warped faces) is computed:
On the left, my face is warped into the average geometry. On the right, the average face is warped into my geometry:
The average smiling face above can also be used to generate caricatures. In the left image,
warp_frac
is set to -0.5, exaggerating my geometry. In the
right image, it is set to 1.5, exaggerating the average geometry.
The Bells and Whistles chosen is changing the gender of my face. This is done by morphing my face with the average Chinese male face.