## 2 Principle
### Methods
#### 2.2.2 Photogrammetric Method Based on Zhang's Technique (PM)  
In PM, the camera's internal and external parameters are calculated from feature points with known world coordinates and corresponding image coordinates. As a result, external parameters (rotation matrix \(R\) and translation vector \(T\)) are obtained using calibration technology. Assuming that the world coordinates of the point \(M=(X_{W}\), \(Y_{W}\), \(Z_{W}\), \(1)^{T}\) and its image coordinates \(m=\left(u,\,v,1\right)^{T}\) are known, the relationship between M and m can be described as  
\[s\left[\begin{array}{c}u\\ v\\ 1\end{array}\right]=\left[\begin{array}{cccc}f_{x}&\alpha&u_{0}&0\\ 0&f_{y}&v_{0}&0\\ 0&0&0&0\end{array}\right]\left[\begin{array}{cc}R&T\\ 0^{T}&1\end{array}\right]\left[\begin{array}{c}X_{W}\\ Y_{W}\\ Z_{W}\\ 1\end{array}\right]=A\left[\begin{array}{cc}R&T\\ 0^{T}&1\end{array}\right]\left[\begin{array}{c}X_{W}\\ Y_{W}\\ Z_{W}\\ 1\end{array}\right], \tag{5}\]  
where \(f_{x}\) and \(f_{y}\) are the equivalent focal lengths in pixels along the \(x\) and \(y\) directions, \(\alpha\) is a skew factor, and \(\left(u_{0},\ v_{0}\right)\) are the coordinates of the principal point. These parameters are called the camera intrinsic parameters \(A\). The rotation matrix \(R\) and translation vector \(T\) are the external parameters. In [PERSON]'s method [17], assuming the coordinates of a point are \(M_{c}\) in the camera coordinate system and \(M_{w}\) in the world coordinate system, the relationship between \(M_{c}\) and \(M_{w}\) is expressed by the following equation:  
\[M_{c}=RM_{W}+T, \tag{6}\]  
The coordinates of the projection center in the camera coordinate system are \(\left(0,0,1\right)\), and its world coordinates can be obtained by the following equation,  
\[M_{W}=R^{-1}(M_{c}-T).\]In [PERSON]'s method [10], which can achieve a high measurement accuracy, a checkboard is displayed on another LCD screen with several different orientations, the camera takes pictures of the checkboard in different poses, and matrix \(A\) and \([R\ T]\) are obtained with the calibration toolbox [29]. Hence, Equation (8) can be obtained by substituting \(M=(X_{W},\ Y_{W},\ Z_{W},\ 1)^{T}\) in Equation (5) with \(M=[x_{m},y_{m},0,1]^{T}\):  
\[s\left[\begin{array}{c}u\\ v\\ 1\end{array}\right]=A\left[\begin{array}{cc}R&T\\ 0^{T}&1\end{array}\right]\left[\begin{array}{c}x_{m}\\ y_{m}\\ 0\\ 1\end{array}\right]=A\left[\begin{array}{cc}r_{1}&r_{2}&t\end{array}\right] \left[\begin{array}{c}x_{m}\\ y_{m}\\ 1\end{array}\right]=H\left[\begin{array}{c}x_{m}\\ y_{m}\\ 1\end{array}\right]. \tag{8}\]  
It is worth noting that the last pose of the checkerboard plane is located at the identical position as the SUT for getting rid of misalignment, as it makes the local coordinate system on the last checkerboard parallel to each axis of the global coordinate system. Since \(H\) is a homography matrix in Equation (8), the mirror pixel coordinates can be determined using the following equation:  
\[\left[\begin{array}{c}x_{m}\\ y_{m}\\ 1\end{array}\right]=sH^{-1}\left[\begin{array}{c}u\\ v\\ 1\end{array}\right]. \tag{9}\]  
In addition, the system errors can be eliminating by measuring a high-quality reference surface that has a known shape and is aligned at an identical position to the SUT [10]. This measurement can be mathematically stated as follows:  
\[P_{t}-P_{r}+I_{r}=(I_{t}+error\_t)-(I_{r}-error\_t)+I_{r}\approx I_{t}, \tag{10}\]  
where \(P_{t}\) and \(P_{r}\) are the measurement of the SUT and the reference surface, respectively, and are directly obtained from the PMD measurement method, which contains the system errors \(error\_t\) and \(error\_r\), respectively. \(I_{t}\) is the measured surface shape of the test flat after the system errors are eliminated. \(I_{r}\) is the surface shape of the reference element and can be measured by Fizeau interferometer.