Project #3: Face Morphing 

    

Bryanna Davison                                                                                                                             Spring 2020

Part 1: The Midway face

To create a mid way face, I used a piecewise affine triangular warping algorithm as discussed in class. These are the images I used.

Me
Kloss

Algorithm

1. Identify corresponding points.

I used Matlab's cpselect function for this task.

2. Find average object

By averaging the coresponding points, we can compute an average object, or in this case, face. Average vertices and average shape can be seen in the trianglation present on the below images.

3. Triangulate

I used Matlab's built-in Delaunay triangulation algorithms to create my triangulation using the averaged corresponding points. This step creates the triangles we will use later to warp our images piecewise.

Me with triangulation
Kloss with triangulation
4. Compute the Affine Warp and Perform Inverse Warp    

For each triangle in our triangulation, the affine warp from the original object to the average object is computed. By using this transformation matrix, each pixel in the resulting image can be selected from the original image. Creating an image of the original object warped to the shape of the average object. The inverse warp is performed by inverting the transformation matrix thus the name.

Start
First Triangle
Almost done
Done
5. Cross-Dissolve

To combine the warped images, they must be scaled so that the total scaling factor applied across all the images is 1. In the case of a midway point of 2 photos we would want half of each image in our result.

Me warped
Other warped
Midway Warp

Part 2: The Morph Sequence

Using the same algorithm descibed above, creatign a morph sequence is quite simple. All that needs to be changed is scaling quanitities. Specifically the quantities that affect our average set of points and our cross-disolove. We change these to make transitional steps which are combined into a sequence     

Lorem ipsum dolor sit amet, consectetur elit

Lorem ipsum dolor sit amet, consectetur elit

Part 3: The Mean Face

We can further extend the algorithm above to more than 2 faces. In doing so, we can compute a mean or average face of a population. We can acomplish this by using corresponding points across all the images in the sample. From this set of points, an average can be calculated and thus and average object/face shape. If warp each face to the average face shape, we can use the same crossdisolving principle to blend all the warped images into one mean face. For this part I used the dataset from the Technical University of Denmark. I found the mean for the mean and women as well although the sample of women was fairly low.

The Mean Face of the Technical University of Denmark Face Set
The Mean Face of the Females of Technical University of Denmark Face Set
The Mean Face of the Males of Technical University of Denmark Face Set

A Few Faces From the Set Warped to the Mean

Original
Warped to Average
Warped to female
Warped to male

My Face and the Mean Face

I think because the control points only map as high as the brows, there was considerable distortion to the hair often. The face area worked out well however.

Me Warped to average
Warped to Female
Warped to Male
Mean Warped to Me
Female Warped to Me
Male Warped to Me

Caricature

Extapolating from the mean. Below is my face extrapolated to look more like the mean or more like myself. Negative alpha skews more to my self while positive skews more to the mean.  

a = -2
a = -1.5
a = -1
a = -0.5
a = -0.25
a = 0
a = 0.25
a = 0.25
a = 1
a = 1.5
a = 2

Bells and Whistles

I used an average sad East Asian face and an average sad Western face image on myself. I found the images here(Which discusses issues with emotion recognition between ethnicities). To get a sad western (my ethnicity) version of me and a sad East Asian version of myself.

Original Me
Original EA Sad
Original Western Sad

EA Sad Appearance Blended
Warped EA Sad Shape
Both
W Sad Appearance Blended
Warped W Sad Shape
Both

Extra

A few extra images

My nephew and my cat in one.
Tesla and edison