A Vision Measurement Method for the Gear Shaft Radial Runout With Line Structured Light

The gear shaft needs to measure its radial runout for straightening before finishing, while it is difficult to measure the gear shaft radial runout without rotating the gear shaft by the existing measurement technology, which results the measurement inefficient. Present work puts forward a method of measuring a gear shaft radial runout with line structured light vision. This method can measure the radial runout value and direction online for straightening the bending of the gear shaft. The center position of the gear shaft cross section is obtained by the ellipse geometric fitting on the laser plane to eliminate the influence of projection distortion. The measurement method is tested by a specialized experiment, and the experimental results show that measurements of the method meet the requirements of straightening the gear shaft. The method can realize online measurement of the gear shaft radial runout just by a single image without rotating the gear shaft, so it features fast measurement compared with the existing measurement technology.


I. INTRODUCTION
Gear shafts will bend during heat treatment. The bending of the gear shafts will affect the subsequent processing and application. Therefore, it is necessary to measure this bending to straighten the gear shafts.
Measuring the bending of a gear shaft is to measure the radial runout value and direction on the cross section of the gear shaft. When the displacement sensor is used to measure the gear shaft radial runout, the gear shaft needs to rotate and the measuring rod is kept in contact with the gear shaft journal. Therefore, this measurement is inefficient due to the rotation of the gear shaft. Pei et al. [1] measured the relative distance change of gear tooth tips by a laser ranging sensor when the gear shaft rotates, then the gear shaft radial runout can be obtained by iteration of Jacobian gradient matrix. However, since the number of the gear teeth has influence on the sampling frequency of the sensor, the gear shaft can only rotate at low speed, which affects the efficiency of the straightening.
The associate editor coordinating the review of this manuscript and approving it for publication was Qingli Li .
The non-contact detection function of visual measurement has been widely researched and used in online measurement in recent years [2]- [4]. Chang et al. [5] took repeatedly multiple images of a rotating saw blade by two CMOS cameras and the runout of the saw blade was measured. Wei and Tan [6] established a shaft diameter measurement model based on machine vision, and calibrated the measurement model by a shaft with known shaft diameter. A method for measuring the diameter of micro cylindrical parts based on the line structured light vision was provided in [7]. Cao et al. [8] scanned the rail surface by line structured light vision, and then the rail surface defects were calculated dynamically by multi frame images of the point cloud. A method for detecting and constructing curve welding seam by line structured light vision was proposed in [9]. Sun et al. [10] obtained the rail profile by multi parallel line structured light, and then the rail wear was calculated. Wang [11] use parallel multi-line laser to irradiate the arc weld pool surface, and then the reflected laser lines image is segmented and clustered, which can be obtained higher recognition accuracy.
A measuring method for the involute tooth profile of the gear shaft end-face with machine vision was proposed in [12]. VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ However, this method needs to recalibrate the gear end-face after replacing the measured gear shaft, which is difficult to realize the online measurement of the gear shaft. Moreover, the method has special requirements for ambient light and camera orientation to obtain clear edges on the image. This work has studied a method of measuring the radial runout of the gear shaft using single line structured light vision. When measuring different gear shafts, there is no need to recalibrate the laser plane equation if the laser can reach the gear, it is suitable for online measurement of the radial runout of the gear shaft on the straightening machine. Compared with multi line structured light measurement system, single line structured light one has the advantages of low cost and simple measurement structure. In addition, the existing measurement technology requires the rotation of the gear shaft during measurement, which leads the measurement inefficient. In this regard, this method uses a still image of the laser signal on the gear shaft to measure the radial runout, so it has good versatility and measuring efficiency. To eliminate the influence of the projection distortion on the measurement, the light stripe center coordinates are projected onto the laser plane in the world coordinate system. Then, the gear shaft radial runout can be obtained by geometrically fitting the ellipse formed by intersection of the laser plane and the gear shaft addendum cylinder (for convenience, abbreviated as the laser ellipse). Finally, the measurement method is tested and analyzed by the experiment. This work has five sections. Section 2 calculates value of the gear shaft radial runout. Section 3 determines the direction of the gear shaft radial runout. Section 4 experimentally tests the measurement method and section 5 provides conclusions of the study.

