In this project, we are primarily deals with image morphing, a process to transfer the semantic content of one image to another image with the same content. On a high level, it involves three processes: finding the corresponding points, construct the triangulation from the points, affine transformation between each triangles.
In this point, we find the correspondence points by hand. By allowing the user to click alternately between two images, we obtain the list of correspondence points between two images. Since these points will be used for Delaunay Triangulation, the best effects will be achieved if each triangle has the same semantic content, i.e. eyebrow triangle should match eyebrows, ear triangle should match ear triangles.
While we can obtain triangulation on each image separately, we run the Delaunay algorithm on the interpolated points and use the triangulation order on the original points to make sure that the triangulation in the results is as reasonable as possible. That is, for two images, we have three sets of triangulation, one on the interpolated points and two on the original points. Once we have this, for each original image, all we need to do is to transform the corresponding triangles from the original image and halfway midpoint triangles.
To obtain the above results, we calculate the middle points between the correspondence points in each image, i.e. we use a alpha weight of 0.5. Then for each triangle, we find the inverse transformation from the midway triangles back to its original triangle. Lastly, we fill up the result image by taking the points in the result image, apply the inverse transformation, and obtain the color in the original image.
By varying the alpha weight, we obtain a morph sequence from me to Tom Hanks.
In previous part, we are dealing with a binary image morphing. However, there really is nothing that stops us from going to multiple images. Here we use the Dane's dataset and compute the average geometry of 33 male computer scientist. Then, we morph all of them to this average and overlay them together to produce the average face.
Here are some examples of faces morphed to the average.
Based on the average feature points we calculated for the average male, we can also morph my image to the average male or morph the average male to my feature points
Instead of intrapolate the feature points, we can also extrapolate such that we emphasize the features in one image.
If we morph a girl onto the average male look, we might have some interesting gender changing effect. So I pick my favorite Hong Kong actress, Chingmy Yau, who looks quintessentially feminine to me and did some experimentation.