Here, I present two images where I marked points, along with the triangulation of these points.
In one instance, I used `middle_points`, which are the average values of all points between the two images, and in the other instance, I used their respective points. It is evident that the triangles generated using `middle_points` slightly deviate from the features of the person, for example, the point that should be at the end of the eyebrow appears between the eyebrows. I used images of me and my mother, and I think this shows that except for the eyebrows, our overall facial features are similar, such as the positions of the eyes, nose, and mouth on the face.
To compute the mid-way face between me and my mother, I followed the instructions and completed the following steps:
Using the warp function from Part 2, I implemented another function: `morphed_im = morph(im1, im2, im1_pts, im2_pts, tri, warp_frac, dissolve_frac);` This function allows me to generate a warped image with different warp_frac and dissolve_frac. By stitching these images together, I created a GIF showing the morphing process from my image to my mother's image.
In this part, I used facial images and point data from the `FEI Face Database` to calculate the mean face. While processing the images, I found that adding four points at the corners of the image helps with warping.
When I warped my image to the average face, I noticed my face stretched out. Similarly, when I warped the average face onto my face, the distances between my facial features shrunk.
For this part, to create a caricature effect, I first computed the shape difference between my face and the average face, i.e., the difference in the key feature points. Then, I used a scalar value (alpha) to exaggerate the differences. Based on the newly generated caricature points, I warped the image to get the final effect.
I found an average male face from China on the web. After aligning my face and the average male face, I used the morph function to create images morphing just the shape, just the appearance, and both.