II. CALCULATION FOR THE GEAR SHAFT RADIAL RUNOUT VALUE
Origin of the world coordinate system is established at the optical center of the camera, that is, it coincides with that of the camera coordinate system. Z -axis of the world coordinate system is perpendicular to the laser plane, and the X and Y -axes are parallel to the major and minor axes of the laser ellipse respectively. The camera parameters can be calibrated using calibration method of Zhang by the calibration board [13]. Equations of the laser plane and the machine axis are calibrated by Liu and his co-workers' method [14]. When calibrating the laser plane, the intersection between the light plane and the calibration board is a linear light stripe, the pixel coordinates of the light stripe center can be extracted by Steger algorithm, which can be transformed into the camera coordinates by the camera parameters, and then the camera coordinates of different intersection linear light stripe centers on the calibration board can be obtained by changing the pose of the board, so the parameters of the laser plane are obtained by these data using the Levenberg-Marquardt algorithm. When calibrating the machine axis, the calibration board is fixed by the fixtures, and then they are clamped by two centers of the machine, so that the machine axis is on the plane of the calibration board. Turning the calibration board, the images of the board are captured by the camera, and the intersecting line of the calibration board planes is the machine axis. The calibration results are shown in Appendix A for details. And the transformation between the camera coordinates (x, y, z) and the world coordinates (X , Y , Z ) can be calculated (to see Appendix B), so the spatial relative orientation between the camera imaging plane and the laser plane is determined by the transformation.
As the distortion of perspective projection, the ellipse center on the image is not the projection of the spatial ellipse center on the image. There are two centers on the theoretical image plane, as shown in Figure 1 The pixel coordinates (u i , v i ) of the detected light stripe center can be transformed into the world coordinates (X i , Y i , Z 0 ) on the laser plane, to see Appendix C and Appendix D for details, and then according to the least squares [15][16], the function of geometrically fitting the laser ellipse is established by the world coordinates.
Equation of the laser ellipse can be expressed in the world coordinate system as: where (X c , Y c , Z 0 ) are coordinates of the laser ellipse center M c , Z 0 is Z coordinate of the points on the laser plane, r t is radium of the addendum circle and ϕ is the angle between the laser plane and the machine axis.
The elliptic formula (2) can be expressed by expanding as: The point on the laser ellipse that is perpendicular to the detected point is abbreviated as the vertical corresponding point, according to geometric relationship between the detected point (X i , Y i , Z 0 ) and the vertical corresponding point (X , Y , Z 0 ) [17], [18], the following two equations can be established: The world coordinates (X , Y ) of the vertical corresponding point can be determined by (4), and then the Jacobian matrix J vc of the coordinates (X , Y ) with respect to the elliptic equation coefficients (a, b, c, d, e, f ) in (3) is calculated, as shown at the bottom of this page.
According to (3), the Jacobian matrix J vd of the elliptic equation coefficients (a, b, c, d, e, f ) with respect to coordinates (X c , Y c ) of the center M c can be calculated: Then the Jacobian matrix J vt of the coordinates (X , Y ) with respect to the coordinates (X c , Y c ) is: (9) The imaged ellipse on the theoretical image plane is algebraically fitted to obtain the coordinates of center n c firstly. Then, the obtained coordinates of center n c are inversely projected onto the laser plane to obtain the world coordinates of center N c (using the coordinate transformation of Appendix B). Finally, the function of fitting the laser ellipse (1) is fitted geometrically by (9). Using the obtained coordinates of center N c as the initial value, the geometric fitting is completed by Gauss-Newton iterative method [19], thus obtaining the world coordinates (X c , Y c ) of the laser VOLUME 9, 2021 ellipse center M c . The Jacobian matrix in (9) does not include the radius r t of the addendum circle, so the coordinates of the fitted M c point do not change with r t , the fitted center of the laser ellipse is not influenced by projection distortion. The world coordinates (X c , Y c , Z 0 ) of M c can be transformed into the camera coordinates (x c , y c , z c ), and then the gear shaft radial runout value d is obtained by calculating the distance from M c to the machine axis l c (to see Appendix A).
where (r, s, t) and (x 0 , y 0 , z 0 ) are in Appendix D for details.

III. CALCULATION FOR THE GEAR SHAFT RADIAL RUNOUT DIRECTION
A tooth which can be illuminated by line structured light on the gear shaft is selected as the reference tooth T , and an edge line on the top of tooth T is considered as the reference line l t , as shown in Figure 2. The sub-pixel coordinates of intersection point K t of the reference line l t and the laser plane on the image are detected, and then the detected sub-pixel coordinates are transformed into the camera coordinates (x k , y k , 1) on the theoretical image plane. According to the equation of the laser plane in Appendix A, the camera coordinates (x kt , y kt , z kt ) of K t on the laser plane are calculated by the two-point formula of the linear equation, so the vertical corresponding point K l (x kl , y kl , z kl ) of K t point on the machine axis l c can be obtained.
Then (10) and (11) constitute the measurement model of the gear shaft radial runout. When straightening the gear shaft, the reference line l t is adjusted to the position of pressure head of the straightening machine, and then the gear shaft is rotated θ clockwise to find the target tooth for straightening, the straighten value is d.

