## 2 Detection Principles and Self-Deflection Analysis
### System Composition and Detection Principles  
The bore surface deformation and straightness detection system consists of a self-propelled borescope trolley, a spatial positioning device fixed at the bore end face, and a data processing terminal, as shown in Figure 1.  
The borescope trolley, primarily used to measure the profile shape of the bore at each position, comprises a ring laser, reflector, camera, forearm, glass pane, driving mechanism, etc. Among these, the ring laser, fixed at the head of the forearm, is used to project ring-structured light onto the bore surface; the forearm, used to place the ring laser and the reflector, is fixed to the glass pane on the front side of the trolley. The camera, positioned inside the trolley body with its lens aimed at the glass pane, captures images of the laser pattern on the bore surface and reflector. On the opposite side of the trolley's support wheels, spring-matched auxiliary wheels are arranged to reduce the vibration amplitude during trolley movement. The spatial positioning device consists of a dot laser and a two-axis turntable, in which the dot laser can generate a collimated beam and measure the drive distance of the borescope trolley. The data processing terminal is used to control system operation and calculate the detection results in real time. To obtain the surface deformation of the bore, it is first necessary to acquire laser point cloud data of the bore profile at each position. This can be achieved using the laser triangulation method, the basic principle of which is shown in Figure 2. Assuming the focal length of the camera lens is \(f\), the distance from the ring laser to the lens is \(d\), and the coordinates of the ring-structured light falling on the camera image sensor after diffuse reflection from the inner bore surface are \(X\), then the distance \(x\) from the bore surface to the central axis of the ring laser can be determined according to the following trigonometric relationship:  
\[x=X\frac{d}{f} \tag{1}\]  
Figure 1: A schematic of the bore surface deformation and straightness detection system. When considering the differences among the axes of the ring laser, camera lens, and image sensor, as well as the pixel length and width of the image sensor, the relationship between the pixel coordinate system (\(X_{\text{p}}\), \(Y_{\text{p}}\)) and the ring laser plane coordinate system (\(x_{\text{p}}\), \(y_{\text{p}}\)) can be described as follows [29]:  
\[s \begin{bmatrix}X_{\text{p}}\\ Y_{\text{p}}\\ 1\end{bmatrix} =\mathbf{M_{\text{I}}}\mathbf{M_{\text{E}}} \begin{bmatrix}x_{\text{p}}\\ y_{\text{p}}\\ 1\end{bmatrix} = \begin{bmatrix}f_{1}&\gamma&u_{0}\\ 0&f_{2}&v_{0}\\ 0&0&1\end{bmatrix}\begin{bmatrix}r_{1}&r_{2}&t_{1}\\ r_{3}&r_{4}&t_{2}\\ r_{5}&r_{6}&t_{3}\end{bmatrix}\begin{bmatrix}x_{\text{p}}\\ y_{\text{p}}\\ 1\end{bmatrix}  \tag{2}\]  
where \(s\) represents the scale factor; \(\mathbf{M_{\text{I}}}\) is the intrinsic matrix that characterizes the relationship between the pixel coordinate system and the camera lens coordinate system, composed of five parameters: \(f_{1},f_{2}\), \(\gamma\), \(u_{0}\), \(v_{0}\); and \(\mathbf{M_{\text{E}}}\) is the extrinsic matrix that characterizes the relationship between the camera lens coordinate system and the ring laser plane coordinate system, composed of six rotation parameters from \(r_{1}\) to \(r_{6}\) and three translation parameters from \(t_{1}\) to \(t_{3}\). Using the Zhang calibration method [30], these parameters and the image distortion can be calibrated. Since the bore deformation is a relative quantity, the deformation cannot be calculated solely based on (\(x_{\text{p}}\), \(y_{\text{p}}\)). It is necessary to first register these point clouds with the standard bore profile point clouds:  
\[ \begin{bmatrix}x_{\text{r}}\\ y_{\text{r}}\\ 1\end{bmatrix} = \begin{bmatrix}\mathbf{R_{\text{r}}}&\mathbf{T_{\text{r}}}\\ 0&1\end{bmatrix}\begin{bmatrix}x_{\text{p}}\\ y_{\text{p}}\\ 1\end{bmatrix} =