Face Alignment and Chipping:
Face alignment is critical for the accuracy of our face recognition
software. As a result, prior to chipping the individual seal faces, we
aligned them using the manually tagged eye locations in each photo by
performing in-plane rotation to align the eyes along the x-axis. Once
the eyes are manually located in each photo, the GUI automatically
aligns and chips the faces to the desired size (e.g., 112x112 pixels).
We followed an approach similar to that used by the developers of
LemurFaceID to align faces: Given \((l_{x},\ l_{y})\) and\((r_{x},\ r_{y})\) to be the center of the left and right eyes
respectively, one can calculate the rotation matrix M to be used
in an affine transformation of the image. Let\(x=\frac{l_{x}\ +\ r_{x}\ }{2}\)and\(y=\ \frac{l_{y}\ +\ r_{y}\ }{2}\) and\(\theta=atan(\frac{r_{\text{y\ }}-\ l_{y}}{r_{x}-l_{x}})\), so\((x,\ y)\) will be the location of the midpoint between the centers of
the two eyes and \(\theta\) be the rotational angle. Then M will
be calculated as: