Programming Project #4: Face Morphing
Emilie Gao (abe)
Morphing Faces
Overview:
Firstly, I had to calculate the midway face. In order to do this, the first step is to pick a few landmark points (the same from both images), and to average these points. Then, using these points, we create run Dealunay triangularization. Using these triangles, we are able to calculate a transformation matrix called the Affine transformation matrix that will transform the triangle from image A to the corresponding triangle of image B. In order to calculate the Affine transformation, we get the corresponding points of a specific triangle D from image A and the same points of the same triangle from image B and we run some linear algebra. Then, using those affine transformations, we inverse warp the image A to the midway and image B to the midway. From here, we then cross-disolve the image.
In order to calculate the whole morph and not just the midway, we alter two variables. The first is averaging the points. To calculate the midway, we just calculated the average, but for different steps in the warp, we want to weight the different pixesl differently.
Furthermore we also have to change the weight of the crossdissolve, so we have another variable for that instead of averaging 50 50.
Using this gradient we end up with this result!
Taka and Aaron
Mom and Dad
Mean Face
Overview:
For this part, it was really similar to the last part's midway point. The only difference is that instead of morphing two faces together, I averaged all the faces in my subsets and morphed each individual face into the average. Then, I just cross dissolved them together and got some pretty interesting results
A few samples of the kinds of images I used to calculate the mean
Average of All Faces
Average of Female Faces
Average of Male Faces
Overview:
For this part, I just morphed the two faces to the midway point
My face morphed into a man's geography
Man's face morphed into my geography
Final combined me and man
Bells and Whistles
I changed my friend (boy) into a girl
shape
Appearance
Full Morph