Project 3: Abel Yagubyan

Please note that I did not use my images for this project. I used George Clooney as image A (defined "george_small.jpg") and Brad Pitt as image B here (defined "brad.jpg").

Defining Correspondences

I initially defined pairs of corresponding points on the two images by hand using ginput in the same order (IMPORTANT!), where I used 44 points (not including 4 corners) distributed around the neck, mouth, eye, eyebrow, head, nose, and ears. I then appended the corners of the images as points to receive the most optimal results from the transformations later on. The images below display the keypoints chosen for George's and Brad's face (labeled for order), along with its Delaunay triangulation mesh of the points.





Computing the "Mid-way Face"

Next, I computed the average of the selected points of both images for optimal solution, which effectively becomes the mean of both sets of points. Afterwards, I calculate the affine transformation matrix using both images' vertices (and their respective co-ordinates). Note that I went ahead and used a warp fraction to be equivalent to the cross-dissolve fraction (0.5 that is, since we want the mid-point). Also note that the affine transformation is computed for the transformation of points from their positions on B to its corresponding points on A (inverse warping). After averaging the shape and colors together, we get(left is george_clooney.jpg, middle is brad.jpg, and right is brad_clooney.jpeg):



The morph sequence

The following morph sequence is displayed using 60 frames by setting the equivalent warp fraction and cross-dissolve fraction values uniformly to the range of [0,1]. Using every single timestep (or midway point between image and new timestep image) I store the image into a GIF file, thus producing a 60 frame, 10fps GIF file displayed below.



The "Mean face" of a population (Danes Dataset used)

Step 1: Since individual's facial points are contained in lines 16-73 of their respective asf files, we initially gather all 58 values present in these files for each image, then take a mean of it to find the average keypoints. An example of the points (along with Delaunay triangulation) of the mean face are shown below:



Step 2: We compute the average of all of the Danish faces by averaging al l of the possible data points, which is used as a reference to being the average shape below. Please also note that I used these mean images above in the two images for average points and delaunay triangles.



Task 3: I morph all of the Danish faces to the average shape from step 2, which I then add all the images up and divide it by the number of files (calculating the mean image). We get:



Here are some individual danish faces being morphed into the average danish face (left is original, right is morphed):













And lastly, here are the images of a **NEW WOW** image of george clooney (called "george.jpg") being morphed into the average Danish shape and vice-versa (left is george to mean, right is mean to george):

NEW IMAGE:



Caricatures: Extrapolating from the mean

Caricatures work by extrapolating the values from the population mean by finding the difference between George's face and the average face of a Dane, which is then scaled by a certain value alpha, and then added back to the original George photo. Here are some examples of alpha = -1,1, and 2 (from left to right).



And here is a GIF displaying the caricatures from alpha value -2 to +2:

Bells and Whistles

I also went ahead and attempted to morph George Clooney into an average Asian female:



The images below are the morphing of just the shape, just the appearance, and both (from left to right):