The goal of this project is to produce a "morph" animation of my face into someone else's face, compute the mean of a population of faces, and extrapolate from a population mean to create a caricature of myself.
First, I created a tool to let me manually label corresponding points on both my face and the other face. Then, using Delaunay triangulation, I created corresponding triangles. By creating affine transformation matrices and using linear color interpolation, I transformed triangles to in turn transform faces into the shapes I desired.
To create the mid-way face, I started with a triangulation of the mean set across the corresponding points in both images. Then, to avoid holes, I used inverse warping to bring each corresponding triangle from each image into the mean triangle.
Similar to the way I made the mid-way face, I created a morph sequence by varying the shape and color dissolution between the corresponding triangles across the range between the two images.
Using the FEI annotated face database, I used my inverse warping functions to create the average faces across their dataset of 200 different faces. I did this by warping each face into the average shape and then averaging out their pixel contributions before stacking them onto each other. I then warped my face into the average shape that I got, and it looked pretty funny. I guess they must have been using a different focal length :) I then continued to warp the average face into my own facial geometry, but that didn't work well either because their facial annotation didn't comprehensively label the face's shape around the forehead. Finally, using exterpolation from the mean image and my warped face, I created a caricature of myself.
I found an image of an average male college student at a university in Italy, and since I'm going to Italy soon, I thought it would be fun to see if I could make myself look Italian with my inverse warping functions.