CS194-26 Project 3:Morphing

Algorithms

The first key algorithm was defining an affine transformation. To do this I treated 2 edges of the initial triangle as basis vectors and computed the inverse to find a transformation to the standard basis. Then, I took the standard basis and used the other triangle as the transformation from the standard basis. Multiplying these two transformations produces the desired transformation after accounting for shifts.

Secondly, we computed a shape transformation, specifically a mid-way transformation between two images. This algorithm involved using inverse warping between predefined corresponding triangles of the two images. For each trial in the second image, we took the color value from the corresponding inverse point. For inbetween points, we used bivariate splining to approximate the color value. This allowed us to warp between the corresponding shapes from the first to the second.

The last main algorithm was actually producing a morph between images. This used a combination of many weighted shape averages and weighted color averages for each frame of the morph. The image was transformed to the weighted shape average using the earlier algorithm.

An additional algorithm included computing facial averages. This involved scaling and averaging the pre-defined feature points of the data set. From this average face we could use earlier algorithms to produce caricatures as well as change facial expressions and other things.

Images

temp

Picture of George

temp

Picture of Obama

temp

Midway face of Obama

temp

Midway face of George

temp

Morph between George and Obama. Midway the morph has issues because of poor alignment of pictures and not enough correspondance points.

temp

Example of a face made to be more average

temp

Example of a face made to be more average

temp

Example of a face made to be more average

temp

Example of a face made to be more average

temp

Example of a face made to be more average

temp

Average face of Dane photo set

temp

Photo of Danny Devito

temp

Photo of Danny Devito made more average. While distorted, you can tell he has a smaller face (more average sized)

temp

In comparison, the caricatured version of his face is more exaggerated and larger.

temp

Average korean female smiling since I couldn't find Korean male.

temp

My friend Jay who is not smiling

temp

Jay with a shape morph applied to make him smile.

temp

Jay with both an appearance morph, while not smiling has browner hair.

temp

Jay with both shape and appearance morph.

temp

bonus morph with more difficult shape transformation

temp

original image

temp

original image

Improvement

Some improvements that could be made would be better defining corresponding points for smoother morphs. Images could also be aligned better and have uniform background in order for optimal effect.