## 4 The 3D Point Cloud Reconstruction
### The 3D Point Cloud Space Projection  
The single-line lidar can simultaneously obtain the angle and distance \((\theta,d)\) of each laser point data in the lidar polar coordinate. By taking into account the synchronization between the lidar data and the odometry information, this paper only receives the lidar data at the time of the \(k\)th visual key frame of the camera and maps them to the world coordinates according to the real-time positioning information.  
Firstly, the angle and distance \((\theta_{k}^{i},\theta_{k}^{i})\) measured in the lidar polar coordinate is directly projected to the lidar coordinate (\(L\)):  
\[\left(\begin{array}{c}X_{k}^{i(L)}\\ Y_{k}^{i(L)}\\ Z_{k}^{i(L)}\end{array}\right)=d_{k}^{i}\left(\begin{array}{c}\cos\theta_{k }^{i}\\ \sin\theta_{k}^{i}\\ 0\end{array}\right) \tag{7}\]  
where \(d_{k}^{i}\) indicates the distance of the \(i\)th laser point during the \(k\)th scan; \(\theta_{k}^{i}\) is the corresponding angle; and the superscript \((L)\) indicates the lidar coordinate.  
As the single-line lidar is placed vertically, the laser point data produce distortion errors along with the system movement, resulting in a spiral deflection. In this paper, IMU information is used to eliminate spiral deflection. During the laser point scanning at the \(k\)th frame, we obtain poses \(p_{s}\) and \(p_{e}\)though IMU integration at the beginning and the end of the lidar rotation. This paper adopts linear interpolation to eliminate spiral deflection, and the pose \(p_{i}\) of each intermediate point can be approximated as  
\[p_{i}=\frac{(e-i)p_{s}+(i-s)p_{e}}{e-s} \tag{8}\]  
where \(s\) and \(e\) represent the time stamps at the beginning time and the end time, respectively, and \(i\) represents the time stamp of the middle laser point of the single circle scanning. \(p_{s}\), \(p_{e}\), and \(p_{i}\) represent the system poses at the time stamps of \(s\), \(e\), and \(i\), respectively.  
Then, each laser point is adjusted to form the correct coordinates of the laser point:  
\[\left(\begin{array}{c}X_{k}^{i^{\prime}(L)}\\ Y_{k}^{i^{\prime}(L)}\\ Z_{k}^{i^{\prime}(L)}\end{array}\right)=p_{i}^{T}\left(\begin{array}{c}X_{k }^{i^{\prime}(L)}\\ Y_{k}^{i(L)}\\ Z_{k}^{i^{\prime}(L)}\end{array}\right) \tag{9}\]  
Then, the pose estimation \(T_{C}^{W}\) of the key frame is obtained using tightly coupled multi-sensor fusion as mentioned earlier. According to the relative pose transformation between multiple sensors, \(T_{B}^{C}\) and \(T_{L}^{B}\), we obtain the global pose transformation matrix \(T_{L}^{W}\) of the forest point cloud reconstruction system, which transforms laser points in the lidar coordinate \((X_{k}^{i^{\prime}(L)},Y_{k}^{i^{\prime}(L)},Z_{k}^{i^{\prime}(L)})\) to the world coordinate \((X_{k}^{i(W)},Y_{k}^{i(W)},Z_{k}^{i(W)})\). Superscript \((W)\) indicates that the point is in the world coordinate system:  
\[T_{L}^{W}=T_{C}^{W}T_{B}^{C}T_{L}^{B} \tag{10}\]  
\[\left(\begin{array}{c}X_{k}^{i(W)}\\ Y_{k}^{i(W)}\\ Z_{k}^{i(W)}\end{array}\right)=T_{L}^{W}\left(\begin{array}{c}X_{k}^{i^{ \prime}(L)}\\ Y_{k}^{i^{\prime}(L)}\\ Z_{k}^{i^{\prime}(L)}\end{array}\right) \tag{11}\]  
According to (11), the single-line lidar data can be projected in real time and converted to the world coordinate system to form a 3D point cloud at the key frame.