Method, system and medium for terrain reconstruction based on three-dimensional point cloud data

Ground points are extracted through RANSAC algorithm and random forest regressor, combined with Graham scanning algorithm and tri-convolution method, the fitting problem of three-dimensional point cloud data and DEM data is solved, and a high-quality terrain model is generated, suitable for complex terrain conditions, reduce data acquisition and processing costs, and support sustainable geographic information science.

CN119006733BActive Publication Date: 2024-12-24CHANGSHA NENGCHUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411462256.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2024-12-24
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

In the prior art, when high-precision three-dimensional point cloud data is integrated with lower-precision digital elevation model (DEM) data, it leads to poor fit between point cloud data and terrain, affecting the accuracy and application quality of terrain data, limiting points. The application potential of cloud data in areas such as terrain analysis and urban planning.

Method used

The RANSAC algorithm is used to extract ground points, and convex hull polygons are generated through the random forest regressor and the Graham scanning algorithm, interpolated mesh prediction and clipping are performed, and resampled by the triac convolution method to form a unified and continuous terrain model.

Benefits of technology

It improves the accuracy and quality of terrain data, reduces data acquisition and processing costs, is suitable for complex terrain conditions, and supports sustainable geographic information science practice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006733B_ABST
    Figure CN119006733B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of three-dimensional image data processing, and in particular to a method, system and medium for terrain reconstruction based on three-dimensional point cloud data. The method comprises the steps of: S1, ground point extraction; S2, random sampling; S3, convex hull polygon generation; S4, creating a prediction model of Z coordinate elevation value #imgabs0#; S5, predicting the Z coordinate elevation value of each pixel point in the interpolation grid to obtain a three-dimensional terrain surface composed of continuous pixel points; S6, clipping the interpolation grid; S7, merging and resampling the data obtained after the clipping to create a unified and continuous terrain model. The method integrates efficient algorithms and technologies, accurately extracts ground point information from point cloud data, then interpolates the terrain data extracted from the ground points, and then obtains a unified and continuous terrain model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional image data processing, and in particular to a method, system and medium for terrain reconstruction based on three-dimensional point cloud data. Background Art

[0002] In geographic information systems and surveying and mapping projects, point cloud data obtained through aerial photography technology is widely used due to its high accuracy, but it does not specifically extract information about terrain data features. However, the open source digital elevation model (DEM) is a digital simulation of the ground terrain through terrain elevation data, and the data accuracy can usually only reach 15 meters or 30 meters.

[0003] In actual production, when high-precision point cloud data and lower-precision DEM data are integrated into the same scene, due to their inconsistent spatial resolution and accuracy, point cloud data and DEM data often overlap in space, or there is a large deviation between their positions. This situation causes the point cloud data to not fit the terrain well, affecting the accuracy of terrain data, reducing the quality of subsequent analysis and application, and limiting the application potential of point cloud data in terrain analysis, urban planning, environmental monitoring and other fields. Summary of the invention

[0004] Based on this, it is necessary for the present invention to provide a method, system and medium for terrain reconstruction based on three-dimensional point cloud data to solve at least one of the above technical problems.

[0005] To achieve the above purpose, a method for terrain reconstruction based on three-dimensional point cloud data includes the following steps:

[0006] Step S1, ground point extraction: fitting the ground plane of the three-dimensional point cloud data through the RANSAC algorithm and extracting the ground points in the three-dimensional point cloud;

[0007] Step S2, randomly sampling from the ground points using a preset sampling strategy, and forming a sample set R consisting of S sample subsets = { , ,..., };

[0008] Step S3, convex hull polygon generation: Graham scanning algorithm is used to generate convex hull polygons for each sample subset. Sort the ground points in and generate the sample subset The corresponding convex hull polygon of the terrain, s ;

[0009] Step S4, create a random forest regressor, and train the random forest regressor through the sample set R to obtain the Z coordinate elevation value predicted based on the X and Y coordinates of the point prediction models;

[0010] Step S5, creating a regular grid range for interpolation according to a preset grid resolution, dividing the topographic map into a plurality of continuous interpolation grids, applying the prediction model in step S4 to each interpolation grid, predicting the Z coordinate elevation value of each pixel point in the interpolation grid, and obtaining a three-dimensional terrain surface composed of continuous pixel points;

[0011] Step S6, using the convex hull polygon as a clipping boundary to clip the interpolation grid;

[0012] Step S7, merging and resampling the clipped data to create a unified and continuous terrain model.

