15 - 463: Computational Photography
Project 3: Face morphing - by Goutham Mani
Me → Neighbor |
Me → Mean face |
Mean face |
|
|
|
Click on any of the 2 animations above to view the full-size GIF.
They've been resized for viewing purposes (and to be gentle on bandwidth)
Overview
To implement the morph,
- A set of 43 correspondence points were chosen on the
base picture (My points, My picture) and the input picture (Neighbor's points, Neighbor's picture).
- These points were triangulated (using the delaunay function in MATLAB)
- A common set of control
points was calculated using a ratio of the original 2 sets of control points.
- Now, transformation matrices to transform pixels in the base image and the input
image into the newly computed common shape were computed, on a per-triangle
basis.
- With transformation matrices in hand, the two images were warped to the shape of
the now common control points, and averaged.
- In order to generate 60 frames, the
input image was moved towards the target image by a fraction of (1/60) each time
All the full-size frames (60 total) generated in this process, are found
here and the final full-size animation is
here
Mean face
For computing the mean face of the class,
- The average shape of faces was computed (based on control points from the text files here),
- Each individual image was warped into the average shape (warped results found
here, original images used found
here)
- And the colors were averaged from individual warped results to compute the
final averaged face.
Note that I only bothered to use images that had corresponding text files in my
averaging process. So I ended up using only 21 images (and their corresponding
control points) overall.
Mean face of the class |
My face, warped into the average shape |
|
|
Here's some of the other individual warps (used to compute overall average) that came
out to look interesting:
Finally, I morphed my face into the mean face using the process described in
Overview (just for fun).
The full-sized GIF for that morph is found
here, and individual
frames used in that morph are found here