## 3 Point Cloud Reconstruction
### Conversions of Coordinates  
#### 3.2.1 The Sensor Coordinate  
The first-hand data are located on the pixel coordinate of the streak images shown in Figure 4a. We need to extract the location information from it using the center-of-mass method. The centroid in row \(i\) of the image can be calculated using the following formula:  
\[x_{i}=\frac{\sum_{j=0}^{N}jI_{ij}}{\sum_{j=0}^{N}I_{ij}}, \tag{5}\]  
where \(I_{ij}\) is the grayscale value of the position \((i,j)\), \(N\) is the column count, and the centroid array \(\{x_{i}\}\) is shown in Figure 4b. We rewrite \(x_{i}\) in the coordinate form as \((x,y)\) where the variable \(y\) is just the row number \(i\).  
After calculating the gray centroid horizontally, the image is converted to points with pixel units. It is the first coordinate transition that maps pixel points from an image to a distance-angle coordinate using calibration matrixes [34]. Then, the \(y\)-axis data are mapped to the incident angle \(\theta\), and the \(x\)-axis is converted to the time of flight (TOF) \(t_{s}\).  
The calibration matrixes whose pseudo-color figure is shown in Figure 4c,d are data-mapping tables between the \((x,y)\) pixel frame and the \((t_{s},\theta)\) system. We denote \(T\) and \(\Theta\) as the matrixes of the time delay and incident angle, respectively.  
The subscripts of the elements in the matrix are integers, while the centroid coordinates in the x-direction are often fractional, and their corresponding delay parameters need to be obtained via interpolation. We define \(x_{L}=\lfloor x\rfloor\) as the floor of x and \(x_{R}=\lfloor x\rfloor\) as the ceiling of \(x\). The correspondence from the image coordinate system to the sensor coordinate system can be expressed as  
\[\begin{cases}t_{s}=T_{x_{L}y}(x-x_{L})+T_{x_{R}y}(x_{R}-x_{L})\\ \theta=\Theta_{x_{L}y}(x-x_{L})+\Theta_{x_{R}y}(x_{R}-x)\end{cases}. \tag{6}\]  
Its accuracy meets the inversion requirements, where one pixel corresponds to a maximum of 0.004 degrees in the spatially calibrated matrix and 1.1 nanoseconds in the temporal calibration matrix. After using the center-of-mass method and interpolation of the calibrated matrix, the accuracy can reach 0.1 pixel. Thus, the \((t_{s},\theta)\) data calibrated from  
Figure 4: Factors of conversion from a pixel coordinate to a distance-angle coordinate: (**a**) is the original streak image, (**b**) is the centroid of the streak, (**c**) is the calibration matrix \(T\) mapping the time delay, and (**d**) is the calibration matrix \(\Theta\) mapping the incident angle.  
the two matrixes are 0.0004\({}^{\circ}\) and 0.11 nanoseconds. Both cause an error of less than 0.02 m, which is negligible for a plotting accuracy of 0.3 m.  
In the sensor frame \((t_{s},\theta)\), \(t\) denotes the time between when the camera starts working and when it receives the light signal, and \(\theta\) is the incident angle. Then, the normalized vector of incident light can be expressed by \(\theta\) as follows:  
\[\mathbf{L}_{S}=\begin{bmatrix}\frac{1}{\sqrt{1+\tan^{2}\theta}}&0&\frac{\tan \theta}{\sqrt{1+\tan^{2}\theta}}\end{bmatrix}^{T}. \tag{7}\]  
\(t_{s}\) is just one part of TOF, and another part of the TOF \(t_{d}\) is the delay between the time when the laser and camera were triggered. Thus, the whole TOF \(t=t_{S}+t_{d}\) and the distance measurement value \(d\) can be shown as  
\[d=\frac{1}{2}c(t_{S}+t_{d}), \tag{8}\]  
where \(c\) is the speed of light.  
At this point, the first coordinate transition was completed, and the next goal was the position in the scanning coordinate system. The errors introduced by this transition from the streak image and time delay to the incident vector \(\mathbf{L}_{s}\) and ranging value \(d\) are less than the accuracy requirements for mapping, so in the subsequent calculations, we just used the vector \(\mathbf{L}_{s}\) and the distance \(d\) as a definite value.