# Alignment Method of an Axis Based on Camera Calibration in a Rotating Optical Measurement System
## 2 Principle
### Imaging Model  
First, we give an introduction about the imaging model of the rotating optical measurement system. As shown in Figure 1b, \(O_{r}\) is the rotating axis, P is a point on the target, and P\({}_{1}\) and P\({}_{2}\) are its imaging points when the camera is rotated to Position 1 and Position 2. \(O_{c1}\) and \(O_{c2}\) are the optical centers for the two shots, respectively. \(\overline{O_{c1}Z_{c1}}\) and \(\overline{O_{c2}Z_{c2}}\) are the optical axis directions of the camera, \(O_{r}\)-\(u_{i}v_{i}\) (\(i=1,2\)) are the image coordinate systems, and the origin is \(O_{i}\). The rotating angle between \(\overline{O_{r}O_{c1}}\) and \(\overline{O_{r}O_{c2}}\) is \(\theta\); that is, \(\angle O_{c1}O_{r}O_{c2}=\angle O_{1}O_{r}O_{2}=\theta\). \(\overline{O_{c1}O_{1}}=\overline{O_{c2}O_{1}}=f\), where \(f\) is the focal length of the camera. If the optical center deviates from the rotation axis of the turntable, \(O_{c1}\) and \(O_{c2}\) should be on a circle centered on the rotation center; that is, \(\overline{O_{r}O_{c1}}=\overline{O_{r}O_{c2}}=r\), where \(r\) is the radius of the circle. When the optical center coincides with the rotation center, \(r\)\(\rightarrow\)0. The positions of the rotation center and optical centers can be obtained with our method. They can be used to guide the alignment of the optical center and rotation center by adjusting the distance and direction of the camera movement. The details will be presented in the next sections. Figure 1: (**a**) Schematic diagram of the rotating optical measurement system; (**b**) schematic diagram of the imaging model. Theoretically, the sequential positions of the optical centers should be located at the whole circle as evenly as possible when the camera is rotated by the turntable. However, the obtained positions could only be located at a small arc of the circle, because it is almost impossible to provide a very large and circular calibration target. In order to improve the calculation accuracy of the rotation center, the camera is moved to different positions to collect multiple groups of images to obtain multiple sets of optical centers. Only if the turntable plane is parallel to the plane \(O_{w}\)-\(Y_{w}Z_{w}\) and the optical axis of the camera is perpendicular to the target at each initial position, the motion trajectory of the optical center is on the concentric circular arc parallel to \(O_{w}\)-\(Y_{w}Z_{w}\). However, for an actual rotating optical measurement system, the above conditions may not be met in the calibration process, which makes the obtained fitted circles not concentric. For overcoming the problem, we introduced an auxiliary coordinate system, \(O_{p}\)-\(X_{p}Y_{p}Z_{p}\). The relationship between \(O_{p}\)-\(X_{p}Y_{p}Z_{p}\) and \(O_{w}\)-\(X_{w}Y_{w}Z_{w}\) is depicted in Figure 2. The auxiliary coordinate system helps us map the multiple sets of optical centers to the plane parallel to \(O_{w}\)-\(Y_{w}Z_{w}\) to find out the rotation center by fitting planar concentric circles. Here, we emphasize the four coordinate systems used in the calibration for clarity. 1. World Coordinate System \(O_{w}\)-\(X_{w}Y_{w}Z_{w}\) is a right-handed (\(X_{w}\)-\(Y_{w}\)-\(Z_{w}\)), orthogonal, three-dimensional coordinate system, whose original point \(O_{w}\) is established on the upper left corner of the fixed checkerboard plane; that is, \(Z_{w}=0\) for points on the fixed checkerboard plane. The world coordinate system is selected as reference coordinate system during calibration. 2. Image Coordinate System \(O_{i}\)-\(u_{i}v_{i}\) is an orthogonal coordinate system fixed in the image plane of the camera, where the \(u_{i}\) and \(v_{i}\) axes are parallel to the upper and side edges of the sensor array, respectively, and the origin \(O_{i}\) is located at the upper left corner of the array. 3. Camera Coordinate System \(O_{ci}\)-\(X_{ci}Y_{ci}Z_{ci}\) is a right-handed (\(X_{ci}\)-\(Y_{ci}\)-\(Z_{ci}\)), orthogonal coordinate system.