face morph

Project 5: Face Morphing

Due Date: 11:59pm on Friday, March 26th, 2010

Brief

Requirements

You are required to implement the following:

Details

MATLAB stencil code is available in /course/cs195g/asgn/proj5/stencil/. You're free to do this project in whatever language you want, but the TAs are only offering support in MATLAB. The TAs have supplied a few files to get you started.

Correspondence Points

james hays

Before you can start morphing, you need to define correspondence points between the images; e.g. left eye of image A maps to the left eye of image B. This can be tedious, but is necessary to get good morph results. Select points on features that you want to align during the morph: eyes, ears, nose, mouth, etc. The TAs use 22 points and get good results, but you are free to use as few or as many as you want.

Morphing

The actual morphing is in two parts: cross dissolving and image morphing. Cross dissolving is easy: interpolate a value from 0 to 1 and use A*value + B*(1-value) as the frame value. Morphing is a little trickier.

There are different methods of doing morphing. We will be morphing by smoothly blending offsets from one one point to another. First you need to calculate the intermediate points from image A to image B based on a value from 0 to 1. Then calculate the offsets of the points in A to the intermediate points and do the same for B. These offsets map back to each image and gives us the pixel values that will be blended at the intermediate points.

Next you need to calculate the offsets of non-marked points. You know the offsets of certain pixels, but the rest of the image is unknown. Does this problem sound familar? It should, its just like Poisson blending. You can use your Poisson blending code from project 2, but you will need to modify it slightly. Instead of blending between images, we are just going to be doing a single image fill, so you will probably have to modify your code. If you remember from class, the system of equations for doing a poisson fill are much simpler. For an unknown pixel, the value is the average of its 4 connected neighbors whereas a known pixel is simply its value.

Mean Face

From the correspondence points and morpher, you can create the mean face of some data set. You would need to compute the average shape, warp the images to that shape, then average the colors.

Write up

For this project, just like all other projects, you must do a project report in HTML. In the report you will describe your algorithm and any decisions you made to write your algorithm a particular way. Then you will show and discuss the results of your algorithm. Also discuss any extra credit you did. Feel free to add any other information you feel is relevant.

Extra Credit

You are free to do whatever extra credit you can think of, but here are a few examples.

Graduate Credit

You are required to do at least 10 points of extra credit.

Handing in

This is very important as you will lose points if you do not follow instructions. Every time after the first that you do not follow instructions, you will lose 5 points. The folder you hand in must contain the following:

Then run: cs195g_handin proj5
If it is not in your path, you can run it directly: /course/cs195g/bin/cs195g_handin proj5

Rubric

Final Advice

Credits

Project derived from Alexei A. Efros' Computational Photography course, with permission.

Good Luck!