In this part we worked on finding the mid-way face between two distinct faces. This involved computing the average shape of the two faces, warping both faces into that shape, and averaging the colors together. We dotted each face with a set of points that correspond to major features (eyes, nose, lips, etcetera). Using these set of points, we can compute a single set of average points by combining each pair of points with a weight of 0.5. We then find an average shape by applying Delaunay triangulation on the mean set of points. Afterwards, we use the triangulation and the set of points for each image to compute an affine transformation matrix, which is the transformation matrix from points in the mean set to points in the original image set. With this matrix, we can use inverse warping to transform pixels from the original image to the average shape. We do the same thing with the second original face image, and we have two images of faces warped to the average shape. Once we combine these images together with a weight of 0.5, then we have our mid-way face.
Wow, what a handsome man!
We create a morph sequence by doing the above steps, except we slowly increment the weights for creating the mean set of points and finding the average color from 0 to 1, depending on how many frames we want for our sequence. In this sequence we created a sequence of 45 frames, incrementing the weights by 0.022 per frame.
Finding the mean face of a population is much like a scaled up version of finding the midway face. Considering we have a set of images, we will plot points onto every face, then find a mean set of points by combining pairs of points together with a weight of 1 divided by the number of images. We warp each face onto an average shape and then we combine every image together also with a weight of 1 divided by the number of images. Using a set of 30 Danish male computer scientists, I computed the average face of a Danish male programmer. I also warped my face onto the average geometry and warped the average face onto my geometry.
Notice how my left ear (which is barely visible in my original selfie) has been stretched out to resemble the left ear of the average male face! Vice versa for the average male warped to my face. And now the average male has a v-neck t-shirt! Now that's what you call style.
Before computing the set of Danish men, I stumbled upon a set of meat images. I was trying to be funny by computing the average shape of the meat, but I didn't realize we were supposed to warp our face to the average geometry. Here are the results.
We create caricatures by subtracting our original face with the mean face, then summing the difference back to the mean face with a weighted alpha.
Alpha=50 (just kidding this is my actual face)
In this video we morph iconic characters from the classic films Shrek (2001) and Shrek 2 (2004). This was a passion project of mine, so I hope you enjoy!
This gif shows the evolution of the Google logo from 1995 to 2015. Which logo is your favorite? I have no preference because I only use Bing.com
My whole entire life I've been mistaken as Filipino. I am actually Cambodian, and it is my mission to prove that Cambodians and Filipinos don't look alike at all. With the power of computational photography, I can finally fulfill my goal. Witness the final results lets lay this debate to rest once and for all!
The debate marches forward.
I had a lot of fun working on this project. It truly enlightened me on the power of matrix transformations and how vital they are in the realm of computational photography. Although we didn't make it from scratch, the algorithm for making Delaunay triangulation sets was also interesting to learn. I hope you enjoyed my results of this project as much as I did! Sidenote: I don't actually use Bing.com