Before computing the "mid-way" face, we have to first know about the average shape of each feature. One way to calculate the average shape is to take an average of the correspondences and triangulate on them. After getting the average shape, we want to warp each triangle in the average shape to both target triangles. This warping transformation can be solved algebraically (each axis has 3 unknowns with 3 equations). After getting the transformation, we can mask each triangle separately to get their coordinates in the average shape basis. These coordinates can be then transformed to both target bases to get the corresponding coordinates. After getting the coordinates, it is just a matter of interpolating the color at each coordinate.
Now, we want to create a morph sequence instead of just half face. Luckily, we already have everything needed implemented in the previous part because the half face is just the interpolated image with alpha = 0.5. In the morph sequence, we need to interpolate from 0 to 1.
Why are you so mean? What I mean by "mean face" is actually the average face across a dataset. But how to calculate that "mean face"? Surprisingly, we already have all the tool we need. We first need to calcalate the "mean face" shape. Then we can warp each triangle in the mean face basis to the bases (corresponding triangle) of each image in the dataset. We can then use the known pixel values to calculate the mean across the dataset for each coordinate. Here, we are using the data from FEI Face Database.
It is actually a face!!! It is just unbelievable!!!
Let's try to warp some images in the dataset to the mean shape.
Now, let's warp my face into the mean shape.
Who is that??? To revenge, let's warp the mean face into my shape.
As you might remember, we have been using interpolation for both shape and color. Now we want to use extrapolation to create shapes that is abnormal. Here, I am using the mean face from the dataset as the mean.
|
|
After seeing the "mean face", it's time to see happy face. Let's try to get me smile. Here, we can reuse the FEI Face Database because it has the "mean face" of smile face.
Using the mean "smile face" shape, I can make myself look happy again.
|
|
|
|