March 2019
Intermediate to advanced
538 pages
13h 38m
English
Although we have already removed most of the image background, forehead, and hair when we did the geometrical transformation, we can apply an elliptical mask to remove some of the corner regions, such as the neck, which might be in shadow from the face, particularly if the face is not looking perfectly straight toward the camera. To create the mask, we will draw a black-filled ellipse onto a white image. One ellipse to perform this has a horizontal radius of 0.5 (that is, it covers the face width perfectly), a vertical radius of 0.8 (as faces are usually taller than they are wide), and centered at the coordinates 0.5, 0.4, as shown in the following screenshot, where the elliptical mask has removed some unwanted corners from ...