# A Method of Free-Space Point-of-Regard Estimation Based on 3D Eye Model and Stereo Vision
## 3 Methods
### 3D Point-of-Regard Estimation
#### 3.3.1. Eyeball Features and Personal Calibration
Normalizing these two vectors, get normalized vectors \(\overset{\rightarrow}{v_{si}}\) and \(\overset{\rightarrow}{v_{oi}}\), and then defining the rotation of these two vectors by using rotation matrix. In this paper, we use \(R_{ai}\) and \(R_{\beta i}\) to represent the rotation matrix of the vector \(\overset{\rightarrow}{v_{oi}}\) around the \(X\) axis and the \(Y\) axis in the stereo camera coordinate system, respectively, obtaining:  
\[\overset{\rightarrow}{v_{si}}=R_{\beta i}R_{ai}\overset{\rightarrow}{v_{oi}} \tag{5}\]  
Then we can easily get the angle \(\theta_{i}\) (\(\alpha_{i}\), \(\beta_{i}\)) calculated in each fixation. The average value \(\theta_{0}\) (\(\alpha_{0}\), \(\beta_{0}\)) is taken as the initial value of the later optimized eyeball feature parameter:  
\[\theta_{0}=(\alpha_{0},\beta_{0})=(\frac{1}{n}\sum\limits_{i=1}^{n}\alpha_{i}, \frac{1}{n}\sum\limits_{i=1}^{n}\beta_{i}) \tag{6}\]  
In the following, we deduce the objective function for optimizing the left and right angles between the optical axis and the visual axis. Left and right eyes' angles between the visual axis and the optical axis are \(\theta_{l}\) (\(\alpha_{l}\), \(\beta_{l}\)) and \(\theta_{r}\) (\(\alpha_{r}\), \(\beta_{r}\)), the left and right eyeball centers are \(e_{l}=(x_{el},y_{el},z_{el})^{T}\) and \(e_{r}=(x_{er},y_{er},z_{er})^{T}\), and the pupil centers are written as \(p_{li}=(X_{li},Y_{li},Z_{li})^{T}\) and \(p_{ri}=(X_{ri},Y_{ri},Z_{ri})^{T}\). The normalized left and right eyes' optical axis vectors \(\overset{\rightarrow}{v_{oli}}\) and \(\overset{\rightarrow}{v_{ori}}\) can be written as follows:  
\[\overset{\rightarrow}{v_{oli}}=(X_{li}-x_{el},Y_{li}-x_{el},Z_{li}-z_{el})^{ T}=(a_{1},a_{2},a_{3})^{T} \tag{7}\] \[\overset{\rightarrow}{v_{ori}}=(X_{ri}-x_{er},Y_{ri}-x_{er},Z_{ri }-z_{er})^{T}=(b_{1},b_{2},b_{3})^{T}\]  
The normalized left and right eyes' visual axis vectors \(\overset{\rightarrow}{v_{sli}}\) and \(\overset{\rightarrow}{v_{sri}}\) can be calculated as follows:  
\[\overset{\rightarrow}{v_{sli}}=\left[ \begin{array}{c}a_{1}\cos\beta_{l}+ a_{2}\sin\alpha_{l}\sin\beta_{l}-a_{3}\cos\alpha_{l}\sin\beta_{l}\\ a_{2}\cos\alpha_{l}+a_{3}\sin\alpha_{l}\\ a_{1}\sin\beta_{l}-a_{2}\sin\alpha_{l}\cos\beta_{l}+a_{3}\cos\alpha_{l}\cos \beta_{l}\\ \end{array} \right]=\left[ \begin{array}{c}{a_{1}}^{\prime}\\ {a_{2}}^{\prime}\\ {a_{3}}^{\prime}\\ \end{array} \right] \tag{8}\] \[\overset{\rightarrow}{v_{sri}}=\left[ \begin{array}{c}b_{1}\cos \beta_{r}+b_{2}\sin\alpha_{r}\sin\beta_{r}-b_{3}\cos\alpha_{r}\sin\beta_{r}\\ b_{2}\cos\alpha_{r}+b_{3}\sin\alpha_{r}\\ b_{1}\sin\beta_{r}-b_{2}\sin\alpha_{r}\cos\beta_{r}+b_{3}\cos\alpha_{r}\cos \beta_{r}\\ \end{array} \right]=\left[ \begin{array}{c}b_{1}^{\prime}\\ b_{2}^{\prime}\\ b_{3}^{\prime}\\ \end{array} \right]\]Therefore, the spatial lines of left and right visual axis are represented by using the line's direction vector and the coordinate of the point on the line, so the coordinates of the points on the lines \(P_{li}=\left(x_{li},y_{li},z_{li}\right)^{T}\) and \(P_{ri}=\left(x_{ri},y_{ri},z_{ri}\right)^{T}\) can be represented as follows:  
\[ \begin{array}{l}\frac{x_{li}-X_{li}}{a_{1}^{T}}=\frac{y_{li}-Y_{li}}{a_{2}^{ T}}=\frac{z_{li}-Z_{li}}{a_{3}^{T}}\\ \frac{x_{ni}-X_{ri}}{b_{1}^{T}}=\frac{y_{ri}-Y_{ri}}{b_{2}^{T}}=\frac{z_{ri}-Z_{ ri}}{b_{3}^{T}}\end{array}  \tag{9}\]  
The spatial coordinate of the target being watched is defined as \(P_{oi}=\left(X_{oi},Y_{oi},Z_{oi}\right)^{T}\). When \(z_{l}=z_{r}=Z_{oi}\), it means that the intersection points of the two lines and the target plane can be written as:  
\[P_{li}=\left[ \begin{array}{l}\frac{a_{1i}^{T}}{a_{3i}^{T}}(Z_{oi}-Z_{li})+X_{ li}\\ \frac{a_{2i}^{T}}{a_{3i}^{T}}(Z_{oi}-Z_{li})+Y_{li}\\ Z_{oi}\end{array} \right],P_{ri}=\left[ \begin{array}{l}\frac{b_{1i}^{\prime} }{b_{3i}^{T}}(Z_{oi}-Z_{ri})+X_{ri}\\ \frac{b_{2i}^{T}}{b_{3i}^{T}}(Z_{oi}-Z_{ri})+Y_{ri}\\ Z_{oi}\end{array}