|
Algorithm 1:Face size estimation algorithm. |
|
Input: the face image, the key-points detected on the face, and the estimated distance for the ears in pixels.
Output: the estimated face size as the ear-to-ear distance in millimeters.
-
1:
functionFaceSizeEstimation()
-
2:
fetch_eyes_kpts ▹ left, right eyes
-
3:
-
4:
-
5:
-
6:
for
in
do
-
7:
crop_image
-
8:
gamma_correction
-
9:
▹ use red channel only
-
10:
drn_d_22_process ▹ predicts the iris segmentation mask
-
11:
detect_hough_circle ▹ fits a circle over the segmentation mask
-
12:
▹ size of a pixel in millimeters
-
13:
if mm is not ’nan’ then ▹ estimation successful
-
14:
-
15:
-
16:
if then
-
17:
▹ average size of a pixel in millimeters
-
18:
else
-
19:
raise Exception(’Face size estimation failed!’)
-
20:
return ▹ ear to ear distance in millimeters
|