For your reference, the complete math on how to obtain the rotation parameters is detailed in Section 2.1 in here:
http://publications.idiap.ch/downloads/reports/2013/Gunther_Idiap-RR-13-2017.pdf
Just for completeness: the names "eye positions" and "FaceEyesNorm" are historical. Actually, you can choose **any** two locations which will be mapped. For example, you can use two corners of bounding boxes to be mapped to specific locations in the aligned image. I have done this in bob.bio.face, i.e., when the annotator only returned bounding boxes.
Manuel