The calibration method of the circle-structured light measurement system for inner surfaces considering systematic errors

Light plane deviation and motion direction deviation of stage systems are the two main sources of systematic errors in circle-structured light inner surface measurement systems. In this paper, we propose a new two-step calibration method to compensate these systematic errors. In the first step, a more accurate initial light plane calibration result is obtained by multi-position binocular-structured light calibration. Then, in the second step, the initial result is optimized by measuring the inner radius of a standard ring gauge to obtain the optimal light plane calibration result. Based on this result, the real motion direction is also calibrated by optimization using the inner surface scanning measurement data of the standard ring gauge. The proposed method improves the system calibration accuracy through the second calibration step, making it convenient to operate without using complex calibration targets or expensive equipment. Therefore, this calibration method has the potential to be used in actual measurements. The experimental results show that the mean relative measurement error can reach 0.015% in our homemade measurement system and validate that the measurement system calibrated by our proposed method realizes high-precision and high-repeatability measurements for inner surfaces.


Introduction
With the progress of manufacturing technology, many parts with special inner surface structures are manufactured and used in energy engineering, chemical industry, aerospace and Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. other fields [1]. The inner surfaces are designed to contain grooves, freeform surfaces, holes or other structures to meet their usage requirements, and their machining quality directly affects work performance [2][3][4]. Therefore, it is important to find a reliable and accurate three-dimensional (3D) inner surface measurement method for quality inspection [5,6]. To realize inner surface measurement, researchers have proposed several methods, such as contact measurement [7], the laser ranger finder [8], multi-color digital holographic inspection [9,10], white light interferometry [11] and circle-structured light measurement [12,13]. Among them, circle-structured light measurement is a special kind of structured light measurement method that uses laser triangulation. Compared to common point-or line-structured light measurement methods [14,15], it can directly form a 360 • projection light stripe on an inner surface and measure the whole inner surface with high efficiency and without complicated operations or using a complex system structure [16]. However, the measurement accuracy of the circle-structured light system is mainly affected by two sources of systematic error: light plane deviation and motion direction deviation of the stage system. Therefore, these systematic errors need to be calibrated and compensated for to ensure measurement accuracy.
The light plane deviation caused by assembly errors in the structured light generator mainly leads to low measurement accuracy, so there are many reports on circle-structured light calibration methods to compensate for this systematic error. These methods can be divided into three categories. Firstly, the calibration method based on vision measurement principle by Wang et al [17] used a concentric circle coplanar reference object to calibrate the circle-structured light plane based on the cross-ratio invariance. This method requires a high-precision stage to move the reference object along the axis of the circlestructured light. Zhu et al [18,19] proposed the binocularstructured light calibration method. The camera in the system and another auxiliary camera form a binocular system to obtain the coordinates of light stripes formed by a blank planar board intersecting the structured light to fit the light plane parameters. This method has a low demand on instruments and is easy to operate. However, in [19], the binocular observation range of the structured light plane during calibration is limited by the system structure, leading to a relatively low measurement repeatability. Secondly, the calibration method using calibration targets from Zhuang et al [20] calibrates the system by measuring a standard ring gauge and comparing the result with its reference radius. This method requires strict parallel between the main axis of the measurement system and the axis of the ring gauge, which is difficult to implement. Buschinelli et al [21,22] calibrated their system to measure an inner stepped cylindrical gauge with 28 different diameter regions to obtain a polynomial relation between the pixel radius of ring light stripes and the real radius. The inner surface is calculated according to this relation. This method relies on a high-precision calibration target with a complex structure and its operation is intricate. Thirdly, a method utilizing other measurement equipment by Zhang et al [23,24] used two electric theodolites to measure the coordinates of light spots formed by intersecting a thin thread with structured light to fit the light plane. This method has relatively high calibration accuracy but requires expensive instruments. Existing methods have defects such as complicated calibration operations, reliance on special equipment and relatively low calibration accuracy, making these methods difficult to use in industrial applications while maintaining measurement precision. Thus, it is necessary to find a low-cost and convenient structured light calibration method for high-precision measurements.
A circle-structured light system usually needs to be driven by a linear stage to scan the inner surface. In most studies, reconstructing the scanned and measured inner surface is under the default assumption that the motion direction of the stage is parallel to the main axis of the measurement system. Therefore, the systematic error in the deviation between two directions is ignored, which affects measurement accuracy. Fang et al [25] found that systematic errors in the motion shaft system of the structured light scanning measurement system cause the adjacent scanning data to appear as spatial displacement. However, the calibration method for this systematic error has not been well studied yet in for circle-structured light measurement systems, and this problem needs to be solved to ensure the scanning measurement accuracy.
In this paper, we researched high-precision inner surface measurement using a circle-structured light system and a circle-structured light system was built to meet the actual measurement applications. To realize high-precision measurements, we propose a new two-step system calibration method for the circle-structured light system to compensate for the systematic errors from the two sources mentioned above. In the first step, multi-position binocular-structured light calibration is conducted to obtain a more accurate initial calibration result based on a larger observation range of the light plane. Then, in the second step, the system measures the standard ring gauge to further improve the system calibration accuracy. The initial light plane calibration result is optimized using the radius measurement results of the ring gauge placed at different random positions and orientations to obtain the optimal calibration result. Using this result, the motion direction is calibrated by optimization using the inner surface scanning measurement data of the ring gauge to compensate for the systematic errors in reconstructing the scanned surface. In this new method, the optimization process using the standard ring gauge measurement data in the second step can reduce the influence of the binocular measurement error on structured light calibration in the first step to ensure system calibration accuracy. Meanwhile, this method can be implemented easily without using complex calibration targets or expensive equipment. Therefore, the proposed calibration method can help measurement systems achieve high-precision measurements in industrial applications. The experiments were carried out on our homemade measurement system, and the results demonstrate that the new calibration method can ensure system measurement accuracy in real measurement applications.