IV. RESULTS AND DISCUSSION
To verify the correctness of the established measurement model (10) and (11), two gear shafts were detected by line structured light vision. Table 1 shows the main equipments and their model and main parameters of the measurement system in Figure 1(a).   The relevant parameters of two detected gear shafts I and II are shown in Table 2, and the images of light stripe on two gear shafts are shown in Figure 3. Steger algorithm has high detection accuracy and good robustness, so the sub-pixel coordinates of the light stripe center at the addendum of gear shaft in the images are detected by Steger algorithm [20], [21], the detection points are selected by Pauta Criterion to remove outliers, and then the laser ellipse is geometrically fitted by (1), so the world coordinates (X c , Y c ) of the center M c are obtained. The fit result of an ellipse on the laser plane is shown in Figure 4.The sub-pixel coordinates of intersection point K t between the reference line l t and the laser plane in the image are detected by Zernike orthogonal moment [22], [23], and then its camera coordinates are calculated. Finally, the gear shaft radial runout value d can be obtained by (10), and included angle θ between the radial  runout direction vector and the reference vector is calculated by (11) to find the target tooth for straightening. The measurement results are shown in Table 4.
In order to verify the accuracy of the Steger algorithm and the least square geometric fitting method of the laser ellipse, a comparative experiment is carried out about related VOLUME 9, 2021  measurement methods. The experiment takes the tip diameter of the gear shaft I as the evaluation standard. Three common methods: parabola fitting method, Steger algorithm and direction template method are selected as the detecting methods of the light stripe center, and then the laser ellipse are fitted on the laser plane by the algebraic fitting method and the geometric fitting method based on the least square method respectively. To evaluate the influence of the detected point number on the two fitting methods, the laser ellipse is fitted by all detected points and half detected points respectively. Finally, the tip diameter of the gear shaft I can be obtained. The comparative experiment is repeated for 20 times to ensure the effectiveness and stability. The measurement average value, error average value and error standard deviation of each algorithm are shown in Table 3.
It can be concluded from Table 3, the Steger algorithm is used to detect the light strip center, and then geometrically fitting the laser ellipse on the laser plane can obtain the highest measurement accuracy. Compared with algebraic fitting method, the measurement accuracy of geometric fitting method is almost not affected by the detected point number.
To test the validity and accuracy of the measurement model, the gear shaft radial runout is measured by gear radial runout measuring instrument RR17 (±0.001mm) as reference values in Table 4, as shown in Figure 5. In Table 4, "values with the distortion" are calculated by the X and Y world coordinates of the point N c on the laser plane. N T is the teeth number from the reference tooth T clockwise to the straightening target tooth. "Errors" are deviations between measurement values and reference values. To ensure the validity of the experiment and the rigor of the research, the gear shaft  is selected to repeat the measurement at 10 positions within one revolution during the measurement. The average value and standard deviation of the measurement results are shown in Table 4.
The measurement values based on the measurement model have good agreement with the reference values detected by gear radial runout measuring instrument RR17, while values with the distortion have large errors. It can be concluded that the measurement model instituted by (10) and (11) is effective and accurate, and the influence of the projection distortion on the measurement is reduced, the final measurement accuracy meets the requirements of straightening the gear shaft. Both the accuracy of the calibration board and the detected accuracy of the light stripe center affect the accuracy of the measurement results, as the accuracy of the calibration board is 1µm, then the detected errors of pixel coordinates of the light stripe center are critical factors affecting the accuracy, and the detection accuracy of light stripe center is related to the parameters of the laser and the imaging characteristics of the object surface [24].

V. CONCLUSION
The gear shaft radial runout value and direction can be obtained by measuring the addendum circle with line structured light vision. Firstly, the light stripe image on the addendum circle is detected to obtain the measurement data; then the detected measurement data are transformed to the laser plane; finally the laser ellipse of the gear shaft addendum is fitted geometrically by the transformed data on the laser plane to obtain the radial runout value and direction, which reduces the influence of the projection distortion on the measurement. On the straightening machine, this method can measure the gear shaft radial runout value and direction online with only a static image, which improves the working efficiency of the straightening machine.

APPENDIX A
In the camera coordinate system, the equation of the laser plane is: And its calibration result is: The equation of the machine axis l c is: And the calibration result of l c is:  Table 5 in Appendix A, the pixel coordinates (u i , v i ) of the detected light stripe center points can be transformed into the camera coordinates (x Ti , y Ti , 1) on the theoretical image plane, and then their world coordinates (X Ti , Y Ti , Z Ti ) are calculated by (B.1) in Appendix B. Since origin of the camera coordinate system coincides with that of the world coordinate system, the coordinates (X Ti , Y TI , Z Ti ) can be transformed into the laser plane in the world coordinate system by the projective transformation relationship.
By equations of the laser plane and the machine axis in Appendix A, the angle ϕ between them and the camera coordinates (x 0 , y 0 , z 0 ) of their intersection are calculated, then (x 0 , y 0 , z 0 ) can be transformed into the world coordinates (X 0 , Y 0 , Z 0 ) by (B.1) in Appendix B to get Z 0 , as shown in Appendix D, thus the spatial relative position of the camera imaging plane and the laser plane is determined.

APPENDIX D
According to (A.3) in Appendix A, it can be obtained: