## 3 Method
### Build the Mapping Equation  
According to the principle of camera model [50], the principle of pin-hole imaging, it can be concluded that when the eye looks at a point (\(U,V\)) on the scene plane, the eye coordinate in the shooting system to which the 3D pupil center coordinates are mapped is (\(x,y\)). Therefore, the conversion steps between pupil center coordinates (\(x_{p},y_{p},z_{p}\)) and eye diagram imaging coordinate (\(x,y\)) are as follows:  
\[ \begin{aligned} x_{pic}&=\frac{f}{z_{p}}x_{p}\\ y_{pic}&=\frac{f}{z_{p}}y_{p}\end{aligned}  \tag{8}\]  
The relationship between the coordinates of the pupil center coordinate (\(x_{p},y_{p},z_{p}\)) in eyeball coordinate system and coordinate of the projection points (\(x_{pic},y_{pic}\)) corresponding to the 2d imaging plane of the camera:  
(1) The relationship between the 2d pupil center pixel coordinates (\(x,y\)) and the projection point coordinates of the imaging plane (\(x_{pic},y_{pic}\)) :  
\[ \begin{aligned} x&=s_{x}\cdot x_{pic}+c_{x}\\ y&=s_{y}\cdot x_{pic}+c_{y}\end{aligned}  \tag{9}\]  
(2) \(s_{x}\) and \(s_{y}\) respectively indicate the number of pixel points with unit physical distance in the direction \(x\) and \(y\) of the pixel plane coordinate system, and \(c_{x},c_{y}\) represent the migration pixel coordinates generated by the coordinate origin of the projection imaging plane relative to the pixel plane. (3) Finally, substituting Equation (8) into Equation (9), we can get the expression between the pupil center coordinate \((x_{p},y_{p},z_{p})\) and the eye diagram imaging coordinate \((x,y)\):  
\[ \begin{split} x&=\frac{s_{x}\cdot f}{z_{p}}\cdot x_{p} +c_{x}=\frac{f_{x}}{z_{p}}\cdot x_{p}+c_{x}\\ y&=\frac{s_{y}\cdot f}{z_{p}}\cdot y_{p}+c_{y}=\frac {f_{y}}{z_{p}}\cdot y_{p}+c_{y}\end{split}  \tag{10}\]  
Or conversion form:  
\[ \begin{split} x_{p}&=\frac{z_{p}}{f_{x}}\cdot(x-c_{x} )\\ y_{p}&=\frac{z_{p}}{f_{y}}\cdot(y-c_{y})\end{split}  \tag{11}\]  
Let \(f_{x}=s_{x}\cdot f,f_{y}=s_{y}\cdot f\), written in matrix form:  
\[\left[ \begin{array}{c}x\\ y\\ 1\end{array} \right]=\frac{1}{z_{p}}\cdot\left[ \begin{array}{ccc}f_{x}&0&c_{ x}&0\\ 0&f_{y}&c_{y}&0\\ 0&0&1&0\end{array} \right]\cdot\left[ \begin{array}{c}x_{p}\\ y_{p}\\ z_{p}\\ 1\end{array} \right] \tag{12}\]  
After the camera model is determined, camera calibration is needed to obtain the parameters of the camera. According to the principle of \"Zhang Zhengyou calibration method\" [51], the chessboard is used as a movable calibration board to calibrate the camera. This paper uses 8 \(\times\) 8 chessboard, each grid is 25 mm \(\times\) 25 mm square, use the camera to take nine images of the board at different angles, as shown in Figure 4.  
Use the function findChessboardCorners() in OpenCV to obtain approximate data values for the corner points of the board, then use the cornerSubPix() function to calculate the exact corners, and finally draw the corners by the drawChessboardCorners() function. After finding the corners of all  
Figure 4: Camera capture chessboard image. the chessboard charts taken by the camera, the calibrationCamera() function is called to calculate the camera's internal parameter matrix. The values of \(c_{x},c_{y},F_{x},F_{y}\) are obtained according to the internal parameter matrix. These values will be used in the process of solving the mapping equation later.