[0013] Furthermore, the step S1 specifically includes: fitting the ground plane to the three-dimensional point cloud data by using the RANSAC algorithm and obtaining the ground plane parameters (a, b, c), according to the i-th point in the point cloud The coordinates of Calculation Point Spatial distance from the ground plane , according to the spatial distance The inliers and outliers are determined by the distance threshold, and the set of maximum inliers obtained after multiple iterations is determined as the ground point.

[0014] Furthermore, the step S1 also includes performing noise removal on the ground points.

[0015] Furthermore, the step S3 specifically includes:

[0016] Step S31, obtaining the sample subset The point with the smallest Z coordinate in ;

[0017] Step S32, point Centered on The right direction is the polar axis, according to the sample subset Any point in the relative point Sort by the polar axis;

[0018] Step S33, taking the sample subset Any two points in and , calculate the vector With vector The cross product between them is used to obtain the vertices of the convex hull polygon according to the cross product result, and the sample subset is obtained. The corresponding convex hull polygon, point , .

[0019] Furthermore, the step S3 also includes merging all the convex hull polygons by using the `unary_union` function, and writing the result into a Shapefile file.

[0020] Furthermore, the step S5 also includes converting the predicted Z coordinate elevation values ​​of the pixel points in the interpolation grid into a raster data format and writing them into a TIFF file; the step S6 includes using the Shapefile file to crop the TIFF file; wherein the spatial accuracy of the raster data matches the spatial accuracy of the original three-dimensional point cloud.

[0021] Further, the step S7 includes:

[0022] The trimmed data is resampled by cubic convolution, and the formula Calculate the new interpolated value for each pixel (x, y) , where are the coefficients obtained from the cubic polynomial fit, and is the size of the convolution kernel;

[0023] The resampled data are merged to obtain a unified and continuous terrain model.

[0024] Furthermore, the Z coordinate elevation value in the prediction model is the average value of all tree predictions of the random forest regressor, the Z coordinate elevation value Calculated according to the following formula: , is the number of decision trees of the random forest regressor, is the jth decision tree The predicted Z coordinate elevation value.

[0025] The present invention also provides a system for reconstructing terrain based on three-dimensional point cloud data, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for reconstructing terrain based on three-dimensional point cloud data as described in any one of the above items when executing the computer program.

[0026] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for terrain reconstruction based on three-dimensional point cloud data as described in any one of the above items.

[0027] The method for terrain reconstruction based on three-dimensional point cloud data of the present invention comprises step S1, ground point extraction: fitting the ground plane of the three-dimensional point cloud data by the RANSAC algorithm and extracting the ground points in the three-dimensional point cloud; step S2, randomly sampling from the ground points by a preset sampling strategy, and forming a sample set R consisting of S sample subsets. , ,..., }; Step S3, convex hull polygon generation: Graham scanning algorithm is used to sample subsets Sort the ground points in and generate the sample subset The corresponding convex hull polygon of the terrain, s Step S4, create a random forest regressor, and train the random forest regressor through the sample set R to obtain the Z coordinate elevation value predicted based on the X and Y coordinates of the point The prediction model is as follows: Step S5, according to the preset grid resolution, a regular grid range for interpolation is created, the topographic map is divided into a plurality of continuous interpolation grids, the prediction model in Step S4 is applied to each interpolation grid, the Z coordinate elevation value of each pixel point in the interpolation grid is predicted, and a three-dimensional terrain surface composed of continuous pixel points is obtained; Step S6, the interpolation grid is clipped using the convex hull polygon as a clipping boundary; Step S7, the clipped data is merged and resampled to create a unified and continuous terrain model. The method integrates efficient algorithms and technologies, accurately extracts ground point information from point cloud data, and then interpolates the terrain data extracted from the ground points, and then obtains a unified and continuous terrain model, which is suitable for various complex terrain conditions, including cities, mountainous areas, forests, etc., and has good adaptability and versatility; Compared with traditional terrain measurement methods, the present invention greatly reduces the cost of data acquisition and processing, and provides a high-quality terrain model; The present invention supports the sustainable development of geographic information science practice by reducing the interference of field measurements on the natural environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of a non-limiting implementation made with reference to the following accompanying drawings.

[0029] Figure 1 It is a flow chart of a method for terrain reconstruction based on three-dimensional point cloud data provided by the present invention.

[0030] Figure 2 It is a schematic diagram of the hardware structure of a system running a method for terrain reconstruction based on three-dimensional point cloud data in one embodiment of the present invention.

[0031] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0032] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0033] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0034] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0035] To achieve this, please refer to Figure 1 and Figure 2 The present invention provides a method for terrain reconstruction based on three-dimensional point cloud data, comprising the following steps:

