15463 Computational Photography

Project 3 - Face-Morphing

Description of Project

I used the basic 43 points to compute a delaunay triangle mesh and added 4 more points to be each of the corners. I calculated the affine transforms using barycentric coordinates.

Result 1: The affine transforms were from the first face to the second face only. Next, I iterated through each pixel of the image. For each of those pixels, I calculated what triangle it belonged to using tsearch. The triangles all came from the mean triangulation, not solely one of the two faces. After finding the triangle, I multiplied the pixel's coordinates by the appropriate affine transformation to locate where that pixel would go in the resulting image. I took image data from the same pixel in both faces to put into the morphed image

Result 2: The affine transforms were from the first face to the temporary face calculated from the warp fraction. I also made a second set of affine transforms for the second face to the warp fraction face. Next, I iterated through each pixel of the image. For each of those pixels, I calculated what triangle it belonged to using tsearch, for each of the images. The triangles still came from the mean triangulation. After finding the triangle, I calculated where the pixel should go, and made sure to keep the two faces separate.

Result 3: The affine transforms were from the first face to the temporary face calculated from the warp fraction. I also made a second set of affine transforms for the second face to the warp fraction face. Next, I iterated through each pixel of the image. This time I used inverse warping. I calculated which pixel in the original face was supposed to be located at this coordinate. I still did it separately for each of the two faces. This process took much longer than the other results.

Note: the code currently reflects what was being used for result 2, since it was faster than result 3

Face morph: Me to other student
Result 1:
Result 2:
Result 3:

I just weighted each face equally and added the values together to get the mean face

Mean face for the class

Using the method in result 2, I calculated the 60 part warp from me to the mean face. (Note: this didn't finish by midnight...)

Face morph: Me to Mean