## 4 Dense Point Cloud Map Construction Based on Point-Line Features  
### Dense Point Cloud Map Construction  
This study introduces a dense map creation thread to the ORB-SLAM3 architecture to resolve the deficiencies in features and the absence of occupancy information in its three-dimensional mapping system. This thread utilizes high-quality keyframes from the local mapping thread to create three-dimensional dense point cloud maps of the camera's environment, employing RGB and depth images from real-time frames. Figure 4 illustrates that the dense mapping method comprises the following three components: multi-source mining data, pose estimation, and dense mapping. The data input section gathers RGB and depth images, supplying environmental data for map creation; the pose estimation section employs point-line feature extraction, 3D coordinate generation, and pose information calculation modules to deliver the pose estimates for keyframes necessary for each real-time mapping frame.  
Figure 4: Dense mapping thread architecture diagram.  
Figure 5 illustrates that three-dimensional point cloud production is founded on the pinhole camera imaging concept. By acquiring corresponding RGB and depth images, we extract pixel coordinates (\(u\),\(v\)) and pixel depth \(d\) (the distance from the pixel point to the imaging plane). In actual applications, the depth range of the depth camera is constrained. Using the Intel RealSense D435i camera referenced in this paper as an example, \(d_{min}\) is 300 (i.e., 0.3 m) and \(d_{max}\) is 3000 (i.e., 3 m). \(W\) is the scaling factor correlating depth values to actual physical distances, and the mathematical model is the following:  
\[W\begin{bmatrix}u\\ v\\ 1\end{bmatrix}=T(RQ_{z}+k)=\begin{pmatrix}f_{x}&0&d_{x}\\ 0&f_{y}&d_{y}\\ 0&0&1\end{pmatrix}\begin{pmatrix}R\begin{bmatrix}x\\ y\\ 1\end{bmatrix}+k\end{pmatrix} \tag{12}\]  
Following the completion of the camera's calibration, the camera intrinsic matrix, \(T\), is established. By the pose estimate of the tracking thread, we can ascertain the camera's rotation matrix, \(R\), and translation matrix, \(k\). Consequently, we may determine the spatial coordinates for each pixel in the RGB image. The coordinate computation algorithm for the point cloud, \(P_{i}\), utilizing the Point Cloud Library (PCL) for processing, is as follows:  
\[\begin{bmatrix}p_{iz}\\ p_{iz}\\ p_{iz}\end{bmatrix}=\begin{bmatrix}d/s\\ (u-d_{x})\times p_{i,z}/f_{x}\\ (u-d_{y})\times p_{i,x}/f_{y}\end{bmatrix} \tag{13}\]  
The depth scale, denoted as s, has been validated through numerous studies as being 1000. Upon acquiring spatial coordinates, we apply RGB picture color data to the formed point cloud, then we select new keyframes to execute point cloud stitching and global optimization with the produced map, accomplishing dense map building. The three-dimensional point cloud of a frame acquired at this juncture is derived from the camera coordinate system at that instant. To obtain the coordinates of pixel points in the real world, it is necessary to utilize posture information to convert the pixel's camera coordinates into world coordinates, as follows:  
\[X_{w,j}=T_{i}X_{c_{j},j} \tag{14}\]  
Figure 5: Pinhole camera imaging principle diagram.