[0036] Step S1, ground point extraction: fitting the ground plane of the three-dimensional point cloud data through the RANSAC algorithm and extracting the ground points in the three-dimensional point cloud;

[0037] Step S2, randomly sampling from the ground points using a preset sampling strategy, and forming a sample set R consisting of S sample subsets = { , ,..., };

[0038] Step S3, convex hull polygon generation: Graham scanning algorithm is used to generate convex hull polygons for each sample subset. Sort the ground points in and generate the sample subset The corresponding convex hull polygon of the terrain, s ;

[0039] Step S4, create a random forest regressor, and train the random forest regressor through the sample set R to obtain the predicted Z coordinate elevation value based on the X and Y coordinates of the point prediction models;

[0040] Step S5, creating a regular grid range for interpolation according to a preset grid resolution, dividing the topographic map into a plurality of continuous interpolation grids, applying the prediction model in step S4 to each interpolation grid, predicting the Z coordinate elevation value of each pixel point in the interpolation grid, and obtaining a three-dimensional terrain surface composed of continuous pixel points;

[0041] Step S6, using the convex hull polygon as a clipping boundary to clip the interpolation grid;

[0042] Step S7, merging and resampling the clipped data to create a unified and continuous terrain model.

[0043] Specifically, in step S1, it specifically includes: fitting the ground plane to the three-dimensional point cloud data through the RANSAC algorithm and obtaining the ground plane parameters (a, b, c), according to the i-th point in the point cloud The coordinates of Calculation Point Spatial distance from the ground plane , according to the spatial distance The inliers and outliers are determined by the distance threshold, and the maximum inliers obtained after multiple iterations are determined as ground points. The RANSAC algorithm (Random sample consensus) is one of the methods for removing ground point clouds. Generally speaking, by setting the maximum distance threshold, the maximum number of iterations and the inlier ratio, ground point data can be obtained after a limited number of iterations.

[0044] Furthermore, the step S1 also includes performing noise removal on the ground points.

[0045] In a preferred embodiment, the step S1 can continue to smooth the Z coordinates of the ground points through a median filter algorithm to remove noise points. The median filter algorithm is a commonly used technique in signal processing, which can effectively remove noise in the data. It is also very critical in point cloud data processing. In the present invention, the median filter algorithm is used to smooth the Z coordinates of the extracted ground points, which can remove isolated noise points, fill small holes in the data, and reduce random fluctuations in the terrain data, thereby generating a smoother and continuous terrain surface. Those skilled in the art will know that in other embodiments, other filtering algorithms can also be used to remove noise from the data of the ground points to remove the influence of noise points.

[0046] In step S2, representative sample subsets are selected through a specific sampling strategy (such as simple random sampling or stratified sampling). These sample subsets will be used as training data for the random forest model to prepare for the next interpolation work. Specifically, the number of points in each sample subset can be the same or different.

[0047] Preferably, in this embodiment, step S3 specifically includes:

[0048] Step S31, obtaining the sample subset The point with the smallest Z coordinate in ;

[0049] Step S32, point Centered on The right direction is the polar axis, according to the sample subset Any point in the relative point Sort by the polar axis;

[0050] Step S33, taking the sample subset Any two points in and , calculate the vector With vector The cross product between them is used to obtain the vertices of the convex hull polygon according to the cross product result, and the sample subset is obtained. The corresponding convex hull polygon, point , .

[0051] The Graham scanning method is used to sort the ground points and generate the convex hull polygon of the terrain. It can process the point set and form the minimum convex polygon, thus providing an accurate range for terrain reconstruction.

[0052] Furthermore, the step S3 also includes merging all the convex hull polygons by using the `unary_union` function, and writing the result into a Shapefile file.

[0053] In step S4, the Z coordinate elevation value in the prediction model is the average value of all tree predictions of the random forest regressor, the Z coordinate elevation value Calculated according to the following formula: , is the number of decision trees of the random forest regressor, is the jth decision tree The predicted Z coordinate elevation value. Among them, each decision tree They all independently learn how to predict the Z coordinate elevation value based on the X and Y coordinates of a point , and then get the final Z coordinate elevation value by taking the average of all tree prediction values Through careful parameter tuning and cross-validation techniques, the model can be optimized to ensure its generalization ability and prediction accuracy.

[0054] In step S5, a regular grid range for interpolation is first created. It should be noted that the range accuracy of the grid can be determined as needed, and it is only necessary to ensure that the resolution and coverage of the grid meet the specific requirements of the terrain data.

