A high-precision three-dimensional terrain reconstruction method based on deep learning
By constructing an image preprocessing model and point cloud matching algorithm using deep learning technology, interference is removed and overlapping point cloud data is identified, simplifying the point cloud data and achieving high-precision 3D terrain reconstruction. This solves the accuracy and efficiency problems of traditional methods in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional 3D terrain reconstruction methods are prone to surface discontinuity in areas with weak textures and under interference from shadows, clouds, and fog, resulting in a significant decrease in reconstruction accuracy. This makes it difficult to achieve dynamic and high-precision reconstruction, limiting their engineering application in complex scenarios.
A deep learning-based approach is adopted to remove interference by constructing an image preprocessing model, generate a set of 3D terrain point cloud data, identify overlapping point cloud data, construct an initial 3D terrain model, and perform color processing, including the use of U-Net network, attention mechanism and PatchGAN network, dynamic neighborhood detection algorithm, and stereo mesh method to simplify point cloud data.
It improves the robustness and accuracy of 3D terrain reconstruction, reduces the amount of point cloud data, and lowers computational memory and time consumption, making it suitable for complex terrain reconstruction.
Smart Images

Figure CN120655849B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of three-dimensional terrain reconstruction, specifically a high-precision three-dimensional terrain reconstruction method based on deep learning. Background Technology
[0002] With the rapid development of remote sensing technology, computer vision, and surveying science, 3D terrain reconstruction technology has been widely applied in smart cities, disaster monitoring, military surveying, and autonomous driving. Current mainstream technologies primarily rely on multi-source data acquisition methods such as satellite remote sensing imagery, LiDAR, and UAV oblique photography. Among these, stereo matching methods based on optical imagery have attracted significant attention due to their low cost and wide coverage. In recent years, deep learning technology, through its end-to-end feature learning mechanism, has demonstrated breakthrough potential in areas such as stereo vision and point cloud processing, providing a new technical path to improve the accuracy and efficiency of terrain reconstruction.
[0003] Traditional 3D terrain reconstruction is mainly based on multi-view geometry principles, generating digital surface models through dense set matching algorithms in photogrammetry. Specifically, this involves: acquiring 3D point clouds through epipolar correction and local / global optimization; recovering sparse 3D point clouds using multi-view image sequences; achieving dense reconstruction through multi-view stereo algorithms; generating high-precision point clouds through direct scanning with LiDAR; and performing coordinate registration using ground control points.
[0004] Traditional 3D terrain reconstruction methods use multi-view geometry principles, which are prone to surface discontinuity in weak texture areas and under interference from shadows, clouds, and fog. This leads to a significant decrease in reconstruction accuracy, making it difficult to achieve dynamic and high-precision reconstruction and restricting the engineering application of 3D terrain reconstruction technology in complex scenes. Summary of the Invention
[0005] In view of the problems in the related technologies, the present invention provides a high-precision three-dimensional terrain reconstruction method based on deep learning to overcome the technical problems existing in the existing related technologies.
[0006] To solve the aforementioned technical problem, the present invention is achieved through the following technical solution:
[0007] This invention relates to a high-precision 3D terrain reconstruction method based on deep learning, comprising the following steps:
[0008] Step S1 Preprocessing: Construct an image preprocessing model based on neural networks and attention mechanisms. Input the initial set of terrain images and output a set of de-interferenced 3D terrain images.
[0009] Step S2: Point cloud generation and matching: Convert the set of interference-free 3D terrain images into a set of 3D terrain point cloud data, identify overlapping point cloud data and construct an initial 3D terrain model;
[0010] Step S3 Model Optimization: Detect and remove discrete points and simplify point cloud data to generate a simplified 3D terrain model;
[0011] Step S4: Color Reconstruction: Solve for the point cloud colors of the simplified 3D terrain model and perform color processing to output a high-precision 3D terrain model.
[0012] Preferably, the image preprocessing model constructed based on neural networks and attention mechanisms includes:
[0013] Obtain a set of terrain image samples, add random noise and generate a dynamic shadow mask to generate an enhanced set of terrain image samples;
[0014] The backbone network is set as U-Net, using ResNet-34 pre-trained weights, and a multi-scale spatial attention module is introduced into the skip connections of the U-Net network; the PatchGAN network structure is used as the discriminator of the image preprocessing model; a joint loss function is set to construct the image preprocessing model.
[0015] The enhanced terrain image sample set is divided into a sample training set and a sample test set. The sample training set is input into the generator of the image preprocessing model and trained in combination with the joint loss function until the maximum number of training rounds is reached, at which point training stops and a pre-trained image preprocessing model is obtained.
[0016] The sample test set is then input into the pre-trained image preprocessing model for adversarial training. The learning rate is linearly decayed until the maximum number of training rounds is reached, at which point training is stopped, and the final image preprocessing model is obtained.
[0017] Preferably, the input initial terrain image set and the output de-interferenced 3D terrain image set include:
[0018] Select the area to be reconstructed, acquire a sequence of images of the area to be reconstructed, obtain an initial set of terrain images, input them into the final image preprocessing model, and after denoising and shadow correction, output a set of interference-free 3D terrain images.
[0019] Preferably, converting the set of de-interferenced 3D terrain images into a set of 3D terrain point cloud data includes:
[0020] A planar coordinate system is established based on the set of de-interference 3D terrain images. The 2D terrain coordinates and height of the pixels are obtained based on the gray values of the pixels, and then mapped to a 3D terrain point cloud data set.
[0021] Preferably, the identified overlapping point cloud data includes:
[0022] Set an initial neighborhood radius and count the number of 3D terrain point cloud data within the initial neighborhood radius;
[0023] The neighborhood radius is dynamically adjusted until the number of 3D terrain point cloud data within the initial neighborhood radius converges, thus obtaining the final neighborhood radius, and the comprehensive similarity coefficient is calculated.
[0024] A similarity threshold is set. When the comprehensive similarity coefficient within the final neighborhood radius is greater than the similarity threshold, the corresponding 3D terrain point cloud data is regarded as overlapping point cloud data and the overlapping point cloud data is deleted. The 3D terrain point cloud data set is detected sequentially to obtain the deduplicated 3D terrain point cloud data set.
[0025] Preferably, constructing the initial three-dimensional terrain model includes:
[0026] The deduplicated 3D terrain point cloud data set is mapped into a 3D model space to form a 2D terrain; a super triangle containing the 2D terrain is created, the super triangle is segmented and fitted with a quadratic surface, and the curvature coefficient is calculated.
[0027] Based on the curvature coefficient, terrain features are marked as flat, convex, concave, and saddle areas;
[0028] After determining the terrain features, they are marked in the processed 3D terrain to generate an initial 3D terrain model.
[0029] Preferably, the formation of two-dimensional terrain includes:
[0030] Segment the super triangle and generate its circumcircle, then traverse the 3D terrain point cloud data within the super triangle;
[0031] Delete triangles containing 3D terrain point cloud data inside the circumcircle, generate void domains and reconstruct the mesh;
[0032] Delete the triangles containing the vertices of the supertriangle to generate the processed 2D terrain.
[0033] Preferably, the detection and deletion of discrete points includes:
[0034] Select the point cloud data to be detected in the initial 3D terrain model, and calculate the discrete thresholds of the k point cloud data that are closest to the point cloud data to be detected.
[0035] When the point cloud data to be detected is greater than the discrete upper bound threshold or less than the discrete lower bound threshold, the point cloud data to be detected is regarded as discrete points, the discrete points are deleted, and a filtered three-dimensional terrain model is obtained.
[0036] Preferably, the process of generating a simplified 3D terrain model from simplified point cloud data includes:
[0037] Set the cube side length, and divide the filtered 3D terrain model into several cubes according to the cube side length; calculate the centroid of each cube, and use the cube centroid to replace all point cloud data in the cube to generate a simplified 3D terrain model.
[0038] Preferably, the step of solving for the point cloud color of the simplified 3D terrain model and performing coloring processing includes:
[0039] Obtain the color values of the cube vertices and calculate the weighted average color value of the cube vertex set;
[0040] The weighted average color value of the cube vertex set is used as the color value of the cube centroid to perform coloring processing on the simplified 3D terrain model, resulting in the final 3D terrain model.
[0041] The present invention has the following beneficial effects:
[0042] 1. This invention acquires an initial set of terrain images, integrates a U-Net network and an attention mechanism to construct an image preprocessing model, identifies and removes interference areas in the initial set of terrain images. By reasonably designing the data, network and loss function, this method can improve the robustness of the model in complex environments, restore surface details in the images, eliminate shadow interference, and overcome interference from weak texture areas, shadows, clouds and fog.
[0043] 2. This invention generates a 3D terrain point cloud dataset through point cloud matching, identifies overlapping point cloud data, and maps brightness to height. It can construct the conversion from terrain image to point cloud data without relying on complex technologies, overcoming the complexity of traditional point cloud matching methods. At the same time, it uses a dynamic neighborhood detection algorithm to identify overlapping point cloud data, dynamically calculates the neighborhood radius, and uses multi-feature fusion for similarity judgment, which effectively reduces the false deletion of terrain features and significantly improves the accuracy of point cloud data deduplication, making it suitable for complex terrain reconstruction.
[0044] 3. This invention constructs a three-dimensional model by determining terrain features, generates an initial three-dimensional terrain model, projects point cloud data onto a two-dimensional plane, constructs a triangle network, and determines terrain features to establish a continuous surface, ensuring geometric consistency and feature integrity, thereby improving the accuracy of three-dimensional terrain reconstruction.
[0045] 4. This invention detects and removes discrete points in the initial 3D terrain model and simplifies the point cloud data using a 3D mesh method. This method overcomes the problem of discrete points easily appearing in low-density areas. While ensuring the accuracy of the model, it greatly reduces the amount of point cloud data, reduces the computational memory and time consumption for terrain reconstruction, and obtains a simplified 3D terrain model.
[0046] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of the invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, the drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 This invention provides a flowchart illustrating a high-precision 3D terrain reconstruction method based on deep learning. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] Traditional 3D terrain reconstruction methods use multi-view geometry principles, which are prone to surface discontinuity in weak texture areas and under interference from shadows, clouds, and fog. This leads to a significant decrease in reconstruction accuracy, making it difficult to achieve dynamic and high-precision reconstruction and restricting the engineering application of 3D terrain reconstruction technology in complex scenes.
[0051] To address the aforementioned technical issues, a specific embodiment involves using a multi-rotor drone equipped with a high-resolution camera during the 3D reconstruction process to capture a sequence of aerial images of the target mountainous area along a planned flight path. The flight path overlap is specified to be ≥80%, and the lateral overlap is specified to be ≥70%. In complex terrain, a terrain-following mode is used to maintain a constant altitude, providing good terrain images and point cloud data for the present invention during periods of uniform lighting and low wind speed.
[0052] In the specific implementation process of the above embodiments, firstly, an initial set of terrain images is acquired, and an image preprocessing model is constructed by fusing the U-Net network and an attention mechanism to identify and remove interference regions in the initial terrain image set. This method achieves data augmentation through synthetic interference and geometric transformation. The network architecture design uses the U-Net network, an attention mechanism, and an adversarial generative network. By reasonably designing the data, network, and loss function, the robustness of the model in complex environments can be improved, restoring surface details (such as weak texture areas like rivers and exposed rocks) in the images and eliminating shadow interference (such as mountain shadows), overcoming interference from weak texture areas, shadows, clouds, and fog. Secondly, point cloud matching is performed to generate a three-dimensional terrain point cloud dataset, overlapping point cloud data is identified, and then terrain features are determined to construct a three-dimensional model, generating an initial three-dimensional terrain model. This method maps brightness to height, constructing point cloud data from terrain images without relying on complex techniques. This method overcomes the complexity of traditional point cloud matching methods and uses a dynamic neighborhood detection algorithm to identify overlapping point cloud data. The core idea is to dynamically calculate the neighborhood radius and use multi-feature fusion for similarity judgment, effectively reducing the false deletion of terrain features and significantly improving the accuracy of point cloud data deduplication. It is suitable for complex terrain reconstruction. The point cloud data is then projected onto a two-dimensional plane to construct a triangular network and determine terrain features to establish a continuous surface, improving the accuracy of three-dimensional terrain reconstruction. Discrete points in the initial three-dimensional terrain model are detected and deleted, and a 3D mesh method is used to simplify the point cloud data, resulting in a simplified three-dimensional terrain model. This method overcomes the problem of discrete points easily appearing in low-density areas, greatly reducing the amount of point cloud data and the computational memory and time required for terrain reconstruction while ensuring model accuracy. Finally, the three-dimensional terrain is colored, and the color information of the two-dimensional image is accurately mapped to the model through linear interpolation, achieving high-precision three-dimensional terrain reconstruction. The entire process relies on rigorous mathematical modeling methods and is suitable for scientific research, geological hazard assessment, and other scenarios.
[0053] Furthermore, to better illustrate the technical solutions of the embodiments of the present invention, such as... Figure 1 As shown, this embodiment of the invention provides a high-precision 3D terrain reconstruction method based on deep learning, specifically including the following:
[0054] S1. Obtain an initial set of terrain images, construct a final image preprocessing model based on neural networks and attention mechanisms, input the initial set of terrain images into the final image preprocessing model, identify and remove interference areas, and output a set of de-interference three-dimensional terrain images.
[0055] S1 includes the following steps:
[0056] S11. Select the area to be reconstructed, acquire a sequence of images of the area to be reconstructed, and obtain an initial terrain image set. Acquire terrain images of other reconstructed areas to obtain a terrain image sample set. Add random noise to the terrain image sample set and generate a dynamic shadow mask, which is then superimposed on the terrain image sample set. Stretch and rotate the terrain images in the terrain image sample set to generate the final terrain image sample set.
[0057] S12. Based on the final terrain image sample set, establish a final image preprocessing model based on neural networks and attention mechanisms. The specific steps are as follows:
[0058] The backbone network is set as U-Net, using ResNet-34 pre-trained weights. A multi-scale spatial attention module is introduced into the skip connections of the U-Net network. The multi-scale spatial attention module includes global average pooling, global max pooling, fully connected layers, convolutional layers, ReLU function, and Sigmoid function to obtain the generator of the image preprocessing model. The PatchGAN network structure is used as the discriminator of the image preprocessing model. A joint loss function is set, which includes L1 loss, perceptual loss, adversarial loss, and edge loss, and weights are assigned to them respectively to obtain the loss function and loss weights of the image preprocessing model, thus constructing the image preprocessing model.
[0059] S122. Set the learning rate, batch size and maximum number of training rounds, divide the final terrain image sample set into a sample training set and a sample test set, input the sample training set into the generator of the image preprocessing model, and train it by combining L1 loss and edge loss until the maximum number of training rounds is reached, then stop training to obtain the pre-trained image preprocessing model.
[0060] S123. Then input the sample test set into the pre-trained image preprocessing model, perform adversarial training, reduce the L1 loss weight, increase the adversarial loss weight, dynamically adjust the loss weight, linearly decay the learning rate to the maximum number of training rounds, stop training, and obtain the final image preprocessing model.
[0061] S13. Input the initial terrain image set into the final image preprocessing model. The final image preprocessing model identifies and removes interference areas and outputs a set of de-interference three-dimensional terrain images.
[0062] In this embodiment, an image preprocessing model is constructed by acquiring an initial set of terrain images and fusing a U-Net network and an attention mechanism. This model identifies and removes interfering regions from the initial terrain image set. Data augmentation is achieved through synthetic interference and geometric transformations. The network architecture uses a U-Net network, an attention mechanism, and a generative adversarial network. By rationally designing the data, network, and loss function, the model's robustness in complex environments can be improved, restoring surface details (such as weakly textured areas like rivers and exposed rocks) and eliminating shadow interference (such as mountain shadows). Specifically, for example, dynamic shadow masks (simulating cloud layers and vegetation projections) are generated using random cropping or rendering tools and superimposed on the image. Gaussian noise and salt-and-pepper noise are added to simulate sensor interference. The backbone network uses a pre-trained ResNet-34 to extract deep features. A multi-scale spatial attention module is introduced into the skip connections, allowing the model to focus on terrain contours (such as ridges and gullies) rather than vegetation / shadow areas. A discriminator is used for local receptive field design to determine the local realism of the image. The method for setting the joint loss weights is as follows: 100 training images are randomly selected, and the initial values of each loss term are calculated. The weights are set according to the mean ratio. When the mean of L1 loss: mean of perceptual loss: mean of adversarial loss ≈ 10:2:1, the initial weights are set to 1.0, 0.2, and 0.1, respectively. The edge loss weight is fixed at 0.1, resulting in L1 loss (1.0) + perceptual loss (0.2) + adversarial loss (0.1) + edge loss (0.1), ensuring clear texture and accurate structure. This is done during the pre-training phase. The learning rate was set to 0.001, batch size to 8, and maximum number of rounds to 100. The generator was trained using a sample training set (8000 sets). The L1 loss (overall terrain reconstruction) and edge loss (contour sharpening) were optimized first. During the adversarial training phase, the L1 weights were reduced to 0.3 and the adversarial loss was increased to 0.4 to improve the realism of details. The learning rate was linearly reduced to 0.0001 to avoid overfitting. The model successfully distinguished and removed more than 90% of shadows and vegetation artifacts in the test images, overcoming interference from weak texture areas, shadows, clouds and fog.
[0063] S2. Perform point cloud matching on the set of de-interference 3D terrain images to generate a 3D terrain point cloud data set, identify overlapping point cloud data in the 3D terrain point cloud data set, determine terrain features to construct a 3D model, and generate an initial 3D terrain model.
[0064] S2 includes the following steps:
[0065] S21. Select any terrain image from the set of interference-free three-dimensional terrain images and perform grayscale processing, denoted as the first terrain image. Take the upper left corner of the first terrain image as the origin of the coordinate system, establish a plane coordinate system, determine the coordinates and grayscale values of the pixels in the first terrain image, and measure the horizontal and vertical dimensions of the pixels in the first terrain image. At this time, the two-dimensional terrain coordinates are equal to the product of the coordinates of the pixels in the first terrain image and the horizontal and vertical dimensions of the pixels in the first terrain image, thus obtaining the two-dimensional terrain coordinates of the pixels in the first terrain image.
[0066] Define a terrain height range, and calculate the height of each pixel in the first terrain image based on its grayscale value. ,in Indicates the location of the first terrain image grayscale value at that location Indicates the lower limit of terrain height. The upper limit of the terrain height is represented; by combining the two-dimensional terrain coordinates of the pixels in the first terrain image and the height of the pixels in the first terrain image, the three-dimensional terrain coordinates of the pixels in the first terrain image are obtained, and the pixels in the first terrain image are recorded as the point cloud data of the first terrain image.
[0067] S22. Select a terrain image adjacent to the first terrain image from the set of de-interference three-dimensional terrain images and denote it as the second terrain image. Calculate the three-dimensional terrain coordinates of the pixels in the second terrain image to obtain the point cloud data of the second terrain image. Calculate the point cloud data of the set of de-interference three-dimensional terrain images in sequence to form a three-dimensional terrain point cloud data set.
[0068] S23. Use a dynamic neighborhood detection algorithm to identify overlapping point cloud data in the 3D terrain point cloud data set, and delete overlapping point cloud data to obtain a deduplicated 3D terrain point cloud data set. The specific steps are as follows:
[0069] S231. Set an initial neighborhood radius. Select any three-dimensional terrain point cloud data from the three-dimensional terrain point cloud data set, denoted as the core point cloud data. Using the core point cloud data as the center, count the number of three-dimensional terrain point cloud data within the initial neighborhood radius. Set a high-density threshold and a low-density threshold. When the number of three-dimensional terrain point cloud data within the initial neighborhood radius is greater than the high-density threshold, reduce the initial neighborhood radius to obtain the reduced neighborhood radius. ,in Indicates the initial neighborhood radius. The value represents the high-density threshold, and m represents the number of 3D terrain point cloud data points within the initial neighborhood radius. When the number of 3D terrain point cloud data points within the initial neighborhood radius is less than the high-density threshold, the initial neighborhood radius is expanded to obtain the expanded neighborhood radius. ,in This represents the low-density threshold; the final neighborhood radius is obtained when the number of 3D terrain point cloud data within the initial neighborhood radius converges.
[0070] S232. Obtain the grayscale values of the three-dimensional terrain point cloud data within the final neighborhood radius, calculate the difference between the grayscale values of the core point cloud data and other three-dimensional terrain point cloud data, and record it as the grayscale value similarity coefficient; calculate the Euclidean distance between the core point cloud data and other three-dimensional terrain point cloud data, and record it as the distance similarity coefficient; then calculate the curvature of the three-dimensional terrain point cloud data within the final neighborhood radius, and record the difference between the curvature of the core point cloud data and other three-dimensional terrain point cloud data as the curvature similarity coefficient.
[0071] Based on the grayscale similarity coefficient Distance similarity coefficient and curvature similarity coefficient The comprehensive similarity coefficient within the final neighborhood radius is calculated using multi-feature weighted fusion. ,in , and Indicates similarity weight;
[0072] S233. Set an overlap threshold. When the comprehensive similarity coefficient within the final neighborhood radius is greater than the overlap threshold, the corresponding three-dimensional terrain point cloud data is regarded as overlapping point cloud data and the overlapping point cloud data is deleted. Detect all three-dimensional terrain point cloud data in the three-dimensional terrain point cloud data set in sequence to obtain a deduplicated three-dimensional terrain point cloud data set.
[0073] S24. Set up a three-dimensional model space. The three-dimensional terrain point cloud data in the deduplicated three-dimensional terrain point cloud data set includes X, Y, and Z values. Map the X and Y values to the three-dimensional model space to form two-dimensional terrain. Create a super triangle containing the two-dimensional terrain. Divide the super triangle to obtain a triangular mesh. Create the circumcircle of all triangles in the triangular mesh. Traverse the three-dimensional terrain point cloud data in the super triangle. When there is three-dimensional terrain point cloud data inside the circumcircle of a triangle, delete the corresponding triangle to generate a void region. Then connect the three-dimensional terrain point cloud data inside the circumcircle of the triangle with the void region to obtain a new triangle. Continue until there is no three-dimensional terrain point cloud data inside the circumcircle of all triangles. Then delete the triangle containing the vertices of the super triangle to obtain the inner triangle and generate the processed two-dimensional terrain.
[0074] The Z-values of the 3D terrain point cloud data corresponding to the processed 2D terrain are then mapped onto the 3D model space to obtain the processed 3D terrain. A quadratic surface fitting is then performed on any 3D terrain point cloud data within the processed 3D terrain to calculate the 3D terrain curvature, and the curvature coefficients are calculated. ,in Represents the curvature of three-dimensional terrain. This represents the Z-value of three-dimensional terrain point cloud data;
[0075] when and At this point, the corresponding area in the processed 3D terrain is a flat area; when and At that time, the corresponding area in the processed 3D terrain is a raised area; when and If the terrain is in a concave position, the corresponding area in the processed 3D terrain is a raised area; otherwise, the corresponding area in the processed 3D terrain is a saddle area. The terrain features are determined and marked in the processed 3D terrain to generate an initial 3D terrain model.
[0076] In this embodiment, a 3D terrain point cloud dataset is generated by point cloud matching, overlapping point cloud data is identified, and then terrain features are determined to construct a 3D model, generating an initial 3D terrain model. This method maps brightness to height, enabling the conversion from terrain image to point cloud data without relying on complex techniques, overcoming the complexity of traditional point cloud matching methods. Simultaneously, a dynamic neighborhood detection algorithm is used to identify overlapping point cloud data. The core idea is to dynamically calculate the neighborhood radius and use multi-feature fusion for similarity judgment, effectively reducing the false deletion of terrain features and significantly improving the accuracy of point cloud data deduplication. This method is suitable for complex terrain reconstruction. The point cloud data is then projected... By projecting the image onto a two-dimensional plane, constructing a triangular network, and determining terrain features to establish a continuous surface, the accuracy of three-dimensional terrain reconstruction is improved. Specifically, for example, by selecting an image of a mountaintop region, a planar coordinate system is established, and the two-dimensional coordinates of each pixel are calculated using its horizontal / vertical dimensions and position, converting pixel grayscale values into height values. Adaptive adjustment of the neighborhood radius is achieved: using a point cloud (such as a point on a ridgeline) as the core, an initial neighborhood radius of 1 meter is set; a density threshold is determined by dividing the mountaintop region image into blocks, statistically analyzing the density values of all blocks, plotting a histogram, and using the 90th percentile of the density distribution as the high-density threshold and the 10th percentile as the low-density threshold. If the point cloud density in the neighborhood is too high (exceeding the high density threshold of 50 points), reduce the radius to 0.8 meters; if the density is too low (less than the low density threshold of 10 points), expand it to 1.5 meters until the density stabilizes; multi-feature fusion deduplication: calculate the grayscale similarity (to avoid duplicate textures), distance similarity (to exclude overlapping projection points), and curvature similarity (to distinguish areas of abrupt terrain changes) of the point cloud in the neighborhood, and assign weights according to the importance of features (e.g., the spatial distance weight is 0.6 and the curvature weight is 0.3 in terrain data); after combining the weights, delete overlapping points with similarity exceeding the threshold (0.9) and retain the unique terrain feature point; project the deduplicated point cloud. In the 3D model space, a super triangle covering the entire terrain (covering the entire mountain range) is constructed, generating a triangular mesh. Triangles containing external vertices are deleted, and the internal mesh (mountain surface) is retained. Quadratic surface fitting is performed on each triangular mesh, and the curvature is calculated. Flat areas: curvature close to 0 (mountain plateau), convex areas: positive curvature coefficient (isolated peaks), concave areas: negative curvature coefficient (crater or waterlogged valley), saddle areas: mixed curvature sign (low-lying connection between ridges). Multi-feature fusion improves the ability to preserve terrain details, is suitable for feature extraction and analysis of complex landforms, and is convenient for describing scenes in 3D terrain models.
[0077] S3. Detect and delete discrete points in the initial three-dimensional terrain model to obtain a filtered three-dimensional terrain model, and simplify the point cloud data in the filtered three-dimensional terrain model based on the stereo mesh method to obtain a simplified three-dimensional terrain model.
[0078] S3 includes the following steps:
[0079] S31. The initial three-dimensional terrain model includes several point cloud data. Any point cloud data is selected from the initial three-dimensional terrain model and denoted as the point cloud data to be detected. The k point cloud data closest to the point cloud data to be detected are selected to form a set of neighboring three-dimensional terrain point cloud data. The Euclidean distance and average distance between the point cloud data to be detected and the set of neighboring three-dimensional terrain point cloud data are calculated. Then, based on the Euclidean distance and average distance, the variance and standard deviation of the point cloud data to be detected and the set of neighboring three-dimensional terrain point cloud data are calculated. The discrete lower bound threshold is then calculated. Discrete upper bound threshold ,in This represents the average distance between the point cloud data to be detected and the set of neighboring 3D terrain point cloud data. This represents the standard deviation of the set of point cloud data to be detected and the set of nearby 3D terrain point cloud data.
[0080] When the point cloud data to be detected is greater than the upper discrete threshold or less than the lower discrete threshold, the point cloud data to be detected is regarded as a discrete point and the discrete point is deleted; otherwise, the point cloud data to be detected is retained. All discrete points in the initial three-dimensional terrain model are deleted in sequence to obtain the filtered three-dimensional terrain model.
[0081] S32. Set a cube in the filtered 3D terrain model, and use the 3D mesh method to simplify the point cloud data to generate a simplified 3D terrain model. The specific steps are as follows:
[0082] S321. Set the cube side length l, find the minimum point cloud data in the filtered 3D terrain model, establish a spatial coordinate system with the minimum point cloud data as the origin, and set the coordinates of the maximum point cloud data in the filtered 3D terrain model as l. The minimum point cloud data coordinates in the filtered 3D terrain model are If the filtered 3D terrain model is divided into several cubes according to the side length of the cubes, then the number of cubes is... ;
[0083] S322. Count the number of point cloud data in the cube, calculate the centroid of each cube, and replace all point cloud data in the cube with the centroid of the cube until all point cloud data in the filtered 3D terrain model is simplified, and generate a simplified 3D terrain model.
[0084] In this embodiment, a simplified 3D terrain model is obtained by detecting and deleting discrete points in the initial 3D terrain model and simplifying the point cloud data using a 3D mesh method. This method overcomes the problem of discrete points easily appearing in low-density areas, and greatly reduces the amount of point cloud data while ensuring model accuracy, thus reducing the computational memory and time consumption for terrain reconstruction. Specifically, for example, if the number of neighboring points k=15 is selected, and a point P to be detected is selected, its 15 nearest neighboring points are found, and the Euclidean distance between P and its neighboring points is calculated, the average distance d=0.85 meters and the standard deviation σ=0.2 meters are obtained. The discrete threshold is calculated, with a lower bound of 0.45 meters and an upper bound of 1.25 meters. If the average distance from P to its neighboring points is 1.3 meters (exceeding the upper bound), then the model is considered to be in a more stable state. P is determined to be a discrete point and deleted. This process iterates through all 1.2 million points, deleting approximately 50,000 discrete points (isolated vegetation points, equipment noise points), resulting in a filtered model containing 1.15 million points. A cube with a side length of 1.0 meter is selected, at which point each cube covers a 10×10 pixel area, ensuring stable color fusion. The model boundaries are obtained: minimum coordinates (0, 0, 1020m), maximum coordinates (500m, 300m, 1350m). Each cube is iterated through; if it contains a point cloud (a cube contains 20 points), its centroid coordinates are calculated, and the original 20 points are deleted, retaining only the centroid. The number of point clouds is reduced from 1.15 million to approximately 180,000, a data reduction of 84%, resulting in lightweight data and laying the foundation for subsequent coloring processing.
[0085] S4. Solve for the color of the point cloud data in the simplified 3D terrain model, perform coloring processing on the 3D terrain, and realize high-precision reconstruction of the 3D terrain.
[0086] S4 includes the following steps:
[0087] S41. The simplified 3D terrain model contains several cubes. Select the vertices of the cubes and number them to obtain a set of cube vertices. ,in The 8th cube vertex is represented, and its coordinates are recorded. The color values of the cube vertices are obtained from the de-interferenced 3D terrain image set, and the weighted average color value of the 8 cube vertices is calculated. ,in This represents the color value of the i-th vertex of the cube. The point cloud data color is obtained;
[0088] S42. The weighted average color value of the 8 cube vertices is used as the color value of the cube centroid. The color values of all cube centroids in the simplified 3D terrain model are then colored to obtain the final 3D terrain model.
[0089] In this embodiment, the 3D terrain is colored, and the color information of the 2D image is accurately mapped into the model through linear interpolation to achieve high-precision reconstruction of the 3D terrain. Specifically, for example, the 8 vertices (B1-B8) of each cube correspond to sampling points in the actual terrain. Each vertex is assigned a color, and the arithmetic mean of the colors of the 8 vertices is taken. The average result is RGB(120, 160, 90), so the centroid color of the cube is a soft grass green. The centroid colors of adjacent cubes gradually change, forming a smooth transition. The color fusion reflects the local landform features and presents a realistic 3D terrain. The whole process relies on rigorous mathematical modeling methods and is suitable for complex scenarios such as scientific research and geological disaster assessment.
[0090] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0091] The preferred embodiments of the invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.
Claims
1. A high-precision three-dimensional terrain reconstruction method based on deep learning, characterized in that, The method comprises the following steps: Step S1 preprocessing: constructing an image preprocessing model based on a neural network and an attention mechanism, inputting an initial terrain image set, and outputting a set of de-interference three-dimensional terrain images; Step S2 point cloud generation and matching: converting the set of de-interference three-dimensional terrain images into a set of three-dimensional terrain point cloud data, identifying coincident point cloud data, and constructing an initial three-dimensional terrain model; Step S3 model optimization: detecting and deleting discrete points and simplifying the point cloud data to generate a simplified three-dimensional terrain model; Step S4 coloring reconstruction: solving the point cloud color of the simplified three-dimensional terrain model and performing coloring processing to output a high-precision three-dimensional terrain model; The image preprocessing model based on the neural network and the attention mechanism comprises: Obtain a set of terrain image samples, add random noise points, and generate dynamic shadow masks to generate an enhanced terrain image sample set; Set the backbone network as a U-Net network, use ResNet-34 pre-training weights, and introduce a multi-scale spatial attention module in the skip connection of the U-Net network; use a PatchGAN network structure as the discriminator of the image preprocessing model; set a joint loss function to construct the image preprocessing model; Divide the enhanced terrain image sample set into a sample training set and a sample test set, input the sample training set into the generator of the image preprocessing model, and train it in combination with the joint loss function until the maximum number of training rounds is reached, stop training, and obtain a pre-trained image preprocessing model; Then input the sample test set into the pre-trained image preprocessing model, perform adversarial training, linearly decay the learning rate to the maximum number of training rounds, stop training, and obtain the final image preprocessing model.
2. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 1, characterized in that, The input initial terrain image set and the output de-interference three-dimensional terrain image set comprise: Select a region to be reconstructed, collect sequence images of the region to be reconstructed to obtain an initial terrain image set, input the initial terrain image set into the final image preprocessing model, perform noise removal and shadow correction, and output a set of de-interference three-dimensional terrain images.
3. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 2, characterized in that, The set of de-interference three-dimensional terrain images is converted into a set of three-dimensional terrain point cloud data, which comprises: According to the set of de-interference three-dimensional terrain images, a plane coordinate system is established, the gray value of a pixel point is obtained to obtain a two-dimensional terrain coordinate of the pixel point and the height of the pixel point, and the two-dimensional terrain coordinate and the height of the pixel point are mapped into a set of three-dimensional terrain point cloud data.
4. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 3, characterized in that, The identification of coincident point cloud data comprises: Set an initial neighborhood radius, and count the number of three-dimensional terrain point cloud data within the initial neighborhood radius; Dynamically adjust the neighborhood radius until the number of three-dimensional terrain point cloud data within the initial neighborhood radius converges, obtain the final neighborhood radius, and calculate the comprehensive similarity coefficient; Set a coincidence threshold, when the comprehensive similarity coefficient within the final neighborhood radius is greater than the coincidence threshold, the corresponding three-dimensional terrain point cloud data is regarded as coincident point cloud data, and the coincident point cloud data is deleted; sequentially detect the set of three-dimensional terrain point cloud data to obtain a set of de-duplicated three-dimensional terrain point cloud data.
5. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 4, characterized in that, The construction of the initial three-dimensional terrain model comprises: The set of the de-duplication three-dimensional terrain point cloud data is mapped into a three-dimensional model space to form a two-dimensional terrain; a hyper-triangle containing the two-dimensional terrain is created, the hyper-triangle is segmented and a quadric surface fitting is performed, and a curvature coefficient is calculated; The terrain features are marked as flat, convex, concave and saddle regions according to the curvature coefficient; After the terrain features are determined, the processed three-dimensional terrain is marked to generate an initial three-dimensional terrain model.
6. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 5, characterized in that, The formation of the two-dimensional terrain includes: The hyper-triangle is segmented and an inscribed circle is generated, and the three-dimensional terrain point cloud data in the hyper-triangle is traversed; Triangles containing three-dimensional terrain point cloud data inside the inscribed circle are deleted, a hollow domain is generated and a grid is reconstructed; Triangles containing the vertices of the hyper-triangle are deleted to generate a processed two-dimensional terrain.
7. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 6, characterized in that, The detection and deletion of the discrete points include: In the initial three-dimensional terrain model, selected point cloud data to be detected is calculated to obtain the discrete threshold of the k point cloud data closest to the selected point cloud data to be detected; When the selected point cloud data to be detected is greater than the upper limit of the discrete threshold or less than the lower limit of the discrete threshold, the selected point cloud data to be detected is regarded as a discrete point, the discrete point is deleted, and a filtered three-dimensional terrain model is obtained.
8. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 7, characterized in that, The simplification of the point cloud data to generate a simplified three-dimensional terrain model includes: A cubic edge length is set, the filtered three-dimensional terrain model is divided into a plurality of cubes according to the cubic edge length, the centroid of each cube is calculated, all point cloud data in the cube are replaced by the centroid of the cube, and a simplified three-dimensional terrain model is generated.
9. The high-precision three-dimensional terrain reconstruction method based on deep learning according to claim 8, characterized in that, The solving of the point cloud color of the simplified three-dimensional terrain model and the coloring processing include: The color value of the cube vertex is obtained, and the weighted average color value of the cube vertex set is calculated; The weighted average color value of the cube vertex set is taken as the color value of the centroid of the cube, the simplified three-dimensional terrain model is colored, and a final three-dimensional terrain model is obtained.
Citation Information
Patent Citations
Three-dimensional face reconstruction method for removing invalid points based on coding structured light
CN118918288A
Three-dimensional terrain efficient real-time rendering method and system based on deep learning
CN119152145A