Method to produce consistent face texture
The present invention provides a method for the 3D scanning of a person's head.
1. A method for detecting the frontal face of a person, comprising the steps of:
a) producing a rectangle containing a face;
b) determining a depth sub-image for the rectangle;
c) computing a background mask as a region with invalid depth or where depth values differ from median face depth by more than a predetermined threshold;
d) counting the number of pixels in the background mask in the left half of the rectangle and the number of pixels in the background mask in the right half; and
e) determining whether the face is frontal by calculating the ratio between the minimum count of pixels and the maximum count of pixels with Laplace smoothing, wherein if the ratio is below a predetermined threshold the face is not frontal.