[0055] In this embodiment, the step S5 also includes converting the predicted Z coordinate elevation value of the pixel point in the interpolation grid into a raster data format and writing it into a TIFF file; the step S6 includes using the Shapefile file to clip the TIFF file; wherein the spatial accuracy of the raster data matches the spatial accuracy of the original three-dimensional point cloud (generally speaking, they are consistent).

[0056] Specifically, the predicted Z coordinate elevation values ​​of the pixels in the interpolation grid are converted into a raster data format for further geospatial analysis and visualization. Specifically, an affine transformation can be applied to ensure that the spatial accuracy of the raster data is consistent with the original point cloud data. Then, the raster data is clipped using the previously generated convex hull polygon as a clipping boundary to extract the terrain information of a specific area.

[0057] Preferably, the step S7 specifically includes:

[0058] The trimmed data is resampled by cubic convolution, and the formula Calculate the new interpolated value for each pixel (x, y) , where are the coefficients obtained from the cubic polynomial fit, and is the size of the convolution kernel;

[0059] The resampled data are merged to obtain a unified and continuous terrain model.

[0060] Specifically, the trimmed data merging boundary is resampled using the cubic convolution method. This method provides excellent smoothing performance and edge preservation capabilities by fitting the original data points with a cubic polynomial. The advantage of the cubic convolution method is that it can effectively reduce the jagged effect and ripple phenomenon generated during data interpolation while maintaining terrain features (such as slope changes and landform details). The cubic convolution method calculates the new interpolation value of each pixel point (x, y) by fitting a cubic polynomial. , and finally obtain a terrain Tiff data reconstructed based on the point cloud data.

[0061] The method for terrain reconstruction based on three-dimensional point cloud data of this embodiment integrates efficient algorithms and technologies for accurately extracting terrain information from point cloud data and generating terrain data in the commonly used format Tiff, providing an automated point cloud processing flow from ground point extraction to terrain data interpolation, thereby improving work efficiency; it is applicable to various complex terrain conditions, including cities, mountainous areas, forests, etc., and has good adaptability and versatility; compared with traditional terrain measurement methods, the present invention greatly reduces the cost of data collection and processing, while providing a high-quality terrain model; the present invention supports the practice of sustainable development of geographic information science by reducing the interference of on-site measurements on the natural environment.

[0062] As a specific example, the specific implementation of the method for reconstructing terrain based on three-dimensional point cloud data in this embodiment can be implemented by the following programming method:

[0063] (1) Prepare necessary libraries and raw data

[0064] Point cloud data, Geographic Information System (GIS) operations, original machine learning models of random forest regressors, Python libraries required for mathematical calculations and file operations, etc.

[0065] (2) Define point cloud processing function

[0066] Define several functions to process point cloud data, including:

[0067] `extract_ground`: Extract ground points using the RANSAC algorithm.

[0068] `get_bottom_point`: Find the point with the smallest Z coordinate in the point cloud.

[0069] `sort_polar_angle_cos`: Sort points according to polar angle.

[0070] `vector_angle`: Calculates the angle between a vector and [1, 0].

[0071] `coss_multi`: Computes the cross product of two vectors.

[0072] `graham_scan`: Computes the convex hull using the Graham scan method.

[0073] (3) Initialization process

[0074] Set the folder path containing the point cloud data (.las files) and initialize lists for storing ground point data and convex hull polygons.

[0075] (4) Reading and processing point cloud data

[0076] Traverse all .las files in the specified folder:

[0077] Read point cloud files and extract point cloud coordinates.

[0078] Call the `extract_ground` function to extract ground points.

[0079] The Z coordinates of the ground points are processed by median filtering to remove noise.

[0080] Randomly select ground point samples to form a sample set.

[0081] The Graham scan method is used to calculate the convex hull polygon of the ground points in the sample set.

[0082] Add the convex hull polygon to the result list.

[0083] (5) Merge polygons

[0084] Use the unary_union function to merge all convex hull polygons and write the result to a Shapefile.

[0085] (6) Ground point data interpolation

[0086] Create a random forest regressor instance and use the sample set to train the model to obtain a prediction model.

[0087] Define the range of the interpolation grid and make interpolation predictions using the prediction model.

[0088] Convert the interpolation result to raster data format and write it to a TIFF file.

[0089] (7) Clipping and merging raster data

[0090] Use Shapefile to crop TIFF file.

[0091] The cropped raster data is merged and resampled using cubic convolution.

[0092] Write the final merged raster data into a new TIFF file.

