Face morphing involves selecting a set of critical points and then defining a triangulation of these points. We then define two matrices: let us call one matrix S for the points in a triangle in our source image, and D for the points in a triangle in our destination image. We have an S matrix and D matrix for each triangle. Check out the triangulation for George and Obama!
Now that we have a triangulation and matrices S and D, how do we get from S to D to make a morph? Well we define an affine transformation matrix T. We pick some weighted average middle, which is our target and then transform each of the images to this middle state. We know that TS = D. The matrices are invertible so we can easily compute T. Once we have all of our T matrices, we can do an inverse warp. For each point in our target, we apply T inverse, giving us a location in our original image. We set the color at this point to the interpolated value of the source image since we may end up between a pixel. We do this for a weight ranging from 0 to 1, then stitch all the images together, giving us the following warp.
I picked a subset of the Danish population: all the Danish males. Using the given triangulation, I averaged all the critical points and then morphed every face into the average critical point shape. Below are some of the results.
Once I got all the faces of average danes, I just took an average of all the faces morphed into the average to give us the average Dane face shown below.
Using the average architecture for Danes, I morphed my face into the average Danish face. It seems like Danes have skinner faces than me.
Now what if Danes had my head shape. Well they'd have a fatter face of course. Check it out below.
To find my Danish Caricature, I took a difference of my critical points with the average Danish critical points. and added this difference to my own structure and morphed into this structure.
In honor of the start of the regular season, I present the Golden State Warriors face morph.