The primary goal of this project is to explore how we can exploit image transformations to produce face morphs. Throughout this project, we use a variety of image processing techniques such as inverse warping and cross-dissolving to produce results such as "mid-way" faces, morphing, and caricatures.
Before we can warp two images together into some average or midway shape, we first need the corresponding points defined for each image to ensure that similar features (nose, eyes, etc.) get matched up correctly. To do this, I first resized the images in a photo editor to ensure that the dimensions were the same, then used matplotlib's ginput() function to define n points on each image by hand. We only need to do this once, as we can save these points and then run the Dulaunay Triangle algorithm on these points to output triangulations.
To compute the midway face, we use the triangulations from the previous part to compute affine transformations in matrix for each corresponding triangle. Then, we inverse warp by generating a mask with polygon() so that we can derive the new values of each pixel from the corresponding pixel(s) given by the affine transformation.
The morph sequence is created from running the warping and cross-dissolving methods from the last section on increasing warp/dissolve fractions (in this case, I chose 45 images and 1/45 increments).
The same techniques and methods from the two previous sections are applied to the "Danes" photo set, specifically the males.
Some sample morphs of Danish men to the average shapeAs seen above, warping my face onto the shape of the average Dane already produces some comical results. Here are a couple more examples with varying warp proportions.
For my Bells and Whistles, I changed my race (Asian->Indian) and added a smile!