In this project I worked on producing a morph animation of my face and George Clooney's face. I also computed the mean face of the Danes population of faces. Finally, I extrapolated from the mean face of the Danes population to create a caricature of my own face!

For this part I first selected two pictures that I wanted to perform a morph on. First, I selected a picture of George Clooney. Then I took an image of my face such that my face was about where George's face was in the picture. I then resized my image so that it had the same size as George's. After doing this, I defined pairs of corresponding points on the two images using cpselect. For this I focussed on mapping eyes to eyes, mouth to mouth, chin to chin, ears to ears, etc. I saved the corresponding points on a CSV file so that I do not need to recompute them! Finally, I used the points selected from my face to compute a delaunay trangulation which will be used for morphing in the next section.

George Clooney Image

Diego (my) Image

Delaunay Triangulation of the corresponding points on Diego's Image. The green points are the corresponding points and the lines connecting them portray the triangles defined by delaunay's algorithm.

Delaunay Triangulation of the corresponding points on George's Image. The green points are the corresponding points and the lines connecting them portray the triangles defined by delaunay's algorithm.

In this part I computed the mid-way face of my image and George's image. For this, I wrote an algorithm that did the following:

- Iterated through the triangles in the delaunay triangulation of my face.
- For each triangle, it computed the average traingle of the triangle location in my face and the triangle location in George's phase.
- Then, it computed an affine transformation matrix from the average triangle to my face's triangle and from the average traingle to George's triangle.
- THen, it computed the pixel coordinates inside the average trinagle and transformed them into my face's triangle and George's triangle using the affine transformation matrices.
- Finally, it determined the RGB color of the pixel coordinates in my face and George's face using interpolation and assigned this values to the corresponding pixel coordinates in the mid-way face.

Midway face of Diego's and George's Faces

In this part, I extended the algorithm described above to compute a full morph sequence between Diego's and George's faces. This morph sequence consisted of 45 images, where image 1 is Diego's face and image 45 is George's face. The way I extended the algorithm above is that instead of calculating the average shape of the triangles between Diego's and George's face, I used a warp_frac and a dissolve_frac to control how much influence wach image has on the "mid-way/morphed" image in terms of the shape and the colors.

Full Morph Sequence of Diego and George (45 images)

GIF of Full Morph Sequence

For this part, I worked on calculating the mean face of the Danes dataset. I computed the average face shape of the entire population for image type 1 which is the full frontal face with a natural expression image. The algorithm consisted on the following process:

Full Dataset of Danes Faces

Danes Faces with Triangulation

Warped Danes Faces into the Mean Face

Danes Population Mean-Face

For this part, I used another image of myself. This was taken horizontally to better match the Danes Mean Face dimensions. I also had to recompute the pairs of corresponding points between the two images. Then I just proceeded to morph the two images using the set of corresponding points.

Horizontal Diego Image

Danes Population Mean-Face

My face warped into the Dane's Mean Face average geometry

Dane's Mean Face Warped into my face's geometry

For this part, I used the Dane's Mean Face and my face (horizontal orientation). The first step in the algorithm was to subtract the mean population face from the face, call this difference delta (see image below). Delta represents the defining features of my face. Then a caricature consists of my original face plus alpha * delta, where alpha is a constant between 0 - 1. Below I show the results for various values of alpha.

Horizontal Diego Image

Danes Population Mean-Face

Delta: Difference between Diego's face and the mean face of the Dane's population

Caricature with alpha = 0.1

Caricature with alpha = 0.3

Caricature with alpha = 0.5

I change the gender of my face into the average women face of the danes dataset. For this, I first calculated the mean face of all danes women. Then I calculated a morph sequence between my face and the women face.

Dane's Women Mean Face

Morph sequence Diego to Women