Project 3 Part 1

Index

Part 2

Extras

Face Labeling
First up, label the faces. Why? Well, while computers are great at blending, averaging, and other such effects they cannot subjectively differentiate and determine certain unique "Important Features" of the face (like the eyes, ears etc). So, in order for the warp to work, a human needs to first set these points on the subjects face and their corresponding partners on the targets face.

Here is the screenshot of the labelled portraits with 116 labels.

Here is the list of all the points used for the class morphing.
Points!

Next, Delaunay Triangulation
The points on our faces triangulated.

To make the warp smoother we will compute a mid set of triangles that are an average of the vectors of the label points on our faces.

We include factors like warp factor and dissolve factor that establish how far/well to blend the image.
Now, we need to establish an affine function that creates an affine function that maps the faces to the mid face. Finally we inverse map the pixels to the warped indices with the weight of each point decided by the warp (more towards 0 more like face1, more towards 1 more like face2)

Here is the full morph of the entire image:


Learning curve:
Here are a couple of hiccoughs:
This is what happens with minor mistakes in the affine function This is what happens when the pictures and points are flipped (face1 pts for face2 and vice versa)

And here is the cleared version (first in black & white) and then in color

The reason the pictures have been cropped is because of the difference in the background (everything outside the triangles) which makes a huge difference picture.