Model of the measurement system
A model of the circle-structured light measurement system is shown in figure 1, O c -x c y c z c is the camera coordinate system, which is taken as the measurement coordinate system. z c is the main axis of the system and the axis of the structured light generator is aligned with it. The beam emitted by the laser is reflected by the conical reflector to generate circle-structured light, and it intersects with the inner surface to form a ring light stripe that is captured by the camera. The light stripe image is processed by the upper system to obtain the surface measurement result by the laser triangulation algorithm. The whole system is mounted on a linear stage. As shown in figure 1, P is a point on the position where the structured light intersects the inner surface. In the system model, the camera uses a pinhole model to describe the projection relationship between object points and image points. It is assumed that the coordinates of P are (x,y,z) T in the camera coordinate system, and that the homogeneous coordinates of the image point P ′ is (u,v,1) T . The relationship between P and P ′ can be expressed as follows: In equation (1), ρ is a scale coefficient and A is the intrinsic matrix of the camera. The matrix elements are shown in equation (2). f x and f y are the principal distances of the camera in X-axis and Y-axis directions, and (u 0 , v 0 ) are the coordinates of the principal point. α is the camera skew parameter. The equation of the circle-structured light plane in the camera coordinate system can be expressed as follows: In equation ( (1) and (3), the laser triangulation algorithm under ideal conditions can be obtained as shown in equation (4). If the parameters are determined, the coordinates of P can be obtained by solving the equation set in equation (4): Driven by the linear stage, the measurement system can measure the entire inner surface of the measured parts, and the 3D profile of the measured inner surface is reconstructed along the motion direction of the stage. The parameters in equation (1) are obtained through Zhang's camera calibration method [26], and the structured light parameters and the motion direction are calibrated by our proposed method, as explained in the next section.

The two-step system calibration method
In this paper, we assume that the measurement accuracy is mainly influenced by the light plane deviation caused by assembly errors in the structured light generator and the motion direction deviation of the linear stage. In order to improve the measurement accuracy, we propose a new twostep system calibration method to calibrate the light plane parameters and the motion direction of the stage to compensate for these systematic errors. The process of the new method is shown in figure 2. The initial light plane parameters are obtained in the first step and then optimized in the second step to improve the calibration accuracy. Based on the optimized light plane calibration result, the motion direction is also calibrated in the second step. In order to better demonstrate our calibration method, this section will introduce the structured light and the motion direction calibration process, respectively.

The circle-structured light calibration
For the structured light calibration, the initial calibration result is obtained by the multi-position binocular-structured light calibration to acquire a more accurate initial result in the first calibration step. First, the camera parameters of the system camera and the auxiliary camera are calibrated by Zhang's method [26]. During the multi-position binocular-structured light calibration, keeping the measurement system stationary, the auxiliary camera is moved to K different positions (K ⩾ 2). The binocular-structured light calibration is carried out at each position to avoid the interference of the system structure, to observe a larger range of the light plane and to acquire more calibration points. First, the binocular relation between the system camera and the auxiliary camera is acquired through stereo calibration at each position. A blank planar board is placed to intersect the light plane forming a line light stripe Step 2 on it. Two cameras capture images of the light stripe simultaneously; then, the board is moved to another random position. This step is repeated M times (about 10-15 times). The central points of the light stripes are extracted as calibration points and their spatial coordinates are calculated by the binocular intersection algorithm. Then, the coordinates of the calibration points from K experiment positions are unified into the measurement coordinate system and used to fit the structured light plane parameters. The mathematical model of the calibration experiment in one position is shown in figure 3. P represents the circlestructured light plane and B represents the planar board placed in different orientations and positions, such as B i . O L -x L y L z L and O R -x R y R z R are the system camera and the auxiliary camera coordinate system. O L -x L y L z L is also the measurement coordinate system. L p and R p are the image planes of the two cameras. z L and z R are the optical axes of the two cameras. O l -u l v l and O r -u r v r represent the image coordinate systems of the two cameras. The structured light plane intersects the board placed in position B i and the light stripe L i is formed on it. Assuming that P ic is a central point on L i , the light stripe is projected onto the image planes of the two cameras and p cl and p cr are the projection points of P ic .
Computing the rectified images of the two cameras, represent the two camera coordinate systems after epipolar rectification. It is assumed that the camera intrinsic matrix used in rectification is A, and p cl and p cr are transformed to p cl and p ′ cr in the rectification process. T represents the translation vector of a binocular vision system. The coordinates of P ic in O L -x ′ L y ′ L z ′ L can be calculated by equation (5): The coordinates of the calibration points are located in the respective coordinate system O L -x ′ L y ′ L z ′ L after epipolar rectification at the K calibration positions, so the coordinates need to be unified into the measurement coordinate system O L -x L y L z L . Equation (6) represents the unified method. P k ic are the coordinate of P ic in the measurement coordinate system, and R k Lr represents the epipolar rectify matrix of the system camera in the kth binocular-structured light calibration: Assuming that the coordinates of P k ic are (x k i , y k i , z k i ) T , the least squares method is applied to calculate the structured light plane parameters, as shown in equation (7): However, this calibration result is not accurate enough to satisfy the requirements of high-precision 3D profile measurement of the circle-structured light system because the binocular measurement error will influence the calibration accuracy. Therefore, in the second calibration step, the system is used to measure the inner radius of a standard ring gauge to obtain the optimal light plane calibration result.
The inner surface of the standard ring gauge can be considered as an ideal cylindrical surface, and the intersection line of the light plane and the inner surface is an ellipse on the light plane, whose minor axis length is the inner radius measurement result [27]. However, the minor axis length of the ellipse generated by the intersection of any structured light plane and the standard ring gauge is fixed, so the ring gauge must be measured in N (N is about 10-15) different random positions and especially at different random orientations to ensure the  The calibration result from the first step is optimized to improve the calibration accuracy using the inner radius measurement results and the reference radius R of the ring gauge using the Levenberg-Marquardt (LM) method [28]. The object function used in optimizing structured light plane parameters is represented in equation (8): In this function, (A B C D) are parameters of the light plane parameters waiting for optimization using the pixel coordinate sets p i and the intrinsic matrix A L of the system camera. We used solve (p i , A L , A, B, C, D) to represent the process of calculating the inner radius measurement result. In this process, the spatial coordinate set P i of the central points is calculated firstly using pixel coordinates set p i and the intrinsic matrix A L by laser triangulation. Then, P i is used to fit the ellipse equation by the least squares ellipse-fitting method [29], and the inner radius measurement results R i can be calculated by using ellipse equation parameters. The deviation between R i and the reference radius R of the ring gauge is used as the object function to optimize the parameters (A B C D).
The structured light calibration in our method only uses an auxiliary camera, a blank planar board and a standard ring gauge without using specially designed calibration targets and expensive equipment. The calibration operation is convenient and efficient to realize high-precision calibration. There is no requirement to know the position and orientation of the board and the ring gauge exactly during the calibration process, and no need for the measurement system to maintain a specific position relationship with the ring gauge during calibration. Therefore, this method is suitable for actual measurement applications.

Stage motion direction calibration
Using the optimized structured light parameters, the real motion direction is also calibrated in the second calibration step by optimization process using the inner surface scanning measurement data of a standard ring gauge. In real measurements, the inner surface is reconstructed along this direction to ensure the scanning measurement accuracy and compensate for the systematic error.
In most studies, when reconstructing the inner surface by scanning measurement, the movement direction of the linear stage is parallel to the main axis of the measurement coordinate system. The measured surface is reconstructed by adding the measured data obtained in each step and its measurement position along the main axis direction. However, in practice, there is a deviation between the motion direction of the stage and the main axis direction caused by assembly errors between the system and the linear stage. Thus, the surface scanning measurement accuracy will inevitably decrease under the influence of this systematic error. A mathematical model of the inner surface scanning measurement process including this systematic error is shown in figure 5.
OO ′ is the axis of the measured inner surface. O c -x c y c z c is the measurement coordinate system and z c is the main axis of the measurement system. Vector M is the motion direction of the linear stage, and the measurement system moves along M which represents that the stage drives the system to scanning measure the inner surface. z c is not parallel to vector M in this model representing this systematic error. In the model, the measurement system moves from position 1 to position 2 in step interval H, and measures the inner surface in two positions. L 1 and L 2 are intersecting lines of the light plane and the surface in two positions. It is assumed that the coordinates of one point on L 2 are (x 2 , y 2 , z 2 ) T , and the unit vector of motion direction M is [m, n, t] T in the measurement coordinate system. As shown in the model, if the inner surface is to be reconstructed precisely, the motion direction should be known. The coordinates of P after reconstruction are calculated by the following equation: In the second calibration step, the inner surface of the standard ring gauge is regarded as an ideal cylinder surface, and the measurement system is controlled by the stage to move forward to scanning measure the inner surface of a standard ring gauge in N steps with the step interval H. The ring gauge only needs to be scanning measured once, and can be placed at random positions and orientations during calibration. The motion direction is obtained by the LM method using the scanning measurement data and the reference radius R of the ring gauge, and equation (10) is the object function in the optimization. In this function, M is the motion direction that needs to be optimized, and the scanning measurement data are used to reconstruct the inner surface along the direction M by equation (9). n k is the point number of the measured data set at each Because the spatial equation of the measured cylinder inner surface is unknown, W and S will also be calculated in the optimization process with the motion direction. The deviation value calculated by the object function will be used in the optimization calculation to acquire the calibrated motion direction M. The dot product result between the calibrated direction M and the positive direction of the main axis of the measurement system is >0: In our proposed calibration method, the motion direction calibration operation is simple and it is not necessary to know the position and orientation of the ring gauge during calibration. Meanwhile, the method is highly efficient and it only takes a short time to complete the motion direction calibration. This method can be applied conveniently in actual measurements. Figure 6 shows the design model and physical map. As illustrated, the light generator is composed of a 632 nm wavelength laser diode and a 90 • conical reflector, which is fixed on a transparent optical grade acrylic board with 5 mm thickness through connector parts. A monochrome 10 M pixel CCD camera with a 16 mm camera lens is installed in the system as  the system camera. The entire measurement system is mounted on a linear stage whose travel range is 300 mm with a stepper motor. Its minimum step interval is 1 µm. The captured images are transferred to the PC via a USB 3.0 cable and then processed in Matlab. A motion control card is used to control the stepper motor and read the motion position feedback.

Simulation experiment
Before the actual calibration experiment, the effect of the parameter optimization on the calibration described in section 3. The simulation experiment is divided into two groups. In the first group experiment, the system measures the inner radius of an 80 mm radius ring gauge placed at 10 different random positions with the same orientation. In the second group experiment, the system measures the same ring gauge placed at 10 different random positions with different random orientations. The coordinates of the intersecting points between the light plane and the inner surface are calculated, and the image pixel coordinates are calculated by the pinhole model of the system camera built according to the camera type and camera lens type in real system. Gaussian noise with 0.1 variance is added to the pixel coordinates to simulate the calculation error in extracting the central points of the ring light stripes.
Five initial structured light parameters to be respectively optimized using the simulation data of the two experimental groups are randomly preset to represent the results of the parameters obtained from the multi-position binocular-structured light calibration. The optimization results of two simulation experiment groups are shown in table 1. It can be seen that the optimization results of the second experiment group are obviously close to the true value, which proves the reliability of the optimization process. However, the results of the first experimental group are not close to the true value from different initial parameters because the minor axis length of the ellipse generated by the intersection of any structured light plane and the standard ring gauge is fixed. A comparison of the results of the two experimental groupsindicates that the optimization cannot guarantee the uniqueness and correctness of the optimized light plane parameters if the ring gauge does not change its orientation during the calibration process. Therefore, the ring gauge must be measured in different orientations in real calibrations. Next, the motion direction calibration process described in section 3.2 is verified by a simulation experiment. The motion direction of the stage is preset with the direction deviation from 0 • to 15 • representing the systematic error of the motion direction deviation of the linear stage. The simulation scanning measurement data of the inner surface of an 80 mm radius ring gauge in 0.1 mm step is calculated and Gaussian noise with 0.1 variance is added to the data. The motion direction of the stage is obtained through an optimization process using simulation data, and the correctness of the optimization algorithm is verified by comparing it with the preset and the optimized directions. Five simulation experiments are carried out, and different motion directions are preset in them. The main axis direction of the measurement system [0, 0, 1] T is as the initial value in optimization, and the optimization results are shown in table 2. The deviation between the optimized motion direction and the preset direction is about 0.01 • , which indicates that this calibration method can accurately acquire the actual motion direction.

Calibration experiment
After the simulation experiments, an actual experiment is carried out to verify the effectiveness of our two-step calibration method. As shown in figure 7(a), an auxiliary camera of the same type as the system camera is used in the first calibration step. The planar board is made by coating alumina on a normal glass board and its roughness is about 5 µm. According to the calibration process described in section 3.1, the multi-position binocular-structured light calibration is carried out on the left side (position 1) and the right side (position 2) of the system. The light stripe images taken during calibration and the central points of the light stripe extraction results are shown in figure 7(b). The coordinates of the calibration points in two positions are unified into the measurement coordinate system, and light plane parameters are fitted. The fitting results are shown in figure 8. The initial calibration result is [0.0342, 0.0210, 0.9992, 303.10], and the root-meansquare error of fitting is 0.0586 mm.
Then, the inner radius of the standard ring gauge with the reference radius 79.998 mm is measured by the system to optimize this initial result in the second calibration step, as shown in figure 9(a). It is mounted on a rotation stage that is used to change the position and orientation of the ring gauge. The system is used to measure the inner radius of the ring gauge placed in 10 random different positions and orientations, and the initial results are optimized to improve the calibration accuracy. Figure 9  In order to verify the correctness of the result, we measured the inner radius of this ring gauge placed in another 10 random different positions with different orientations that ranged from −10 • to 10 • . The measurement results are respectively calculated using the structured light plane parameters obtained by the binocular-structured light calibration [19] in positions 1 and 2, respectively, by the multi-position binocular-structured light calibration and by our new calibration method. The errors of the measurement results are shown in figure 10. It can be seen that there are fewer measurement errors using parameters obtained by the multi-position binocular-structured light calibration than those using parameters obtained by the binocular-structured light calibration method, which validates that the multi-position binocular-structured light calibration can improve the calibration accuracy due to the larger observation range of the structured light plane. The mean error of the radius measurement results using parameters obtained by our calibration method is 11.5 µm with 6.8 µm standard deviation, and the average relative error is 0.015%. Compared with the results obtained by other methods, the measurement accuracy and repeatability have been improved by the new calibration method in our homemade system.
After the structured light calibration, the motion direction of the stage is calibrated in the second calibration step. In the experiment, the stage drives the system to measure the 10 mm inner surface in 0.5 mm step intervals of the same standard ring gauge, and its motion direction is acquired through the optimization process introduced in section 3.2. The calibration result is M = [0.0566, −0.0080, 0.9984] T . To verify the correctness of this result, the 10 mm inner surface of the ring gauge placed in five random different positions and orientations is measured in 0.5 mm step intervals. Five groups of measured data are respectively recovered along the main axis direction of the system and the calibrated motion direction M, and the inner radius measurement results are calculated by the cylinder fitting [30]. The results are shown in table 3, and demonstrate that the radius measurement results are more accurate using the calibrated motion direction to reconstruct the inner surface.
The measurement results of the third group are selected to register with the model of the ring gauge to analyze the measurement error distribution. The error distribution of the reconstructed surfaces along the default direction and the calibration direction is shown in figure 11. From the results, it can be seen that motion direction calibration can ensure surface reconstruction accuracy in scanning measurement and effectively compensate the systematic errors.  After calibration, the system is used to scanning measure the inner surface of the ring gauge fixed at a random position five times to verify the measurement repeatability. The error distribution of these five measurement results is shown in figure 12. It can be seen that the error distribution and measurement deviation are similar in the five results, proving the high measurement repeatability of the system.

Measurement application
In the calibration experiments, the results proved that the system can realize high-precision and high-repeatability measurements after using the proposed calibration method. For actual measurement applications in industry, the calibrated system is used to inspect the machining quality of a self-lubricating bearing sleeve sample without graphite columns installed on it. As shown in figure 13(a), the reference machining precision of this sleeve is 0.05 mm and its reference inner diameter is 155 mm and it has 28 × 12 mm diameter holes in it. In the measurement, the system is moved to capture 840 images during 84 mm in 0.1 mm step to measure the inner surface of this sleeve. The measurement result consists of 557 508 points, and the error distribution of the measurement result is shown in figure 13(b). The measurement result of the inner diameter is 155.019 mm and the diameter measurement results obtained by a cylinder fitting algorithm using the measured data near holes of the 28 holes on the sleeve have 7.9 µm mean error and 8.8 µm standard deviation, as is shown in figure 13(c). The experiment result further demonstrates that the circle-structured light measurement system calibrated by our proposed calibration method can satisfy high-precision measurement requirements in actual applications, such as in industrial fields.

Conclusion
This paper proposes a new two-step system calibration method for the circle-structured light inner surface measurement system to compensate the systematic errors of the light plane deviation and the motion direction deviation. In the first step, multi-position binocular-structured light calibration is conducted to obtain a more accurate initial calibration result based on a larger observation range of the light plane without interference by the system structure. Then, in the second step, it is optimized using the radius measurement results of a standard ring gauge placed in different random positions and orientations to improve the calibration accuracy. Using this optimized result, the motion direction is also calibrated by optimization using inner surface scanning measurement data of a standard ring gauge to make a further improvement on the scanning measurement accuracy. In this method, the system calibration accuracy is improved by an optimization process using the standard ring gauge measurement data in the second step to reduce the influence of the binocular measurement error in the first calibration step. Meanwhile, the proposed method is easy to implement in actual applications to realize high-accuracy measurements without intricate calibration operations. In addition, this method only needs another camera, a blank planar board and a standard ring gauge. It does not require complex calibration targets or other expensive equipment. In our homemade system, the experimental results show that the mean relative measurement error can reach 0.015%, which validates that the system can realize high-precision and high-repeatability inner surface measurement via the proposed two-step calibration method in actual measurement applications. The new calibration method means that circle-structured light systems can potentially meet industrial measurement demands with high accuracy.