Computer Science 194-26: Image Manipulation and Computational Photography
Project 4: Face Morphing
This project was about creating a morph between two faces. To start, I created a set of correspondences between two images. Then, you could create the midway faces between the two images by triangulating the correspondences create a Delaunay triangulation. From there, you could create an inverse warp between the middle delaunay triangulation and the final one, and as a result, you could find the midway face. To create the full morph, you have to adjust the cross_disolve to minimize changes between frames, making the image fully smooth. Then, I used this technique to create the mean face of a population of nearly 50 danes. By using this mean image, I could then create a caricature of myself by seeing what happens if I take the mean warp, and then subtracting that warp from my face to create a more distinct face. Finally, I took an indian face and changed my ethnicity by morphing the shape and the appearance.
To define correspondences, I had to take a list of points and label them for each image. To do this, I created a list of common points in each image, and then to make sure that I didnt have to select all of the points again, I pickled them to save them. Below is an example
Computing the Midway Face
In order to get the midway face between the two images, we get the "average face" by finding the average x positions and average y positions of the each of the selected points between the two source images. Then, we warp the images to an average face by warping each of the delaunay triangles individually, and averageing the color intensities.
Source B with the Delaunay Triangulation of the midpoint image overlaid
Bonus abstract failure
I used the same source images to generate these morphs. The morphs were created by slightly increasing the weight of each of the B source image feature locations, as well as the color intensities, while slightly decreasing the A intensities and color locations. This can be expressed as
(1-x)A + xB. I tried this twice, with x being in intervals of 1/12 for the first time, and 1/75 for the second attempt.
x = 1/12
x = 1/75
Mean Face of a Population
I used the Danes data set to find the images that would be averaged. I did this by taking the labeled points for each image, and then creating an average shape of all of the labeled points. Then, I morphed each image into the average shape, and then averaged all of the pixel intensities to find the mean image
Faces warped to mean face
Average of all the faces
My warped to the mean Danish face
The average Danish face warped to mine
In order to create a caricature, I can take the vector
v that is interpolated to find the average face, and extrapolate it further toward my face to create a caricature of my features. This emphasizes the differences between my features and the average face in the database.
Changing my ethnicity
To do this, I took an image of the average indian male, and used a similar technique to creating the caricature to emphasize certain features and create an version of myself as an indian male.
Average Indian Male
Cross Dissolve Only
Warp and Cross Dissolve