# Implicit-Explicit Coupling Enhancement for UAV Scene 3D Reconstruction
## 2 Implicit-Explicit Coupling-Enhancement-Based 3D Reconstruction
### Detail-Implicit Texture Mapping Enhancement for High-Accuracy Mesh Modeling
#### 2.2.2 UAV Large-Scale Scene Voxel Mesh Modeling  
To reconstruct more detailed scene models, it is crucial to consider the impact of lighting on the reconstructed textures and project the rich textures, combined with the lighting model, to appropriate distances. To achieve this, we first use Poisson reconstruction to convert the previously generated point cloud into a mesh model. Poisson reconstruction is an implicit surface-based surface reconstruction method that can recover a smooth surface from an unordered point cloud. For the point cloud obtained from the previous dense reconstruction, we estimate the normal vector for each point. These normal vectors are then used as samples for the gradient field. We solve a Poisson equation to obtain an implicit function, where the zero-level set represents the desired surface. The Poisson equation can be expressed as  
\[\
abla^{2}f=\
abla\cdot\mathbf{v} \tag{8}\]  
where \(\
abla\) represents the gradient, \(v\) is a vector field obtained by interpolating the normal vectors of the point cloud, and \(f\) is the unknown implicit function. To solve this equation, we need to discretize space into an octree grid. Then, at each grid node, an unknown variable \(f_{i}\) is defined to represent the value of the implicit function at that node. We can use finite difference methods to approximate the Poisson equation, resulting in a system of linear equations:  
\[Lf=b \tag{9}\]  
where \(L\) is the Laplacian matrix, \(f\) is a vector composed of all \(f_{i}\) values at grid nodes, and \(b\) is a vector composed of values of \(\
abla\cdot v\) at grid nodes. We utilize the preconditioned conjugate gradient method as an iterative algorithm to solve this system of linear equations, obtaining an approximate solution for \(f\). Finally, we use an isosurface extraction algorithm, marching cubes, to extract the zero-level set from \(f\), which represents the reconstructed surface.  
Next, we use a virtual laser scanner to scan the mesh from multiple angles and then employ a kd-tree to find the nearest surface points. The sign of the signed distance function (SDF) is determined based on either normals or a depth buffer. To reconstruct the initial SDF from the mesh model, we simulate a virtual laser scanner that projects the mesh from different directions, producing a series of depth images. Each pixel on these depth images corresponds to a point in space. We use the kd-tree algorithm to find the nearest neighbor point on the mesh for each pixel, i.e., the nearest surface point, and calculate the distance between these two points as the SDF value for that pixel.  
To determine the sign of the SDF (whether the point is inside or outside the surface), we employ two methods based on the characteristics of different implicit surfaces. For smooth and continuous surfaces, we use the angle between the point's normal and the surface normal: if the angle is greater than 90 degrees, the point is considered inside; otherwise, it is considered outside. For complex or non-smooth surfaces, we introduce a depth buffer. If the depth value of a point is greater than the depth value of the corresponding surface point, the point is considered inside; otherwise, it is considered outside. This dynamic selection of methods based on the surface type ensures optimal results. Ultimately, we obtain the SDF values for each point, completing the initial SDF reconstruction.  
Finally, we utilize spatially varying spherical harmonic functions [40] to solve the reflectance of each image frame and the scene illumination. Employing structure-from-shading (SfS) techniques, we perform local geometric optimization for each voxel within the SDF volume to minimize the reprojection errors of image frames and ensure voxel smoothness. We iterate through these steps until convergence or the maximum iteration count is reached. This process results in a high-quality three-dimensional model with intricate geometric details and consistent surface textures.