CS180: Intro to Computer Vision and Computational Photography

Project 3: Face Morping

Shafin Haque


Overview

In this project, I produced an animation of morphing my face into someone else's, computed the mean of a population of faces and extrapolated it to create a caricature of myself.


Mid-Way Face

Before the morphing animation, I first generated the midway face between two faces. I did this by first finding correspondence points between the two images and finding the average of these points. I then calculated a Delaunay triangulation using the average points and found an affine transformation to go from the two original set of points to the average. I solved for the affine transformation by solving a least squares problem to map the first set of coordinates to the average. From there, I found the inverse warp by simply inverting the affine warp to go from the average points back to the original two images, and applied both of the inverse warps to the average triangles. I then used an interpolation method to get the pixel values from the original images and averaged these values to get a final, mid-way image.

Image A Triangulation

Image B Triangulation

Image 1

Image A

Image 2

Image B

Mid Way Image

Mid-Way


Morph Sequence

I then produced the morph sequence by weighting the color and correspondence point averages by a time variable. Rather than multiply each shape and color by 0.5 like for the mid-way image, I multiplied the first image's color and shape by (1-t), and the second image's by t. I used a total of 45 steps, equally weighted from 0 to 1, and saved my video at 15 frames per second.

Morph Sequence

Mean Population

In this part of the project, I computed the average shape of faces from this dataset. I then morphed some of the images to this average shape, and then warped my face into this average shape, and the average face warped into my geometry. From the dataset, I chose only the men, and each subject had a smiling and non-smiling photo, and I filtered only the non-smiling photos for consistency

Mean Population Image Mean Population Image
Example Warped to Mean
Example Warped to Mean
Example Warped to Mean
My Face
Mean Face
Warped to Mean Face Geometry
Warped to My Face Geometry

Caricature

I created a caricature of myself by extrapolating my face to the mean face. I did this by weighting my correspondence points and the average corresponding points by numbers greater than 1 and less than 0.

α = -0.5

Bells & Whistles

Using the average image of a chinese male from online, I tried warping only my geoemtry to it, only the color appearance, and both. Because the images were not well aligned, the geometry is not that great, however, you can see by only dissolving the color it keeps my gemoetry well but morphs the color from the average picture well. Warping and dissolving produced decent results.

My face
Average Chinese Male
Only Warp Geometry
Only Dissolve Color
Both