Face Morphing

Zhen Qin


Overview

In this project I produced a "morph" animation of two different faces. A morph is a simultaneous warp of the image shape and a cross-dissolve of the image colors. Cross-dissolve means averaging the color of two images. The warp is controlled by defining a correspondence points set between the two pictures. The correspondence points should map eyes to eyes, mouth to mouth, chin to chin, ears to ears, etc., to get the smoothest transformations possible. Then those points defines the shape of each face, and the affine transformation of these shapes warp two different faces into the same shape.


Computing the "Mid-way Face" and The Morph Sequence

In this part I used my picture and my bestie Anna’s picture. The goal is to compute the midway face of us and create a morphing sequence based on that

First of all, I picked 55 points basked on the position and shape of our eyes, noise, mouth, hair, shoulder, and some other features. Then I compute the average shape of us, which is the average of the pictures for the position of these feature points.

The next step is to warp both of our faces into the average shape. I compute the Delaunay triangulation of these points. a Delaunay triangulation for a given set P of discrete points in a plane is a triangulation such that no point in P is inside the circumcircle of any triangle. I will divide the image into triangles and apply affine transformation for each triangle.

Finally, I compute the affine transformation matrices for each triangle. Use these matrices to transform each pixel from original shape to the average shape and I get the warped image. Perform the same operation for both images and average the color of two warped images, I get the average face of me and Anna. We think the average face is prettier than any one of us. What do you think?

Here is the Delaunay triangulation for input images and the result of average face:

Card image cap

Triangulization for me

Card image cap

Triangulization for Anna

Card image cap

Input Image for Me

Card image cap

Input Image for Anna

Card image cap

The average face of us



The Morph Sequence

To compute the morph sequence, I don’t use the average shape or color anymore. I set a variable time which ranges from 0 to 50. For each time, I take 0.02*time fraction of my face’s color and shape and (1 - 0.02*time) fraction of Anna’s face’s color and shape. In this way, I get the Morph Sequence from Anna to Me:





The "Mean face" of a population and caricatured face

To compute the average face of a population, we need to compute the average shape of all the faces, warp each face into the average shape, and average all the warped faces. In this part of the project I compute the mean face of 33 Danish males, All pictures are for full frontal face, neutral expression, diffuse light.

Here is the average face and some examples of single face warped into average shape:

Card image cap

Danish male average face

Card image cap

Face warped into average shape

Card image cap

Face warped into average shape

Card image cap

Face warped into average shape

In the next step, I warp my face in to the shape of average Danish male’s shape, and warp average Danish male’s face into my face’s shape. I feel so desperate when I look at my warped face because it is so ugly. I find that it’s because of the angle of my picture. I took a picture of myself from up, so I am facing up in my picture, not completely facing front, so there are some distortions. That’s also why the Danish average face in my shape looks like an alien. I also extrapolate my face from the Danish male mean to create a caricature of myself. I find that the eyes looks bigger and chin looks sharper.

Card image cap

My Face

Card image cap

Danish average in my face shape

Card image cap

My face in Danish average

Card image cap

My caricatured face



Bells and Whistles: Change gender and ethnicity

I create the morph sequence my face with a white man. I find these two pictures match pretty well, because our face are facing almost the same direction. Here are the two input images and morph sequence:

Card image cap

My Face

Card image cap

White Male Face

Card image cap

Morph Sequence

In addition, I compared the results of just averaging the color, just averaging the shape, and averaging both color and shape. I find that averaging color has very pool result because our face are not aligned. The second result is the man’s face in our average shape. It looks vey natural and pretty. It clear that the man achieves some female features in his face. The last picture is the mid face of both color and shape.

Card image cap

Averaging Color

Card image cap

Averaging Shape

Card image cap

Average both color and shape


Reference

HTML/CSS for this page was taken from https://v4-alpha.getbootstrap.com/components/card/