CS 194 HW4

Computing the midway face

To compute the midway face, first I chose corresponding points from the two images. I picked 25 for the Trumpkin, 20 for Jeslan, and 26 for my friend and me. Then, I calculated the intermediate points by taking the average of the two match points (with a factor of .5). After getting the intermediate points, I got the triangulation for all 3 points (image 1, image 2, and image 3). I made sure to use the same Delaunay triangulation for all three. Next, I calculated the Affine transformation for (intermediate --> image 1) and (intermediate --> image 2). I did this using matrix multiplication to find the coefficient affine matrix. After, I found which triangles in the start and end image each point in the intermediate image corresponds to. I need these triangles in order to calculate the correct affine transformation. I them performed the affine transformation on each point with the corresponding triangle. Finally, I calculated the average of each pixel between the start and image using the transformed pizxel matrix.


Jesus and Aslan
Jeslan

I resized the images of my friend and myself, so it's a bit pixelated.
Bing


Morph Sequence

To compute the morph sequence, I calculated fractions between 0 and 1 for however many frames I wanted to create. Then, I just performed the midway face for each fraction and constructed a gif from those images.
I have also included the morphing of my face (frowning) into the face (frowning) of my friend.