Defining Correspondences

Defining Correspondences

In this part, I define pairs of correspindences points between my image and image of Li Xian, as shown in the figure. We select the points by hand (using the ginput method), so that the points can match faces in the images. Next, we define the Delaunay triangle, that is we connect the points we selected to form traingles representing the face shape. By that, we can produce the "midway shape" of the two selected images, as shown in the next part.

me with points

me with triangles

Li with points

Li with triangles

Computing the "Mid-way Face"

In this part, I am trying to compute the "midway face". What I am doing is that I first compute the midway shape of the two images, with the triangulation defined by last part. Next, I average the color (half from each images) and warp them into the average shape. Mathematically, we first define an affine calculator. One of the characteristics of affine function is that let X = [xi yi 1 0 0; 0 0 0 xi yi 1], a = [a11; a12; a13; a21; a22; a23], for all i, we have X*a = [xi'; yi'], and we can use this technique to calculate the affine transformation of traingles.

midway

The Morph Sequence

In the last part, we want the midway so that I keep the warp factor and color factor to be 0.5. Here, to produce a morph sequnce from two images, I define a loop within range 44, the ith sequence has warp and color factor to be i/44. To following gif is the morphing sequence from my image to Li image.

Morphing sequence

The "Mean face" of a population

Here we are calculating an average face of the population. The data using is from link The faces in the data set already provided points, so we can draw the Delaunay traingles as defined above. We are now basically doing a similar job to above, but to all faces in the data set. In the following, I provid the average population face, average male face, average female face, morphing from a male face to the average, a male face to male average, and a female face to female average. Also, I provide mapping my geometry to the average geometry, and mapping the average geometry to my geometry.

average population face

average male face

average female face

male to average

male to male average

female to female average

My geometry to the average geometry

Average geometry to my geometry

Caricatures: Extrapolating from the mean

In this part, I use the idea from above to create a Caricatures of myself. I subtract half of the difference between my points and the average male points to form the new male point set, and do the transformation from my face to that point set, resulting in the following iamge.

Caricatures of me

Bells and Whistles

In the last part, I produce the images of me mapping to the average African American face, and mapping the average African American face to my face. In addition, we work on a music video showing the transformation of me and some of my classmates. Here is the link.

Average African American face with points

Average African American face with triangles

Mapping me to average

Mapping average to me

midway

Conclusion

This project is the face morphing project, we build Delaunay triangles on faces and transform the triangles to obtain the effect of face morphing. However, sicne we are picking the points by hand, sometimes the point we pick is not perfect, resulting some of the images looks a little bit of weird. If we perfectly select points on each images, i.e., eyes to eyes, nose to nose, etc, we should get a perfrect transformation, as an improvement can be done to this project.

« 1 »