[0093] The present invention also provides a system for reconstructing terrain based on three-dimensional point cloud data. The system is established and operated on the basis of a computer system, and specifically includes a memory 61, a processor 62, and a computer program 63 stored in the memory 61 and executable on the processor 62. When the processor 62 executes the computer program 63, the steps of the method for reconstructing terrain based on three-dimensional point cloud data as described in any one of the above items are implemented.

[0094] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer.

[0095] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0096] The memory may be an internal storage unit, such as a hard disk or a memory; the memory may also be an external storage device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory may include both an internal storage unit and an external storage device. The memory is used to store the computer program and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.

[0097] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for terrain reconstruction based on three-dimensional point cloud data as described in any one of the above items.

[0098] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0099] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0100] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0101] In the embodiments provided by the present invention, it should be understood that the disclosed devices / systems and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0104] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0105] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0106] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for terrain reconstruction based on three-dimensional point cloud data, characterized in that: The following steps are involved: Step S1, ground point extraction: fitting the ground plane of the three-dimensional point cloud data through the RANSAC algorithm and extracting the ground points in the three-dimensional point cloud; Step S2, randomly sampling from the ground points using a preset sampling strategy, and forming a sample set R consisting of S sample subsets = { , ,..., }; Step S3, convex hull polygon generation: Graham scanning algorithm is used to generate convex hull polygons for each sample subset. Sort the ground points in and generate the sample subset The corresponding convex hull polygon of the terrain, s ; Step S4, create a random forest regressor, and train the random forest regressor through the sample set R to obtain the predicted Z coordinate elevation value based on the X and Y coordinates of the point prediction models; Step S5, creating a regular grid range for interpolation according to a preset grid resolution, dividing the topographic map into a plurality of continuous interpolation grids, applying the prediction model in step S4 to each interpolation grid, predicting the Z coordinate elevation value of each pixel point in the interpolation grid, and obtaining a three-dimensional terrain surface composed of continuous pixel points; Step S6, using the convex hull polygon as a clipping boundary to clip the interpolation grid; Step S7, merging and resampling the clipped data to create a unified and continuous terrain model.

2. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 1, characterized in that: The step S1 specifically includes: fitting the ground plane to the three-dimensional point cloud data by using the RANSAC algorithm and obtaining the ground plane parameters (a, b, c); according to the i-th point in the point cloud The coordinates of Calculation Point Spatial distance from the ground plane , according to the spatial distance The inliers and outliers are determined by the distance threshold, and the set of maximum inliers obtained after multiple iterations is determined as the ground point.

3. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 1 or 2, characterized in that: The step S1 also includes performing noise removal on the ground points.

4. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 3, characterized in that: The step S3 specifically includes: Step S31, obtaining the sample subset The point with the smallest Z coordinate in ; Step S32, point Centered on The right direction is the polar axis, according to the sample subset Any point in the relative point Sort by the polar axis; Step S33, taking the sample subset Any two points in and , calculate the vector With vector The cross product between them is used to obtain the vertices of the convex hull polygon according to the cross product result, and the sample subset is obtained. The corresponding convex hull polygon, point , .

5. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 1, characterized in that: The step S3 also includes merging all the convex hull polygons by using the `unary_union` function, and writing the result into a Shapefile file.

6. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 5, characterized in that: The step S5 also includes converting the predicted Z coordinate elevation values ​​of the pixel points in the interpolation grid into a raster data format and writing them into a TIFF file; the step S6 includes using the Shapefile file to clip the TIFF file; wherein the spatial accuracy of the raster data matches the spatial accuracy of the original three-dimensional point cloud.

7. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 6, characterized in that: The step S7 specifically includes: The trimmed data is resampled by cubic convolution, and the formula Calculate the new interpolated value for each pixel (x, y) , where are the coefficients obtained from the cubic polynomial fit, and is the size of the convolution kernel; The resampled data are merged to obtain a unified and continuous terrain model.

8. The method for terrain reconstruction based on three-dimensional point cloud data according to claim 1, characterized in that: The Z coordinate elevation value in the prediction model is the average value of all tree predictions of the random forest regressor, the Z coordinate elevation value Calculated according to the following formula: , is the number of decision trees of the random forest regressor, is the jth decision tree The predicted Z coordinate elevation value.

9. A system for terrain reconstruction based on three-dimensional point cloud data, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for terrain reconstruction based on three-dimensional point cloud data according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for terrain reconstruction based on three-dimensional point cloud data as described in any one of claims 1 to 8 are implemented.