Earthwork volume measurement method and device based on laser radar, electronic equipment and medium
By using lidar to collect, denoise, segment, and slice earthwork data, the problem of low accuracy in earthwork volume measurement in existing technologies has been solved, enabling more accurate earthwork volume calculation in complex terrain.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 中建五局第四建设有限公司
- Filing Date
- 2026-03-11
- Publication Date
- 2026-05-05
AI Technical Summary
Existing earthwork measurement methods, such as UAV photography, regular grid method, cross-section method and contour line method, have low measurement accuracy in complex terrain or irregular areas, resulting in inaccurate earthwork measurement.
The earthwork volume measurement method based on lidar is adopted. Data is collected by lidar on UAV, and noise reduction, earthwork segmentation and slicing are performed to determine the outline and area of the earthwork slices, calculate the volume of the earthwork slices, and finally determine the earthwork construction volume of the target area.
It improves the accuracy of earthwork measurement and reduces the amount of construction work, especially in complex terrain or irregular areas where earthwork volume can be calculated more accurately.
Smart Images

Figure CN121978657A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of information technology in civil engineering, specifically to methods, devices, electronic equipment, and media for measuring earthwork volume based on lidar. Background Technology
[0002] With the advancement of engineering information technology, engineering surveying technology has developed rapidly, greatly facilitating engineering work such as building construction, road construction, mining, and land reclamation. In particular, accurate earthwork volume measurement in the construction area is crucial for subsequent construction work. Currently, earthwork volume measurement is typically performed using either: constructing an earthwork area model using UAV oblique photogrammetry technology, or using LiDAR technology (acquiring 3D point cloud data through 3D scanning equipment and calculating earthwork volume using methods such as the grid method, cross-section method, and contour line method).
[0003] However, when using the above method, the following technical problems often arise: 1) Drone photography technology has high requirements for natural conditions (such as no wind and good lighting). In particular, elevation drift is prone to occur in areas without texture, such as strong light, shadow, water surface, and bare soil. At the same time, the earthwork area photographed is severely obscured by vegetation, which can easily distort the data and result in low accuracy of earthwork measurement.
[0004] 2) The regular grid method divides the area into regular grids, and the elevation of each grid is obtained through interpolation. Then, the volume of each grid cylinder is calculated and summed. This method works well in flat areas, but in complex terrain areas, the interpolated elevation introduces errors, and the choice of grid size affects the measurement accuracy, resulting in lower accuracy of the measured earthwork volume.
[0005] 3) The cross-section method involves creating cross-sections at certain intervals and then calculating the volume between adjacent cross-sections. This method is suitable for linear terrain (such as roads and canals), but for irregular areas, the choice of cross-section direction and interval will affect the accuracy, resulting in lower accuracy of the measured earthwork volume.
[0006] 4) The contour method calculates volume based on contour lines, but the contour lines themselves are obtained through interpolation, and the volume calculation assumes that the contour lines change linearly. This leads to a large error when the elevation difference is large, resulting in low accuracy of the measured earthwork volume. Summary of the Invention
[0007] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0008] Some embodiments of this disclosure provide methods, apparatus, electronic devices, and computer-readable media for measuring earthwork volume based on lidar, in order to address the technical problems mentioned in the background section above.
[0009] In a first aspect, some embodiments of this disclosure provide a method for measuring earthwork volume based on lidar. The method includes: acquiring data from a target area using lidar mounted on a drone to obtain lidar point cloud data, wherein the target area is an area requiring earthwork construction; denoising the lidar point cloud data to obtain denoised point cloud data; segmenting the denoised point cloud data to obtain earthwork point cloud data; slicing the earthwork point cloud data to obtain an earthwork slice point cloud sequence; for each earthwork slice point cloud in the earthwork slice point cloud sequence, performing the following earthwork volume measurement steps: determining the earthwork slice outline corresponding to the earthwork slice point cloud; determining the earthwork slice area corresponding to the earthwork slice outline based on the earthwork slice outline; generating the earthwork slice point cloud volume corresponding to the earthwork slice point cloud based on the earthwork slice area; and determining the sum of the generated earthwork slice point cloud volumes as the earthwork construction volume corresponding to the target area.
[0010] Secondly, some embodiments of this disclosure provide an earthwork volume measurement device based on lidar. The device includes: a data acquisition unit configured to acquire data from a target area using a lidar mounted on a drone to obtain lidar point cloud data, wherein the target area is an area where earthwork construction is required; a denoising unit configured to denoise the lidar point cloud data to obtain denoised point cloud data; an earthwork segmentation unit configured to segment the denoised point cloud data to obtain earthwork point cloud data; and a slicing unit configured to slice the earthwork point cloud data. The data is sliced to obtain a sequence of earthwork slice point clouds. An earthwork volume measurement unit is configured to perform the following earthwork volume measurement steps for each earthwork slice point cloud in the sequence: determine the earthwork slice outline corresponding to the earthwork slice point cloud; determine the earthwork slice area corresponding to the earthwork slice outline based on the earthwork slice outline; generate the earthwork slice point cloud volume corresponding to the earthwork slice point cloud based on the earthwork slice area; and a determination unit is configured to determine the sum of the generated volumes of each earthwork slice point cloud as the earthwork construction volume corresponding to the target area.
[0011] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0012] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0013] The above-described embodiments of this disclosure have the following beneficial effects: The earthwork measurement method based on lidar according to some embodiments of this disclosure can improve the accuracy of earthwork measurement and reduce the amount of engineering construction. Specifically, the reasons for the low accuracy of earthwork measurement and the large amount of engineering construction are: 1) UAV photography technology has high requirements for natural conditions (e.g., no wind, good lighting), especially in areas without texture such as strong light, shadow, water surface, and bare soil, elevation drift is prone to occur. At the same time, the earthwork area photographed is severely obscured by vegetation, making the data easily distorted, resulting in low accuracy of the measured earthwork volume. 2) The regular grid method divides the area into regular grids, and the elevation of each grid is obtained through interpolation. Then, the volume of each grid cylinder is calculated and summed. This method works well in flat areas, but in complex terrain areas, interpolation of elevation introduces errors, and the choice of grid size affects the measurement accuracy, resulting in low accuracy of the measured earthwork volume. 3) The cross-section method involves making cross-sections at certain intervals and then calculating the volume between adjacent cross-sections. This method is suitable for linear terrain (such as roads and canals), but for irregular areas, the choice of cross-sectional direction and interval will affect the accuracy, resulting in lower accuracy of the measured earthwork volume. 4) The contour line method calculates the volume based on contour lines, but the contour lines themselves are obtained through interpolation, and the volume calculation assumes linear changes between contour lines, which leads to larger errors when the elevation difference is large. This results in lower accuracy of the measured earthwork volume. Based on this, some embodiments of the earthwork volume measurement method based on lidar in this disclosure firstly collect data on the target area using lidar mounted on a drone to obtain lidar point cloud data, where the target area is the area where earthwork construction is required. Thus, lidar point cloud data representing the area where earthwork construction is required can be obtained. Then, the lidar point cloud data is denoised to obtain denoised point cloud data. Thus, denoised point cloud data with non-target interference points removed can be obtained. Afterward, earthwork segmentation processing is performed on the denoised point cloud data to obtain earthwork point cloud data. Thus, earthwork point cloud data representing the earthwork that needs to be excavated or filled can be obtained. Subsequently, the aforementioned earthwork point cloud data is sliced to obtain an earthwork slice point cloud sequence. This allows the 3D data processing problem to be transformed into a 2D planar data processing problem. Next, for each earthwork slice point cloud in the sequence, the following earthwork volume measurement steps are performed: Then, the earthwork slice outline corresponding to the aforementioned earthwork slice point cloud is determined. This yields an earthwork slice outline representing any shape of the earthwork area. Then, based on the aforementioned earthwork slice outline, the corresponding earthwork slice area is determined. This yields an earthwork slice area representing the earthwork distribution range. Finally, based on the aforementioned earthwork slice area, the corresponding earthwork slice point cloud volume is generated. The sum of the generated earthwork slice point cloud volumes is determined as the earthwork construction volume corresponding to the target area.Therefore, the total earthwork volume corresponding to the target area can be obtained. Furthermore, by slicing the earthwork point cloud data representing any complex terrain (such as earthwork accumulations or excavated pits) and determining the outline of each slice object, a more accurate earthwork volume can be obtained. Attached Figure Description
[0014] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0015] Figure 1 This is a schematic diagram of an application scenario of the earthwork volume measurement method based on lidar according to some embodiments of this disclosure; Figure 2 This is a flowchart of some embodiments of the lidar-based earthwork measurement method according to the present disclosure; Figure 3 This is a schematic diagram of the slicing method for earthwork point cloud data based on LiDAR earthwork volume measurement according to this disclosure. Figure 4 This is a schematic diagram of the coordinate set of the center of the earthwork volume measurement based on lidar according to this disclosure; Figure 5 This is a schematic diagram of the contour points of an earthwork slice based on lidar-based earthwork volume measurement according to this disclosure. Figure 6 This is a schematic diagram of the structure of some embodiments of the lidar-based earthwork measurement device according to the present disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing earthwork volume measurement based on lidar in some embodiments of this disclosure. Detailed Implementation
[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0017] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0018] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0019] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0020] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0021] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] Figure 1 This is a schematic diagram of an application scenario of the LiDAR-based earthwork measurement method according to some embodiments of this disclosure.
[0023] exist Figure 1 In the application scenario, firstly, the computing device 101 can collect data on the target area using a lidar mounted on the drone, obtaining lidar point cloud data 102, where the target area is the area requiring earthwork construction. Then, the computing device 101 can denoise the lidar point cloud data 102, obtaining denoised point cloud data 103. Next, the computing device 101 can perform earthwork segmentation processing on the denoised point cloud data 103, obtaining earthwork point cloud data 104. Finally, the computing device 101 can slice the earthwork point cloud data 104, obtaining an earthwork slice point cloud sequence 105. Subsequently, the computing device 101 can perform the following earthwork volume measurement steps for each earthwork slice point cloud 1051 in the aforementioned earthwork slice point cloud sequence 105: the computing device 101 can determine the earthwork slice outline 1052 corresponding to the aforementioned earthwork slice point cloud; the computing device 101 can determine the earthwork slice area 1053 corresponding to the aforementioned earthwork slice outline 1052 based on the aforementioned earthwork slice outline 1052; the computing device 101 can generate the earthwork slice point cloud volume 1054 corresponding to the aforementioned earthwork slice point cloud 1051 based on the aforementioned earthwork slice area 1053. Finally, the computing device 101 can determine the sum of the generated earthwork slice point cloud volumes 1054 as the earthwork construction volume 106 corresponding to the aforementioned target area.
[0024] It should be noted that the aforementioned computing device 101 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here. It should be understood that... Figure 1 The number of computing devices in the system can be arbitrary, depending on the implementation requirements.
[0025] Continue to refer to Figure 2 The diagram illustrates a flow 200 of some embodiments of a lidar-based earthwork measurement method according to the present disclosure. This lidar-based earthwork measurement method includes the following steps: Step 201: Data is collected from the target area using a lidar mounted on the drone to obtain lidar point cloud data. In some embodiments, the entity executing the lidar-based earthwork measurement method (e.g., Figure 1 The computing device 101 shown can collect data on the target area using a lidar mounted on a drone, obtaining lidar point cloud data. The target area can be an area requiring earthwork construction. The target area can be any earthwork construction area; no specific limitation is made here. Earthwork construction methods can include excavation and filling. The lidar point cloud data can be the three-dimensional point cloud data of the corresponding target area collected by the lidar. The drone can be a drone equipped with the lidar.
[0026] Step 202: Denoise the laser point cloud data to obtain denoised point cloud data.
[0027] In some embodiments, the aforementioned execution entity may perform denoising processing on the aforementioned laser point cloud data to obtain denoised point cloud data.
[0028] In practice, the aforementioned execution entity can use the Kalman filter algorithm to denoise the laser point cloud data, obtaining denoised point cloud data. As an example, the execution entity can use the mean filter algorithm to denoise the laser point cloud data, obtaining denoised point cloud data. As another example, the execution entity can also use the Gaussian filter algorithm to denoise the laser point cloud data, obtaining denoised point cloud data. It should be noted that during the denoising process using the above filtering algorithms, since these algorithms mainly rely on the spatial distance (or distance weighting) between laser points for smoothing, they can easily cause blurring of edge and detail features (sharp features on the point cloud surface such as corners and ridges). To solve this technical problem, the following technical solution is proposed: In some optional implementations of certain embodiments, the aforementioned execution entity can perform denoising processing on the aforementioned laser point cloud data to obtain denoised point cloud data in the following manner: The first step is to determine the set of neighboring point groups corresponding to the laser point cloud data. Each laser point in the laser point cloud data corresponds one-to-one with a neighboring point group in the set of neighboring point groups. In practice, the execution entity can call a preset spatial index generation function interface to construct a spatial index structure tree for the laser point cloud data, thus obtaining the spatial index structure tree corresponding to the laser point cloud data. Then, for each laser point in the laser point cloud data, using a preset nearest neighbor number threshold as the nearest neighbor radius, the spatial index structure tree is used to find the nearest neighbor points corresponding to the laser point as the neighboring point group. Finally, the found neighboring point groups are determined as the set of neighboring point groups. The spatial index structure tree represents the index relationship between the laser points in the laser point cloud data. The preset spatial index generation function interface can be a pre-encapsulated function that can generate a spatial index structure tree. Here, the preset spatial index generation function interface can be a pre-encapsulated function based on an octree structure. The preset nearest neighbor number threshold can be a pre-set nearest neighbor number threshold. For example, the preset nearest neighbor threshold can be 5, meaning that the neighboring point group corresponding to the laser point includes 5 laser points that are closest to the laser point.
[0029] The second step is to perform the following noise reduction process on each laser point in the laser point cloud data above: The first step is to determine the unit normal vector corresponding to the laser point based on the laser point and its corresponding neighborhood point group. In practice, the execution entity determines the unit normal vector corresponding to the laser point through the following steps: The first step is to determine the centroid corresponding to the aforementioned group of neighborhood points. This is determined using the following formula: .
[0030] Among them, the above It can represent the center of mass. (The above...) This can represent a neighborhood point within a neighborhood point group. (The above...) This can represent the index corresponding to a domain point in a domain point group. The above... It can represent the number of points corresponding to the domain points in a domain point group.
[0031] The second step involves constructing the covariance matrix corresponding to the aforementioned neighborhood point group. This is done using the following formula: .
[0032] Among them, the above It can represent the covariance matrix.
[0033] The third step involves performing eigenvalue decomposition on the covariance matrix to obtain the set of eigenvalues corresponding to the covariance matrix. In practice, the executing entity can perform eigenvalue decomposition on the covariance matrix by calling the eigenvalue decomposition function interface to obtain the set of eigenvalues corresponding to the covariance matrix. The eigenvalue decomposition function interface can be a pre-encapsulated function capable of performing eigenvalue decomposition on the covariance matrix.
[0034] The fourth step is to determine the eigenvalue with the smallest corresponding eigenvalue in the above set of eigenvalues as the target normal vector.
[0035] The fifth step involves normalizing the target normal vector to obtain the target unit normal vector, which serves as the unit normal vector corresponding to the laser point. In practice, the execution entity can perform normalization using the following formula: .
[0036] Among them, the above This can represent the target normal vector. (The above...) This can represent a unit normal vector. (The above...) It can represent the Euclidean norm of the target normal vector.
[0037] The second step involves performing the following processing steps for each neighborhood point in the aforementioned neighborhood point group: The first sub-step involves determining the spatial distance and normal distance between the laser point and the surrounding area point. In practice, the executing entity can first determine the spatial distance and normal distance between the laser point and the surrounding area point using the following formula: .
[0038] Among them, the above It can represent spatial distance. (The above) This can represent the Euclidean norm. (The above...) This can represent the normal distance. (The above...) This can represent a laser point. (The above...) This can represent a unit normal vector. (The above...) It can represent and Multiply corresponding elements and then sum them. (The above...) This can be represented by subtracting each element corresponding to the laser point from the corresponding element of the neighborhood point.
[0039] The second sub-step involves generating combined weights based on preset spatial bandwidth parameters, preset normal bandwidth parameters, the aforementioned spatial distance, and the aforementioned normal distance. In practice, the aforementioned execution entity can generate combined weights using the following formula: .
[0040] Among them, the above This can represent the combined weights. (The above...) This can represent the preset spatial bandwidth parameter. (The above...) It can represent the preset normal bandwidth parameter.
[0041] The third sub-step involves generating the accumulated weight coefficients and accumulated weight factors corresponding to the aforementioned neighborhood points, based on the combined weights and normal distances described above. In practice, the executing entity can generate the accumulated weight coefficients and accumulated weight factors corresponding to the aforementioned neighborhood points using the following formula: .
[0042] .
[0043] Among them, the above This can be a cumulative weighting coefficient. (The above...) This can be a cumulative weighting factor. Here, the initial values of both the cumulative weighting coefficient and the cumulative weighting factor are 0.
[0044] The third step is to determine the cumulative weight coefficient and cumulative weight factor of the last corresponding domain point in the above domain point group as the target cumulative weight coefficient and target cumulative weight factor.
[0045] The fourth step involves updating the position of the laser points based on the aforementioned target cumulative weighting coefficients, target cumulative weighting factors, and the unit normal vector corresponding to each laser point. The laser points with updated positions are then used as the denoised laser points. In practice, the execution entity can update the position of the laser points using the following formula: .
[0046] Among them, the above It can represent a laser point. This can represent the laser point after position update, which is the denoised laser point.
[0047] The third step is to use the obtained denoised laser points as denoised point cloud data.
[0048] The first to third steps and related content of the above-mentioned optional solutions constitute an inventive point of this disclosure, solving the aforementioned technical problem: "easily causing blurring of edge and detail features." The reason for this blurring is often that, during the denoising process using the above filtering algorithms, the smoothing filtering is mainly based on the spatial distance (or distance weighting) between laser points, which easily causes blurring of edge and detail features (sharp features of the point cloud surface such as corners and ridges). If the above factors are resolved, edge and detail features can be preserved while smoothing noise. To achieve this effect, firstly, based on the above laser point cloud data, a set of neighboring point groups corresponding to the above laser point cloud data is determined, wherein each laser point in the above laser point cloud data corresponds one-to-one with a neighboring point group in the above neighborhood point group set. Thus, the set of neighboring point groups corresponding to the above laser point cloud data can be obtained, allowing for local filtering of the laser point. Then, for each laser point in the above laser point cloud data, the following denoising processing steps are performed: based on the above laser point and the corresponding neighborhood point group, the unit normal vector corresponding to the above laser point is determined. Therefore, the unit normal vector corresponding to the laser point can be obtained. Since the normal vector defines the local surface orientation of the point, it provides the basis for subsequent calculation of the normal distance and normal displacement. Then, for each neighborhood point in the aforementioned neighborhood point group, the following processing steps are performed: The spatial distance and normal distance corresponding to the laser point and the neighborhood point are determined. This yields the spatial distance used to measure spatial proximity; points that are closer have a greater influence on the current point. Simultaneously, the normal distance measures the height difference between two points along the surface normal. If the two points are on the same smooth surface, the normal distance is small; if they are on different surfaces or edges, the normal distance is large. Next, based on the preset spatial bandwidth parameter, the preset normal bandwidth parameter, the aforementioned spatial distance, and the aforementioned normal distance, a combined weight is generated. This yields the combined weight, which integrates spatial proximity and surface similarity, enabling the filtering to smooth noise while preserving edge and detail features. Then, based on the aforementioned combined weight and the aforementioned normal distance, the accumulated weight coefficient and accumulated weight factor corresponding to the aforementioned neighborhood point are generated. The accumulated weight coefficient and accumulated weight factor of the last neighborhood point in the aforementioned neighborhood point group are determined as the target accumulated weight coefficient and target accumulated weight factor. Thus, the target weight coefficient and target weight factor representing accumulation can be obtained. Then, based on the aforementioned target accumulated weight coefficient, the aforementioned target accumulated weight factor, and the unit normal vector corresponding to the aforementioned laser point, the position of the aforementioned laser point is updated, and the laser point with the updated position is used as the denoised laser point. Thus, the point can be moved along the normal direction, and the distance moved is the weighted average of the projections of all neighboring points onto the normal direction. Since the weights are two-sided, only spatially close and normally similar neighboring points have larger weights, thus edge features can be preserved during the smoothing process.Meanwhile, noise points are usually deviated from the real surface, while their neighboring points are mostly near the real surface. After weighted averaging, the noise points will move towards the real surface, thus achieving a denoising effect. Finally, the obtained denoised laser points are used as denoised point cloud data. As a result, the noise in the denoised point cloud data is suppressed, the surface is smoother, and edge and detail features are preserved.
[0049] Optionally, before performing earthwork segmentation processing on the denoised point cloud data to obtain earthwork point cloud data, the execution entity may also perform the following steps: The first step is to downsample the denoised point cloud data to obtain downsampled point cloud data. This downsampling process can include voxel downsampling, uniform downsampling, and random downsampling. In practice, the execution entity can perform voxel downsampling on the denoised point cloud data to obtain the voxel-downsampled denoised point cloud data as the downsampled point cloud data.
[0050] The second step is to perform registration processing on the downsampled point cloud data to obtain registered point cloud data. In practice, the execution entity can use a preset point cloud registration algorithm to perform registration processing on the downsampled point cloud data to obtain registered point cloud data. Here, the preset point cloud registration algorithm can be a pre-defined registration algorithm. For example, the preset point cloud registration algorithm can be the ICP (Iterative Closest Point) algorithm.
[0051] The third step is to identify the above-mentioned registered point cloud data as denoised point cloud data in order to update the above-mentioned denoised point cloud data.
[0052] Optionally, before performing downsampling processing on the denoised point cloud data to obtain downsampled point cloud data, the execution entity may also perform the following steps: The first step is to perform grayscale conversion on the denoised point cloud data to generate grayscale point cloud data. In practice, the execution entity can convert the denoised point cloud data into grayscale point cloud data by calling the grayscale conversion function interface. Grayscale conversion can be understood as mapping the reflection intensity attribute of each 3D point cloud to a grayscale value range of 0-255. That is, assigning a grayscale attribute value to each point in the 3D point cloud. The grayscale conversion function interface can be a pre-encapsulated function that can convert 3D point cloud data to grayscale.
[0053] The second step involves performing the following processing steps for each grayscale point in the aforementioned grayscale point cloud data: The first step involves, in response to the grayscale value corresponding to the aforementioned grayscale point being greater than or equal to a first preset grayscale threshold, determining the grayscale value corresponding to the aforementioned grayscale point as a second preset grayscale threshold, and updating the grayscale of the aforementioned grayscale point. The first preset grayscale threshold can be a pre-set grayscale threshold. The second preset grayscale threshold can also be a pre-set grayscale threshold. For example, the first preset grayscale threshold can be 80, and the second preset grayscale threshold can be 255.
[0054] The second step involves determining the grayscale value corresponding to the grayscale point as a third preset grayscale threshold in response to the grayscale value being less than the first preset grayscale threshold, thereby updating the grayscale value of the grayscale point. The third preset grayscale threshold can be a pre-set grayscale threshold. For example, the third preset grayscale threshold can be 0.
[0055] The third step is to determine the point cloud composed of each gray point after updating according to the second preset gray threshold as the gray-level updated point cloud.
[0056] The fourth step involves using a water surface data restoration algorithm to restore the data of each grayscale point after the corresponding third preset grayscale threshold update, resulting in a restored point cloud. Here, the water surface restoration algorithm can be a GAN (Generative Adversarial Network).
[0057] The fifth step is to identify the above-mentioned grayscale updated point cloud and the above-mentioned repaired point cloud as denoised point cloud data, and then update the above-mentioned denoised point cloud data.
[0058] Steps one through five of the aforementioned optional solutions, along with their related content, constitute an inventive point of this disclosure, solving the aforementioned technical problem: "data sparsity or data black holes in the corresponding water area of the lidar." The reason for data sparsity in the corresponding water area of the lidar is often that, during data acquisition using lidar, the impact of natural conditions is relatively small (unlike oblique photography, which is significantly affected by natural conditions). Therefore, when processing the relevant data, the influence of the natural environment on the data is often not considered, especially during rainy weather. The lidar's emitted laser light receives low reflectivity when encountering water, resulting in data sparsity (or data black holes) in the corresponding water area. If these factors are addressed, data repair can be performed on the sparse data in the corresponding water area. To achieve this effect, firstly, the aforementioned denoised point cloud data is grayscale-converted to generate grayscale point cloud data. This grayscale point cloud data allows for the differentiation between point cloud data representing the water surface and point cloud data representing the ground. Then, for each grayscale point in the aforementioned grayscale point cloud data, the following processing steps are performed: In response to a grayscale value greater than or equal to a first preset grayscale threshold, the grayscale value corresponding to the grayscale point is determined as a second preset grayscale threshold to update the grayscale of the grayscale point. This allows for grayscale updates of each grayscale point representing the ground. Next, in response to a grayscale value less than the first preset grayscale threshold, the grayscale value corresponding to the grayscale point is determined as a third preset grayscale threshold to update the grayscale of the grayscale point. This allows for grayscale updates of each grayscale point representing the water surface. Then, the point cloud composed of the grayscale points updated according to the second preset grayscale threshold is determined as the updated grayscale point cloud. This yields the grayscale-updated ground point cloud data. Then, a water surface data restoration algorithm is used to restore the data of each grayscale point updated according to the third preset grayscale threshold, resulting in a restored point cloud. This allows for data restoration of the point cloud data corresponding to the water surface to conform to real physical water surface data. Finally, the grayscale updated point cloud and the repaired point cloud are identified as the denoised point cloud data, and the denoised point cloud data is used to update the denoised point cloud data. Thus, point cloud data representing the target area's true physical condition is obtained.
[0059] Step 203: Perform earthwork segmentation processing on the denoised point cloud data to obtain earthwork point cloud data.
[0060] In some embodiments, the aforementioned execution entity may perform earthwork segmentation processing on the aforementioned denoised point cloud data to obtain earthwork point cloud data.
[0061] In practice, as an example, the aforementioned execution entity can use the K-means clustering algorithm to perform earthwork segmentation on the denoised point cloud data to obtain earthwork point cloud data. This earthwork point cloud data can represent areas within the target region that require targeted earthwork excavation and filling. As another example, the aforementioned execution entity can also use DGCNN (Dynamic Graph CNN for Learning on Point Clouds) to perform earthwork segmentation on the denoised point cloud data to obtain earthwork point cloud data.
[0062] In some optional implementations of certain embodiments, the aforementioned execution entity can perform earthwork segmentation processing on the aforementioned denoised point cloud data to obtain earthwork point cloud data in the following manner: The first step is to determine the target denoised point set based on the aforementioned denoised point cloud data. This target denoised point set includes three denoised points randomly selected from the aforementioned denoised point cloud data. In practice, the executing entity can arbitrarily select three non-collinear denoised points from the denoised point cloud data as the target denoised point set. Then, the target denoised point set can be determined by selecting multiple target denoised point sets (e.g., 100 times, selecting three points each time).
[0063] The second step is to perform the following segmentation steps for each target denoising point group in the above target denoising point group set: The first step is to determine the corresponding plane equation based on the aforementioned target denoising point group. In practice, the execution entity can substitute each target denoising point included in the target denoising point group into the following plane equation to determine the parameters a, b, c, and d corresponding to the plane equation, thereby completing the construction of the plane equation: .
[0064] The second step is to identify each denoised point in the denoised point cloud data other than the target denoised point group as the point cloud data to be segmented.
[0065] The third step is to determine the distance set based on the aforementioned point cloud data to be segmented and the aforementioned plane equation. In practice, firstly, for each point to be segmented in the aforementioned point cloud data, the executing entity can determine the Euclidean distance from the point to be segmented to the aforementioned plane equation as the distance. Then, the determined distances can be used to form a distance set.
[0066] The fourth step involves determining the planar point cloud data based on a preset distance threshold and the aforementioned distance set. In practice, firstly, for each distance in the aforementioned distance set, in response to a distance being less than or equal to the preset distance threshold, the point in the point cloud data to be segmented corresponding to that distance is determined as a planar point. Then, the executing entity can define each determined planar point as planar point cloud data. This planar point cloud data can represent areas within the target region where earthwork construction is not required.
[0067] The fifth step is to determine the number of planar points included in the above planar point cloud data as the planar point quantity information.
[0068] The third step is to determine the plane point quantity information with the largest corresponding plane point quantity value among the determined plane point quantity information as the target plane point quantity information.
[0069] The fourth step is to determine the planar point cloud data corresponding to the above target planar point quantity information as the target planar point cloud data.
[0070] The fifth step is to determine the earthwork point cloud data based on the target plane point cloud data mentioned above.
[0071] In practice, the aforementioned implementing entity can determine the earthwork point cloud data based on the target planar point cloud data through the following steps: The first step is to update the plane equations corresponding to the target plane point cloud data using a preset segmentation algorithm to generate updated plane equations. The preset segmentation algorithm can be a pre-defined earthwork segmentation algorithm. Specifically, the preset segmentation algorithm can be a least-squares algorithm.
[0072] The second step involves extracting earthwork points from the denoised point cloud data based on the updated plane equations, obtaining the earthwork point cloud as the target earthwork point cloud data. In practice, the execution entity can extract earthwork points from the denoised point cloud data using the following steps to obtain the target earthwork point cloud data: The first extraction step involves determining the update distance for each denoised point in the denoised point cloud data, from the denoised point to the update plane equation, thus obtaining a set of update distances. Here, the above distances can be Euclidean distances.
[0073] In the second extraction step, for each update distance in the aforementioned update distance set, in response to the update distance being greater than a preset update distance threshold, the denoised point corresponding to the update distance is determined as an earthwork point. Here, the preset update distance threshold can be a pre-set update distance threshold. For example, the preset update distance threshold can be 0.1.
[0074] The third extraction step is to determine the point cloud composed of the identified earthwork points as the target earthwork point cloud data.
[0075] The third step involves performing the following processing steps for each target earthwork point in the aforementioned target earthwork point cloud data: The first processing step is to determine the set of nearest neighbor earthwork points corresponding to the target earthwork point. In practice, the execution entity can use the KD-Tree (K-DimensionalTree, tree data structure) algorithm to perform a nearest neighbor search on the k target earthwork points in the target earthwork point cloud data to obtain the set of nearest neighbor earthwork points. Here, k represents the k nearest neighbor earthwork points.
[0076] The second processing step involves determining the set of nearest earthwork distances based on the target earthwork point and the set of nearest earthwork points. In practice, firstly, for each nearest earthwork point in the set of nearest earthwork points, the executing entity can determine the Euclidean distance between the target earthwork point and the nearest earthwork point as the nearest earthwork distance. Then, the determined nearest earthwork distances can be used to form the set of nearest earthwork distances.
[0077] The third processing step is to determine the average earthwork distance information based on the aforementioned set of nearest-neighbor earthwork distances. In practice, the executing entity can determine the average earthwork distance information as the average value of each nearest-neighbor earthwork distance included in the aforementioned set of nearest-neighbor earthwork distances.
[0078] The fourth step is to define the determined average earthwork distance information into a set of average earthwork distance information.
[0079] Fifth, based on the aforementioned set of average earthwork distance information, determine the mean and variance information corresponding to the target earthwork point cloud data. In practice, the executing entity can determine the mean and variance information corresponding to the target earthwork point cloud data using the following formula: .
[0080] .
[0081] Among them, the above It can represent variance information. The above This can represent the sequence number corresponding to the average earthwork distance information in the set of average earthwork distance information. The above... It can represent the first in the set of average earthwork distance information. Average earthwork distance information. (The above) This can represent the number of each average earthwork distance information item included in the aforementioned average earthwork distance information set. It can represent mean information.
[0082] Step 6: Based on the aforementioned mean information, variance information, and preset coefficients, generate the distance threshold. In practice, the executing entity can generate the distance threshold using the following formula: .
[0083] Among them, the above This can represent a preset coefficient (which is a constant). The above... It can represent a distance threshold.
[0084] Step 7: Determine the set of average earthwork distances that are less than the above-mentioned distance threshold from the set of average earthwork distances above as the set of average earthwork distances to be denoised.
[0085] The eighth step is to determine the point cloud formed by each target earthwork point in the target earthwork point cloud data that corresponds to the set of average distance information of the denoised earthwork.
[0086] Step 204: Slice the earthwork point cloud data to obtain an earthwork slice point cloud sequence.
[0087] In some embodiments, the aforementioned execution entity may slice the aforementioned earthwork point cloud data to obtain an earthwork slice point cloud sequence.
[0088] In practice, the aforementioned executing entity can slice the earthwork point cloud data using the horizontal plane with the smallest corresponding ordinate value among all earthwork points as the lowest horizontal slice, the horizontal plane with the largest corresponding ordinate value among all earthwork points as the highest horizontal slice, and a preset slice thickness as the earthwork slice thickness, to obtain an earthwork slice point cloud sequence. As an example, a schematic diagram of the earthwork point cloud data slicing method can be found here. Figure 3 . Figure 3 In the diagram, H1 can be the lowest horizontal section, and Hn can be the highest horizontal section. The distance between two adjacent horizontal sections can be a preset slice thickness. There is a corresponding earthwork slice point cloud between two adjacent horizontal sections. The earthwork slice point clouds together form an earthwork slice point cloud sequence.
[0089] Step 205: For each earthwork slice point cloud in the earthwork slice point cloud sequence, perform the following earthwork volume measurement steps: Step 2051: Determine the earthwork slice outline corresponding to the earthwork slice point cloud.
[0090] In some embodiments, the aforementioned execution entity may determine the earthwork slice outline corresponding to the aforementioned earthwork slice point cloud.
[0091] In practice, as an example, the aforementioned execution entity can determine the earthwork slice contour corresponding to the earthwork slice point cloud by using a convex hull contour search algorithm. As another example, the aforementioned execution entity can also determine the earthwork slice contour corresponding to the earthwork slice point cloud by using a 360° planar ray scanning contour search algorithm.
[0092] In some optional implementations of certain embodiments, the aforementioned execution entity may determine the earthwork slice outline corresponding to the earthwork slice point cloud through the following steps: The first step is to project the earthwork slice point cloud onto a preset coordinate plane to obtain the projected earthwork slice point cloud. Here, the preset coordinate plane can be a pre-defined coordinate plane, which can be the xoy coordinate plane.
[0093] The second step is to perform the following earthwork contour point determination steps for each projected earthwork slice point in the above projected earthwork slice point cloud: The first determination step involves identifying the set of earthwork territory points corresponding to the projected earthwork slice points based on a preset radius. The preset radius can be a pre-defined radius, such as 0.1m. In practice, the executing entity can determine the set of earthwork territory points corresponding to the projected earthwork slice points as those whose distance from the projected earthwork slice point meets a preset distance condition. This preset distance condition can be a preset radius where the distance from the projected earthwork slice point is less than or equal to twice the preset radius.
[0094] The second determination step involves performing the following steps for each earthwork area point in the aforementioned set of earthwork area points: The first sub-step involves determining the set of earthwork circle centers that pass through the aforementioned projected earthwork slice points and earthwork territory points, and whose corresponding radii are preset. This set of earthwork circle centers includes a first earthwork circle center and a second earthwork circle center. Only two circles pass through the aforementioned projected earthwork slice points and earthwork territory points and have a preset radius. For example, a schematic diagram of the circle center set coordinates can be found here. Figure 4 . Figure 4 In this context, r can be a preset radius. A and B are the projected earthwork slice point and the aforementioned earthwork area point, respectively. In practice, the aforementioned execution entity can determine the set of earthwork circle centers using the following formula: .
[0095] Among them, the above The above. The above. and The center of a circle passing through the aforementioned projected earthwork slice points and the aforementioned earthwork area points, with a radius of a preset radius. Specifically, the aforementioned... This can be considered the center of the first earthen circle. (The above...) This can be the center of the second earthwork circle. (The above...) This can be the x-coordinate of the center of the first earthwork circle. (The above...) This can be the x-coordinate of the center of the second earthwork circle. (The above...) This can be the ordinate of the center of the first earthwork circle. (The above...) This can be the ordinate of the center of the second earthwork circle. (The above...) This can be the x-coordinate of the projected earthwork slice point. (The above...) This can be the x-coordinate of the earthwork area. (The above...) This can be the ordinate of the projected earthwork slice points. (The above...) It can be the ordinate of the earthwork area.
[0096] The second sub-step is to determine all earthwork area points other than the earthwork area points in the above earthwork area point set as the target earthwork area point set.
[0097] The third sub-step is to determine the distance between each target earthwork area point included in the above target earthwork area point set and the center of the above first earthwork circle as the first earthwork distance set.
[0098] The fourth sub-step is to determine the distance between each target earthwork area point included in the above target earthwork area point set and the center of the above second earthwork circle as the second earthwork distance set.
[0099] The fifth sub-step is to determine, in response to the determination that each of the first earthwork distances included in the first earthwork distance set is greater than the preset radius, and each of the second earthwork distances included in the second earthwork distance set is greater than the preset radius, the projected earthwork slice point is determined as the earthwork slice outline point.
[0100] The third step is to define the contour formed by the determined earthwork slice contour points as the earthwork slice contour corresponding to the projected earthwork slice point cloud mentioned above. For example, a schematic diagram of the earthwork slice contour points can be referenced. Figure 5 .
[0101] Step 2052: Determine the area of the earthwork slice corresponding to the earthwork slice outline based on the earthwork slice outline.
[0102] In some embodiments, the execution entity can determine the area of the earthwork slice corresponding to the earthwork slice outline based on the earthwork slice outline. In practice, firstly, the execution entity can sort the earthwork slice outline points included in the earthwork slice outline according to the generation time of the laser points corresponding to the earthwork slice outline points, obtaining the sorted earthwork slice outline points as the earthwork slice outline point sequence. Then, the area of the earthwork slice corresponding to the earthwork slice outline can be determined according to the following formula: .
[0103] Among them, when the target exceeds season The above. This can represent the number of earthwork slice outline points in the earthwork slice outline point sequence. The above... This can represent the area of an earthwork slice. (The above...) This can represent the sequence number of the earthwork slice outline points in the earthwork slice outline point sequence. The above... It can represent the first point in the earthwork slice outline point sequence. The x-coordinates of the contour points of each earthwork slice. (The above...) It can represent the x-coordinate of the first earthwork slice outline point in the earthwork slice outline point sequence. It can represent the first point in the earthwork slice outline point sequence. The x-coordinates of the contour points of each earthwork slice. (The above...) It can represent the first point in the earthwork slice outline point sequence. The ordinates of the contour points of each earthwork slice. (The above...) It can represent the first point in the earthwork slice outline point sequence. The ordinates of the contour points of each earthwork slice.
[0104] In some optional implementations of certain embodiments, the execution entity may determine the earthwork slice area corresponding to the earthwork slice outline by means of the following steps: The first step is to generate a sequence of earthwork slice outline points based on the earthwork slice outline points included in the above earthwork slice outline. In practice, the execution entity can sort the earthwork slice outline points according to the generation time of the laser points corresponding to the earthwork slice outline points, and obtain the sorted earthwork slice outline points as the earthwork slice outline point sequence.
[0105] The second step is to generate a sequence of earthwork slice outline points based on the aforementioned sequence of earthwork slice outline points. In practice, the executing entity can determine every two adjacent earthwork slice outline points in the aforementioned sequence as a group of earthwork slice outline points, thus obtaining a sequence of earthwork slice outline point groups. The earthwork slice outline point groups in the aforementioned sequence can include: a first earthwork slice outline point and a second earthwork slice outline point. The sequence number of the first earthwork slice outline point in the aforementioned sequence is less than the sequence number of the second earthwork slice outline point in the aforementioned sequence.
[0106] Third, for each earthwork slice outline point group in the above sequence of earthwork slice outline points, perform the following area generation steps: In the first generation step, the difference between the abscissa of the second earthwork slice contour point and the abscissa of the first earthwork slice contour point in the above earthwork slice contour point group is determined as the abscissa earthwork difference value.
[0107] The second generation step is to determine the difference between the ordinate of the second earthwork slice contour point and the ordinate of the first earthwork slice contour point in the above earthwork slice contour point group as the ordinate earthwork difference value.
[0108] The third generation step is to determine the first earthwork area by multiplying the abscissa of the first earthwork slice outline point with the earthwork difference of the ordinate.
[0109] The fourth generation step is to determine the second earthwork area information by multiplying the ordinate of the first earthwork slice outline point with the earthwork difference of the abscissa.
[0110] The fifth generation step is to determine the difference between the first earthwork area information and the second earthwork area information as the third earthwork area information.
[0111] The sixth generation step is to determine half of the sum of the determined third earthwork area information as the earthwork slice area corresponding to the earthwork slice outline.
[0112] Step 2053: Generate the volume of the earthwork point cloud corresponding to the earthwork point cloud based on the earthwork slice area.
[0113] In some embodiments, the execution entity can generate the earthwork slice point cloud volume corresponding to the earthwork slice point cloud based on the earthwork slice area.
[0114] In practice, the aforementioned implementing entity can determine the volume of the earthwork point cloud corresponding to the earthwork point cloud by multiplying the earthwork slice area and the earthwork slice thickness.
[0115] Step 206: The sum of the volumes of the generated earthwork slice point clouds is determined as the earthwork construction volume corresponding to the target area.
[0116] In some embodiments, the executing entity may determine the sum of the volumes of the generated earthwork slice point clouds as the earthwork construction volume corresponding to the target area. In practice, the executing entity may determine the sum of the volumes of the generated earthwork slice point clouds as the earthwork construction volume corresponding to the target area.
[0117] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an earthwork volume measurement device based on lidar. These device embodiments are similar to... Figure 2Corresponding to the method embodiments shown, this lidar-based earthwork measurement device can be specifically applied to various electronic devices.
[0118] like Figure 6 As shown, a lidar-based earthwork measurement device 600 in some embodiments includes: a data acquisition unit 601, a denoising unit 602, an earthwork segmentation unit 603, a slicing unit 604, an earthwork measurement unit 605, and a determination unit 606. The data acquisition unit 601 is configured to acquire data from a target area using a lidar mounted on a drone, obtaining lidar point cloud data, wherein the target area is the area where earthwork construction is required. The denoising unit 602 is configured to denoise the lidar point cloud data, obtaining denoised point cloud data. The earthwork segmentation unit 603 is configured to segment the denoised point cloud data, obtaining earthwork point cloud data. The slicing unit 604 is configured to slice the earthwork point cloud data, obtaining earthwork slice points. The earthwork volume measurement unit 605 is configured to perform the following earthwork volume measurement steps for each earthwork slice point cloud in the above earthwork slice point cloud sequence: determine the earthwork slice outline corresponding to the above earthwork slice point cloud; determine the earthwork slice area corresponding to the above earthwork slice outline based on the above earthwork slice outline; generate the earthwork slice point cloud volume corresponding to the above earthwork slice point cloud based on the above earthwork slice area; the determining unit 606 is configured to determine the sum of the generated volumes of each earthwork slice point cloud as the earthwork construction volume corresponding to the above target area.
[0119] It is understandable that the units described in the lidar-based earthwork measurement device 600 are related to the reference... Figure 2 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the lidar-based earthwork measurement device 600 and the units contained therein, and will not be repeated here.
[0120] The following is for reference. Figure 7 It shows a schematic diagram of the structure of an electronic device (e.g., a computing device) 700 suitable for implementing some embodiments of the present disclosure. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0121] like Figure 7As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory 702 or a program loaded from a storage device 708 into a random access memory 703. The random access memory 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, the read-only memory 702, and the random access memory 703 are interconnected via a bus 704. An input / output interface 705 is also connected to the bus 704.
[0122] Typically, the following devices can be connected to the input / output interface 705: input devices 706 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 708 including, for example, magnetic tape, hard disk, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 7 Each box shown can represent a device or multiple devices as needed.
[0123] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a storage device 708, or installed from a read-only memory 702. When the computer program is executed by the processing device 701, it performs the functions defined in the methods of some embodiments of this disclosure.
[0124] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0125] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0126] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: collect data on a target area using a lidar mounted on a drone, obtaining lidar point cloud data, wherein the target area is an area requiring earthwork construction; denoise the lidar point cloud data to obtain denoised point cloud data; segment the denoised point cloud data into earthwork point cloud data; slice the earthwork point cloud data to obtain an earthwork slice point cloud sequence; for each earthwork slice point cloud in the earthwork slice point cloud sequence, perform the following earthwork volume measurement steps: determine the earthwork slice outline corresponding to the earthwork slice point cloud; determine the earthwork slice area corresponding to the earthwork slice outline based on the earthwork slice outline; generate the earthwork slice point cloud volume corresponding to the earthwork slice point cloud based on the earthwork slice area; and determine the sum of the generated earthwork slice point cloud volumes as the earthwork construction volume corresponding to the target area.
[0127] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0129] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0130] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for measuring earthwork volume based on lidar, characterized in that, include: Data is collected from the target area by a lidar mounted on a drone to obtain lidar point cloud data, wherein the target area is the area where earthwork construction is required; The laser point cloud data is denoised to obtain denoised point cloud data; The denoised point cloud data is subjected to earthwork segmentation processing to obtain earthwork point cloud data; The earthwork point cloud data is sliced to obtain an earthwork slice point cloud sequence; For each earthwork slice point cloud in the earthwork slice point cloud sequence, perform the following earthwork volume measurement steps: Determine the earthwork slice outline corresponding to the earthwork slice point cloud; Based on the earthwork slice outline, determine the earthwork slice area corresponding to the earthwork slice outline; Based on the area of the earthwork slice, generate the volume of the earthwork slice point cloud corresponding to the earthwork slice point cloud; The sum of the volumes of the generated earthwork slice point clouds is determined as the earthwork construction volume corresponding to the target area.
2. The method according to claim 1, characterized in that, Before performing earthwork segmentation processing on the denoised point cloud data to obtain earthwork point cloud data, the method further includes: The denoised point cloud data is downsampled to obtain downsampled point cloud data; The downsampled point cloud data is registered to obtain registered point cloud data; The registered point cloud data is identified as denoised point cloud data, and the denoised point cloud data is updated accordingly.
3. The method according to claim 1, characterized in that, The step of performing earthwork segmentation processing on the denoised point cloud data to obtain earthwork point cloud data includes: Based on the denoised point cloud data, a target denoised point set is determined, wherein the target denoised point set in the target denoised point set includes three denoised points randomly selected from the denoised point cloud data; For each target denoised point group in the target denoised point group set, the following segmentation steps are performed: Based on the target denoised point group, determine the plane equation corresponding to the target denoised point group; Each denoised point in the denoised point cloud data, excluding the target denoised point group, is determined as the point cloud data to be segmented; Based on the point cloud data to be segmented and the plane equation, determine the distance set; Based on a preset distance threshold and the distance set, planar point cloud data is determined; The number of planar points included in the planar point cloud data is determined as the planar point quantity information; The plane point with the largest corresponding plane point quantity value among the determined plane point quantity information is determined as the target plane point quantity information; The planar point cloud data corresponding to the target planar point quantity information is determined as the target planar point cloud data; Based on the target plane point cloud data, determine the earthwork point cloud data.
4. The method according to claim 3, characterized in that, The step of determining the earthwork point cloud data based on the target planar point cloud data includes: Using a preset segmentation algorithm, the plane equation corresponding to the target plane point cloud data is updated to generate an updated plane equation; Based on the updated plane equation, earthwork points are extracted from the denoised point cloud data to obtain earthwork point cloud as target earthwork point cloud data. For each target earthwork point in the target earthwork point cloud data, perform the following processing steps: Determine the set of nearest neighbor earthwork points corresponding to the target earthwork point; Based on the target earthwork point and the set of nearest earthwork points, determine the set of nearest earthwork distances; Based on the set of nearest neighbor earthwork distances, determine the average earthwork distance information; The determined average values of each earthwork distance are used to form a set of average earthwork distance information. Based on the set of average earthwork distance information, determine the mean and variance information corresponding to the target earthwork point cloud data; A distance threshold is generated based on the mean information, the variance information, and the preset coefficients; Each average earthwork distance in the set of average earthwork distances that is less than the distance threshold is determined as the set of average earthwork distances for noise reduction. The point cloud formed by each target earthwork point in the target earthwork point cloud data and corresponding to the set of average distance information of the denoised earthwork is determined as earthwork point cloud data.
5. The method according to claim 1, characterized in that, Determining the earthwork slice outline corresponding to the earthwork slice point cloud includes: The earthwork slice point cloud is projected onto a preset coordinate plane to obtain the projected earthwork slice point cloud; For each projected earthwork slice point in the projected earthwork slice point cloud, perform the following earthwork contour point determination steps: Based on the preset radius, determine the set of earthwork area points corresponding to the projected earthwork slice points; For each earthwork area point in the set of earthwork area points, perform the following steps: Determine the set of earthwork circle centers that pass through the projected earthwork slice point and the earthwork area point, and whose corresponding radius is the preset radius, wherein the set of earthwork circle centers includes: a first earthwork circle center and a second earthwork circle center; Each earthwork area point in the earthwork area point set other than the earthwork area point is determined as the target earthwork area point set. The distances between each target earthwork area point included in the target earthwork area point set and the center of the first earthwork circle are determined as the first earthwork distance set; The distances between each target earthwork area point included in the target earthwork area point set and the center of the second earthwork circle are determined as the second earthwork distance set; In response to determining that each of the first earthwork distances included in the first earthwork distance set is greater than the preset radius, and that each of the second earthwork distances included in the second earthwork distance set is greater than the preset radius, the projected earthwork slice point is determined as an earthwork slice outline point. The contour formed by the determined contour points of each earthwork slice is defined as the earthwork slice contour corresponding to the projected earthwork slice point cloud.
6. The method according to claim 5, characterized in that, The step of determining the earthwork slice area corresponding to the earthwork slice outline based on the earthwork slice outline includes: Based on the earthwork slice outline points included in the earthwork slice outline, a sequence of earthwork slice outline points is generated. Based on the earthwork slice outline point sequence, an earthwork slice outline point group sequence is generated, wherein the earthwork slice outline point group sequence includes: a first earthwork slice outline point and a second earthwork slice outline point. For each earthwork slice contour point group in the earthwork slice contour point group sequence, perform the following area generation steps: The difference between the abscissa of the second earthwork slice contour point and the abscissa of the first earthwork slice contour point in the earthwork slice contour point group is determined as the abscissa earthwork difference value. The difference between the ordinate of the second earthwork slice contour point and the ordinate of the first earthwork slice contour point in the earthwork slice contour point group is determined as the ordinate earthwork difference value. The product of the abscissa of the first earthwork slice outline point and the earthwork difference of the ordinate is determined as the first earthwork area information; The product of the vertical coordinate of the first earthwork slice outline point and the earthwork difference value of the horizontal coordinate is determined as the second earthwork area information; The difference between the first earthwork area information and the second earthwork area information is determined as the third earthwork area information; Half of the sum of the determined third earthwork area information is determined as the earthwork slice area corresponding to the earthwork slice outline.
7. An earthwork volume measurement device based on lidar, characterized in that, include: The data acquisition unit is configured to acquire data from the target area using a lidar mounted on the drone to obtain lidar point cloud data, wherein the target area is the area where earthwork construction is required. A denoising unit is configured to denoise the laser point cloud data to obtain denoised point cloud data. The earthwork segmentation unit is configured to perform earthwork segmentation processing on the denoised point cloud data to obtain earthwork point cloud data. The slicing unit is configured to slice the earthwork point cloud data to obtain an earthwork slice point cloud sequence. The earthwork volume measurement unit is configured to perform the following earthwork volume measurement steps for each earthwork slice point cloud in the earthwork slice point cloud sequence: determine the earthwork slice outline corresponding to the earthwork slice point cloud; determine the earthwork slice area corresponding to the earthwork slice outline based on the earthwork slice outline; and generate the earthwork slice point cloud volume corresponding to the earthwork slice point cloud based on the earthwork slice area. The determining unit is configured to determine the sum of the volumes of the generated earthwork slice point clouds as the earthwork construction volume corresponding to the target area.
8. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 6.
9. A computer-readable medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 6.