# Alignment Method of an Axis Based on Camera Calibration in a Rotating Optical Measurement System
## 4 Experiment
### Verification
#### 4.3.2 Camera Coordinates Registration of the Same Spatial Points Before and After Camera Rotation  
In the experiment, we compared the camera coordinates of the spatial points on the target before and after camera rotation. Employing the imaging model, as shown in Figure 1b, the coordinates of spatial point P are (\(X_{cl}\), \(Y_{cl}\), \(Z_{cl}\)) and (\(X_{cr}\), \(Y_{cr}\), \(Z_{cr}\)) in camera coordinate system \(O_{\rm{\it{c1}}}\)-\(X_{\rm{\it{c1}}}\)\(Y_{\rm{\it{c1}}}\)\(Z_{\rm{\it{c1}}}\) and \(O_{\rm{\it{c2}}}\)-\(X_{\rm{\it{c2}}}\)\(Y_{\rm{\it{c2}}}\)\(Z_{\rm{\it{c2}}}\), respectively. If the plane \(O_{\rm{\it{c}}}\)-\(X_{\rm{\it{c}}}\)\(Z_{\rm{\it{c}}}\) is parallel to plane \(O_{\rm{\it{w}}}\)-\(Y_{\rm{\it{w}}}\)\(Z_{\rm{\it{w}}}\), when the optical center coincides with the rotation center, the relationship between (\(X_{cl}\), \(Y_{cl}\), \(Z_{cl}\)) and (\(X_{cr}\), \(Y_{cr}\), \(Z_{cr}\)) is expressed by Equation (13),  
\[\left[ \begin{array}{c}X_{cl}\\ Y_{cl}\\ Z_{cl}\end{array} \right]=R_{\Theta}\left[ \begin{array}{c}X_{cr}\\ Y_{cr}\\ Z_{cr}\end{array} \right], \tag{13}\]  
where \(R_{\Theta}=\left[ \begin{array}{ccc}\cos\theta&0&-\sin\theta\\ 0&1&0\\ \sin\theta&0&\cos\theta\end{array} \right]\), and \(\theta\) is the rotation angle of the turntable. Otherwise, if the optical center deviates from the rotation center, the relationship between (\(X_{cl}\), \(Y_{cl}\), \(Z_{cl}\)) and (\(X_{cr}\), \(Y_{cr}\), \(Z_{cr}\)) should be expressed by Equation (14),  
\[\left[ \begin{array}{c}X_{cl}\\ Y_{cl}\\ Z_{cl}\end{array} \right]=R_{\Theta}\left[ \begin{array}{c}X_{cr}\\ Y_{cr}\\ Z_{cr}\end{array} \right]+T, \tag{14}\]  
where \(T\) is the translation vector between \(O_{\rm{\it{c1}}}\)-\(X_{\rm{\it{c1}}}\)\(Y_{\rm{\it{c1}}}\)\(Z_{\rm{\it{c1}}}\) and \(O_{\rm{\it{c2}}}\)-\(X_{\rm{\it{c2}}}\)\(Y_{\rm{\it{c2}}}\)\(Z_{\rm{\it{c2}}}\). We shot the checkerboard images when the camera is rotated by the turntable with a different rotation angle \(\theta_{i}\) and extracted checkerboard corners as marked points. Employing their homogeneous coordinates (\(X_{\rm{\it{w}}i}\), \(Y_{\rm{\it{w}}i}\), \(Z_{\rm{\it{w}}i}\), 1)T in the world coordinate system, image coordinates (\(u_{i}\), \(v_{i}\), 1)T, and the internal parameter matrix \(A\), the rotation matrix \(R_{i}\) and translation vector \(T_{i}\) between the world coordinate system and the camera coordinate system at different position can be obtained from Equation (1). Then the coordinates (\(X_{cl}\), \(Y_{cl}\), \(Z_{cl}\), 1)T of the marked points can be calculated by Equation (15),  
\[\left[ \begin{array}{c}X_{cl}\\ Y_{ci}\\ Z_{ci}\\ 1\end{array} \right]=\left[\begin{array}{cc}\begin{array}{cc}\begin{array}[ ]{cc}\begin{array}{cc}\begin{array}{cc}\begin{array}{cc}\begin{array}{ cc}\begin{array}{cc}\begin{array}[]in Figure 17, where the original coordinates (\(X_{cl}\), \(Y_{cl}\), \(Z_{cl}\)) are marked as red \"+\" and the resulted coordinates (\(X^{\prime}_{cli}\), \(Y^{\prime}_{cli}\), \(Z^{\prime}_{cli}\)) are marked as blue \"o\"; the circular zones are the enlarged parts. The standard deviation in the \(X_{c}\) and \(Y_{c}\) directions are shown in Table 6.  
We deviated the optical center from the rotation center and repeated the above steps. The captured target images are shown in Figure 18. When \(R_{\Theta i}\) acts on the coordinates (\(X_{crii}\), \(Y_{crii}\), \(Z_{crii}\)) (\(i=1\), \(2\), \(3\)) of the marked points, there is a significant deviation, as shown in Figure 19. The standard deviation in the \(X_{c}\) and \(Y_{c}\) directions are shown in Table 6.  
The experiments verify that our method can align the optical center with the rotation center. When the optical center coincides with the rotation center, the extracted marked points coincide with each other when \(R_{\Theta i}\) acts on the coordinates after camera rotation, and the alignment errors in the \(X_{c}\) and \(Y_{c}\) directions are quite small. Otherwise, the deviation in the \(X_{c}\), \(Y_{c}\) direction is large.