CS194-26 Project 4

Kunal Munshani

Face Morphing

Presidents past, present and future

The morph sequence

Rough overview of what's going on. We have two images. A source(S) and a destination(D). We manually label relevant points on each image as feature points. Both images get the same number of feature points, corresponding to roughly the same attributes. What's going on is we break each image(S and D) into triangles based on those feature. We find the transformation matrix(one for each triangle pair in S and D) to transforms corresponding triangles betwen S and D. We then use that matrix to map points between the images. Each point is part of a triangel and each point is mapped using it's triangle's transformation matrix.

Computing the Mid-Way Face

Explaination

As explained above we want to find a transformation matrix between each triangle pair. Here's how we find that transformation matrix. We solve a system of equations that looks roughly like: [x1 y1 1 0 0 0] [a11] = [x1`] [0 0 0 x1 y1 1] [a12] = [y1`] [x2 y2 1 0 0 0] [a13] = [x2`] etc. to find A. We invert A and pass it back to use on our points. We use A to map our points to fill in the midway image where the midway image uses the mean of the feature points of both source images.

Examples

The original George

The original Kanye

The midway image

The original images overlayed by the midpoint triangles.

Computing a morph sequence

Explaination

Intead of the midway image using the mean of the feature points of both images we use unequal weights. In this way the 'midway' image is closer to one source image than the other. We transition these weights from 0-1 to get a smooth transition. We also toggle what amount of the source images color comes in a method analgous the the transtion we do the the feature point weighting.

Examples

Computing the Mean Face of a Population

Explaination

I calculate the mean face by simply averaging all the feature points of the images. I then morph each image to the averaged feature points and add their pixel intensities proportionaly

The average girl face based on the second dataset provided(not the danes)

Examples of girls morphed to/from the average girl

My face warped into the average geometry

The average face warped into my geometry

Warping from the average to me and back

Caricatures

Explaination

I exaggerated features shifting to images different from the mean. We exaggerate difference feature points and remap to them to shift our face in an outlanding direction.

Here I make my face more and less like the average female face

Less female, alpha -.5

More female, alpha .5

Bells and Whistles

Changing my gender

Explaination

I changed my gender by morphing myself into the average indian girl. I changed just the shape by holding my 'color' values constant and when mapping corresponding triangles drawing from the original images. Changing just the appearance was essentially just a crossdissolve favoring the original image. I warped the indian girl to my geometry(triangle by triangle as explained above) but kept my coloration. Doing both was doing a full morph and follows the same logic I outlined earlier.

Just the shape

Just the apprearance

Both!

Warping back and forth