The Morph Sequence

For the first part of the project, I was working to create a morph seqeunce morphig one image to another. I began by definidng pairs of corresending points using matlab's `cpselect` library. Next, once pairs of correspondes for key features in the images have been defined I used the `Delaunay` library in python to create a tringulation of the points to be used for the morphing.
The triangulation was defined on the average shape of the image (computed by taking the mean of the correspondence points). This ensures a Delaunay triangualtion for the average of both the images which resutls in a more pelasing and smooth results. I worked with these two input images of Barack Obama and George Clooney:


The resulting triangution looks like this:


Now that we have the two input images and the triangulation, we can compute the morph seqeune. To illusrate the steps invovled with this process, I first computed the "mid-way" face. The midway face invovles computing the average shape, warping the images into that average shape and avering the colors together to end up with the average face of the two images. The key componenet of this algorithm is implementing an affine transformation from the original images into the average shape for each triangle. Since the affine transformation happens locally per triangle, we are able to get a much better results than a global cross dissolve. After wresteling with the math invovlved for awhile (failure example depicted below), the mid way face is computed by combining 50% of obama with 50% of george:


Now that the algorithm was working correctly, I created 45 frames of the morph seqeunce with a wrap fraction that was increasing over the 45 frames. I used an online gif makes to create a gif of the 45 images resulting in this morph:

The Mean Face of a Population

Next, I used the dataset of Danish faces to compute h mean face of the entire population. The dataset was labeled with male and female tags as well as similing and natural expression photos. Some examples of the faces in the dataset include:


I decided to compute the overall average face first for both the natural and smiling photo:


I also wanted to see what just the men in the dataset looked like:


Finally, I computed the mean face for just the women in the dataset:


Now, with the population means computed, I wanted to morph individual members of the population to look closer to the mid way face. First, I tried morphing a random male to the average.


I also computed a smiling male to the average:


Moving to the women in the dataset, I did the exact same thing:




Finally, I tried morphing my face to the population mean of the dataset. I don't think the results are as good as they could be because my forehead becomes huge when morphed into the average shape. The reason for that is because the dataset key point correspondences do not caputure the forehead as one of the point pairs. Nevertheless, the results are still pretty entertaining:
My face wraped to the average geometry:


The average face wraped into my geometry:



It's also possible to make caricatures of faces by playing around with the morph function and increasing or dereased the wrap_fraction. Here is an example of this method:

Bells and Whisteles

I was interested in warping myself wearing different outfits to see if warping once person over and over again would yield interesting results. I took four photos of myself in winter, spring, summer and fall...
I next warped each pair of images (4 in total) pair wise. I created 45 frames per pair. Finally, I put all the resulting images together to obtain a single animation


Next, I decided to try morphing myself into a male shape. I found an average male shape on the internet and decided to see what male-me looks like


Time to see what male-me looks like... I captured my geometry morphed to be 50% male and 75% make. My roommate says she wouldn't date male-me ¯\_(ツ)_/¯


The last thing I did was experiment with warping myself and my two little sisters. We are all 6 years apart so the morph is from age 8 to age 15 to age 21.




Final Thoughts

Wraping faces to other faces was pretty cool. I think it's pretty elegant how simple affine transformations can achieve pretty smooth results. The hardest part about this project was finding images that work well together, as images that are not well aligned do not end up resulting in smooth warps.