Overview
In this lab, I'm creating a morph of two similar images such that
one seamlessly flows into another. A morph is a simultaneous warp of
the image shape and a cross-dissolve of the image colors. The
cross-dissolve is the easy part; controlling and doing the warp
is the hard part. The warp is controlled by defining a correspon
dence between the two pictures. These are done by hand and include
important facial features that should be aligned/preserved in order
to facilitate the illusion. (i.e. eyes, mouth, chin).
The Algorithm
Correspondences + Triangulation
First we calculate the Delaunay triangulation for each of the user supplied points.
In order to ensure the most even morph, the set of control points we use is actually
the average of the ones for the two images. Since Delaunay only associates vertices with
triangles, this can be applied to both images.
Affine Transformation
The next step is to cacluate a transformation matrix to transform the triangles from
the first image into those of the second. An Affine transformation matrix
preserves the collinearity relation between points and contains skew, scale and
aspect ratio changes.
Cross Dissolve + Morph
Lastly, we cross dissolve the two faces morphed to a warped average
while slowly increasing the warp factor, generating a smooth animation
Face Morph from Alex Wolfe on Vimeo.
Averaged Face
Messing with the Average
My face to the Average Face
The average face to my face