# Alignment Method of an Axis Based on Camera Calibration in a Rotating Optical Measurement System
## 4 Experiment
### Determination of the Rotation Center  
In the experiment, the camera is respectively placed at three different positions, as shown in Figure 4, where c1c2c1c1c3, c1c2 = c1c3 = 20 mm. At each initial position, the camera is rotated 16 times, for a total of 22.5 degrees with 1.5 degrees per step. Therefore, in total, 48 frame patterns will be captured during the rotation of the turntable and divided into three sets. One set of the patterns is shown in Figure 8b. The screen is placed within the depth of field of the camera lens to avoid the influence of the defocus on the calibration results. The external parameter matrices (\(\mathbf{R}\) and \(\mathbf{T}\)) are obtained by [PERSON]'s method, in which the calculated \(\mathbf{R}\) and \(\mathbf{T}\) are almost lens-distortion-free. The re-projective pixel error of the calibration results was 0.039 pixels in our experiment. From the rotation matrices obtained by the calibration, the rotation angles \(\gamma_{ix}(j)\), \(\gamma_{iy}(j)\) and \(\gamma_{iz}(j)\) (\(i=1,2,3,\)\(j=1,\)\(2,\)\(...,\)\(16\)) of the \(X_{w}\), \(Y_{w}\) and \(Z_{w}\) axes of the world coordinate system with respect to the \(X_{c}\), \(Y_{c}\) and \(Z_{c}\) axes of the camera coordinate system of the initial position can be calculated, respectively. Theoretically, if the optical axis \(Z_{c}\) of the camera at initial position is parallel to \(Z_{w}\) and the plane \(O_{c}\)-\(X_{c}Z_{c}\) is parallel to the plane \(O_{w}\)-\(Y_{w}Z_{w}\), the rotation angle \(\gamma_{iy}(j)\) should be equal to the actual rotation angle of the turntable, and the rotation angle \(\gamma_{ix}(j)\), \(\gamma_{iz}(j)=0\) when the camera is rotated around the \(Y_{c}\) axis, as shown in Figure 9a. Three sets of the angle curves are marked with a different color in the figure, where the horizontal axis represents the times of the camera's rotation, which is marked as \(N=16(i-1)+1{\sim}16i\). In fact, the rotation angles \(\gamma_{ix}(j)\) and \(\gamma_{iz}(j)\) fluctuate around 0 degree. We use \(\gamma^{\prime}{}_{ix}(j)\), \(\gamma^{\prime}{}_{iz}(j)\) and \(\gamma^{\prime}{}_{iy}(j)\) to express the calculated three rotation angles, respectively, as shown in Figure 9b. If the three angles are used to calculate the optical centers directly, the three fitted centers will not be concentric on the plane \(O_{w}\)-\(Y_{w}Z_{w}\). Figure 10a,b shows the projection of optical centers on the plane \(O_{w}\)-\(Y_{w}Z_{w}\) and the fitted trajectory, respectively. The deviations of the circle centers are large, by which the rotation center can not be found accurately. With the help of the auxiliary coordinate system \(O_{p}\)-\(X_{p}Y_{p}Z_{p}\), the optical centers can be mapped on a plane parallel to \(O_{w}\)-\(Y_{w}Z_{w}\) through the rotation matrix \(\mathbf{R}_{cp}\). In \(\mathbf{R}_{cp}\), the three rotation angles are \(\Delta\gamma_{ix}(j)=\gamma^{\prime}{}_{ix}(j)-\gamma_{ix}(j)\), \(\Delta\gamma_{iy}(j)=\gamma^{\prime}{}_{iy}(j)-\gamma_{iy}(j)\) and \(\Delta\gamma_{iz}(j)=\gamma^{\prime}{}_{iz}(j)-\gamma_{iz}(j)\). After the angle correction with \(\mathbf{R}_{cp}\), the optical centers calculated by Equation (7) are unified to the same world coordinate system. Three sets of the optical centers and the fitted circular arcs with different radii on the \(O_{w}\)-\(Y_{w}Z_{w}\) plane are shown in Figure 11a,b. Employing the optical center coordinates, the distance among c1, c2 and c3 are calculated, c1c2 = 20.16 mm and c1c3 = 20.08 mm. The errors of the distance are 0.78% and 0.42%, respectively. The fitting results and the root mean square error (RMSE) of the three groups aredisplayed in Table 3. The average value of the three fitted centers is \(\overline{O}_{r}\) = (\(-55.20\), \(961.67\)) mm, which is regarded as the initial value of the rotation center.