Project3 Face Morphing

In this project, we will morph a face into someone else's face(shown in a .gif file), compute the mean of a population of faces, and extrapolate from a population mean to create a caricature face.

Git

Part1. Defining Correspondences

We choose facial key points by hand and use Delaunay() to create a triangulation mesh of these points. The figure is shown as below.

2bb9db6e-f900-4cd4-a9c1-de4bd099c153

1.2

Part2. Computing the "Mid-way Face"

Then, we compute the mid-way face by first averaging the facial keypoints of two images:

MidwayPoints

Then, we use the source and destination triangles to calculate a matrix, which is used to warp the axes within the triangle. Here is what computeAffine(src_pts, dst_pys) mainly performs:

(1)A=dst_ptssrc_pts1

We wrap the triangles one by one.

The color change doesn’t require the matrix since the two images are already aligned and can be averaged directly.

06f139dc-6640-4b9c-83b6-842b47ae08b9

Part 3. The Morph Sequence

After generating the mid-face, we could generate the images, which are wrapped from image1 to image2 slowly with 0.1 steps.

6d64de69-41c2-4975-b032-1c45414e0b58

Then, use these 11 images to make a gif.

Git

Part 4. The "Mean face" of a population

Next, compute the mean face of a Brazilian population using images and key points given in their data.

e2fe3f89-2495-4b7a-8ff7-1e3a1747b18d

3b8fa837-7a8b-4bd8-b2de-824e8a2f232a

500ac6ec-c79b-4815-b67c-0ffdc918bd23

333040ef-37f7-4489-a62a-1887725db406

d9bb33a4-4e19-4d2c-b04c-8b06560f83ff

8702de76-6f8c-40d6-8184-ff10a8357f47

Then, warp my face into the average face's geometry and the average face into my face's geometry.

76eec0ce-bade-44ef-ba00-a786b45fe2eb

f94894db-eac1-422b-8013-62c7746a7e58

Part 5. Caricatures: Extrapolating from the mean

Last, I compute the difference between me and Brazil people, and times 1.5 to amplification the difference.

32dae497-4ff0-4176-9829-f4e572007910

The caricature image looks like an extra-terrestrial.