FACE MORPHING
Computational Photography
by Emine Begum Gulsoy
This project involves morphing two similar images into each
other thorough defining corresponding points and creating a matching triangulation
from these points and finally inverse warping one image into the other. Photos of class members were taken and
their corresponding points were defined using MATLAB and IDL. We were supposed to use 60 frames in
morphing our own pictures to the next person in line. However the program can
easily be altered, through an input parameter, to give any number of frames.
The morphed image series were put together as an animated gif using Adobe
Photoshop. Delaunay triangulation was preferred while creating triangles
through the points defined. The following in the results and discussion on how
these results were achieved:
THE MORPH
Left: My image
Right: Middle Image
Final Image
Animated
The hardest part of this process is defining the corresponding
points. The points for the above images have been separately defined using IDL
man. The points for the rest of the images under this project have been taken
from the accumulated class /faces index. One other obstacle in programming- a
lot less minor- has been the conversions between using IDL and MATLAB. The two
languages have the opposite ways of reading in images such that the points
defined by MATLAB had to be converted.
In general the program works as following:
The two images, their corresponding point indices, the
number of points used and the number of output frames aimed, are given to the
program as the inputs. The program
gets these and creates a triangulation using dalaunay approach. Using an affine
transformation matrix, produced by the ÔaffineÕ function, applies an inverse
warp to create the final image of each step. The frames are iterated by
1/(n_frames/2). Finally the images are cross-dissolved to get the correct
color.
THE MEAN FACE
mean face of 13 people
Left: Mean of 5 girls in the class
Right: Mean of 8 guys in the class
The mean face was calculated using 13 people and their
corresponding txt files from the faces folder that was created for the class.
Then the males and females were separated to get the mean male and female
faces. Since mean face averages a big number of faces, it looks a lot smoother,
perfect and symmetric compared to other pictures. However we all look funny
when warped into the mean shape, here it is:
EIGEN FACES
Here are
the eigen faces computed using the built-in LA_svd function in IDL. The first
one represents the mean face. The below images are the outputs from only the
red channel. However, the program can also generate all the eigen faces of all
the channels and put them together.
CARRICATURES
This has
been the most fun part of the project. Playing around with the variables
enables us to get funny looking pictures with new proportions.
Smiling smiling and more smiling
Left: Bigger head
Right: Bigger ears
Aaand here are the monsters, i.e
three heads:
I am not sure why this happens but I
think it has something to do with the folding of triangulation since the shape
looks like this:
Triangulation