CS 194-26 Project #4: Face Morphing

Overview

The purpose of this project was to explore the image blending via correspondence points.

Morphing

I took two pictures of myself, and defined a set of 60 corresponding points. I used the midpoints to create a triangularization, the result of which is shown below.

For each triangle of each frame, I compute the affine transformation matrices to map included points to the source images. Point shift and crossfade progress linearly.

Final product: 675x900, 45 frames. The execution of this un-optimized code is proportional to the product of width, height, frames, and correspondence points. Each frame took a few minutes to compute, but multiprocessing made computation very manageable.

Additional Results

my friend morphing into her pet dog
blue meanie >:O
my friend has turned into a poster

🎺 🎺 🎺 Musical Video 🎺 🎺 🎺

Population Average

The following images were created using this dataset of Danish computer scientists: M. B. Stegmann, B. K. Ersboll, and R. Larsen. FAME - a flexible appearance modelling environment. IEEE Trans. on Medical Imaging, 22(10):1319-1331, 2003.

sample image
average image
average face
sample warped to average
me warped to average
average warped to me

Caricature

This was created by subtracting a multiple of the difference between my own face and the mean of the first face type from above.

distortion: 0.2
distortion: 0.5
distortion: 1
distortion: 2