A method for measuring the volume of a stockpile based on slam
By using a SLAM-based method, solid-state lidar and inertial odometry are used to acquire point clouds of stockpiles, and point cloud preprocessing and Delaunay triangulation are performed. This solves the problems of low accuracy and efficiency in stockpile volume measurement, and realizes high-precision and simple volume measurement of irregularly shaped stockpiles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF MINING & TECH
- Filing Date
- 2024-01-11
- Publication Date
- 2026-07-24
Smart Images

Figure CN118066997B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for measuring the volume of stockpiles, specifically a SLAM-based method for measuring the volume of stockpiles, belonging to the field of three-dimensional volume measurement technology. Background Technology
[0002] The measurement of stockpile volume is of significant research importance and application value in various engineering projects. Whether it's earthwork from building construction and road construction, or coal piles from coal mining, the measurement of stockpile volume is crucial. The calculation of earthwork volume directly affects project cost, while the calculation of coal pile volume directly affects output and revenue. Currently, there are two main methods for measuring the volume of stockpiles: one is the traditional manual method, such as direct measurement with a tape measure; the other is indirect measurement using relatively advanced equipment, such as drones. Traditional manual methods, while accurate, are time-consuming when measuring large or irregularly shaped stockpiles, requiring extensive measurement points and lengthy post-measurement calculations, resulting in low efficiency. While drone measurement offers rapid volume measurement, it demands skilled drone operators who must maneuver the drone to a safe distance above the stockpile and maintain a consistent flight speed to acquire the necessary data. This method presents challenges for most frontline workers, including equipment difficulties, and variations in operator skill levels can lead to significant measurement errors.
[0003] Based on the aforementioned problems, one of the research directions in this industry is to provide a new method for measuring stockpiles that can ensure both good measurement accuracy and efficiency, is easy for frontline workers to operate, and has minimal error when measured by different personnel. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention provides a SLAM-based method for measuring the volume of stockpiles. This method ensures good measurement accuracy and efficiency while being easy for frontline workers to operate. Furthermore, the measurement error is minimal when performed by different personnel, demonstrating good consistency.
[0005] To achieve the above objectives, the technical solution adopted by this invention is: a SLAM-based method for measuring stockpile volume, the specific steps of which are as follows:
[0006] Step 1: Obtain the original point cloud of the stockpile: The operator turns on the measuring device and holds it at a certain distance from the stockpile to be measured, circling the stockpile at a constant speed to scan it. The original point cloud of the stockpile is then acquired using the FastLIO2 algorithm. FastLIO2 is a fast and robust laser inertial odometry framework that uses an iterative extended Kalman filter to achieve tight coupling between the lidar feature points and the inertial odometry. It can robustly locate and map (i.e., SLAM) in degenerate environments such as fast movement, noise, or repetitive textures.
[0007] Step 2, Point Cloud Extraction and Preprocessing: Extract the ROI of the point cloud from the original point cloud obtained in Step 1 based on the Odom information, and then perform point cloud preprocessing to remove useless point clouds to obtain the processed point cloud.
[0008] Step 3, Triangulation: Project the point cloud processed in Step 2 onto a two-dimensional plane to obtain the bottom point cloud, and then triangulate the bottom point cloud.
[0009] Step 4, Volume Calculation: Map the triangular base point cloud obtained from step 3 back to 3D space to obtain several approximate triangular prism models. By accumulating and calculating the volume of these triangular prism models, the volume of the material pile point cloud can be obtained.
[0010] Furthermore, the measuring device includes a housing, a solid-state lidar (LiDAR), an inertial odometry (IMU), a data processor, and a display screen. The solid-state lidar, the inertial odometry, and the data processor are all housed within the housing, and the display screen is mounted on the surface of the housing. The solid-state lidar is used to acquire point cloud data of the stockpile and feed it back to the data processor. The inertial odometry is used to simultaneously acquire the pose and odometer data of the measuring device while the solid-state lidar is acquiring point cloud data and feed it back to the data processor. The data processor is used to analyze and process the feedback data to obtain the stockpile volume and send it to the display screen for display.
[0011] Furthermore, the distance between the object and the stockpile during step one is determined based on the height of the stockpile; the higher the stockpile, the greater the distance.
[0012] Furthermore, the specific steps of step two are as follows:
[0013] A. Point Cloud ROI Extraction Based on Odom Information: Since step one involves the measuring equipment circling the stack to obtain point cloud data, the point cloud is confined to a region bounded by the walking trajectory. Therefore, the x and y coordinates of the inertial odometry information Odom (Odometry) output by the FastLIO2 algorithm are used as boundary conditions. A pass-through filter is added to the original point cloud to obtain a coarse point cloud ROI. The specific process is as follows: 1) Due to the high output frequency of the inertial odometry, Odom is first sampled and a series of point coordinates (Odom.x, Odom.y, Odom.z) are extracted; 2) The maximum and minimum values of the x and y coordinates are calculated, which are Odom.x, Odom.y, and Odom.z, respectively. MAX Odom.x MIN Odom.y MAX Odom.y MIN 3) Using the coordinate values obtained in step 2) as a threshold, perform pass-through filtering before saving the map pcd file to obtain a point cloud file ROI.pcd with a vertical projection of a rectangle.
[0014] B. Point cloud preprocessing: Although ROI.pcd was obtained by extracting ROI from the point cloud, the number of point clouds is still large, and it inevitably records messy point clouds and noisy point clouds other than the material pile; therefore, a preprocessing process is required.
[0015] ① Point Cloud Downsampling: The point cloud file ROI.pcd is downsampled using a voxel filtering algorithm (VoxelGrid). This method reduces the number of points while preserving their shape. In the voxel filtering algorithm, a 3D voxel grid is first created based on the input point cloud data. Then, all points within each voxel are approximated using the centroid of the set of points within that voxel. The specific process is as follows:
[0016] 1) Find the maximum and minimum x, y, and z coordinates of the original point cloud L containing m points. MAX ,y MAX ,z MAX x MIN ,y MIN ,z MIN Therefore, establish a structure with length, width, and height of l. x =x MAX -x MIN , l y =y MAX -y MIN , l z =z MAX -z MIN The smallest bounding box;
[0017] 2) If the voxel grid side length is set to r, the original point cloud is divided into N = N x ×Ny ×N z N grids, where N x =∨(l x / r), N y =∨(l y / r), N z =∨(l z / r), ∨(g) represents rounding down; 3) Number each voxel grid and calculate the centroid of all points in the grid, and use the calculated centroid point p o As the downsampled points The numerator is the sum of the coordinates of points within each voxel grid, and the denominator is the total number of points within each voxel grid.
[0018] ②RANSAC ground segmentation and point cloud transformation:
[0019] Ⅰ. The point cloud data processed in step ① is segmented into the ground using the RANSAC (RandomSampleConsensus) segmentation algorithm. RANSAC is a method for iteratively calculating mathematical model parameters on a series of data containing outliers.
[0020] II. Since the coordinates of the original point cloud in the world coordinate system (which depends on the radar's initial pose) are dependent on the radar's initial pose, the change in the radar's initial pose during each scan measurement increases the difficulty of parameter adjustment in each stage and the effectiveness of the algorithm. Therefore, a point cloud coordinate system transformation is required. In step I, during ground segmentation using RANSAC, a planar model M of the ground can be obtained. i Ax + By + Cd + D = 0, normal vector of the XOY plane Therefore, the ground normal vector can be calculated. and rotating shaft And the rotation angle θ, and then use the axis-angle relationship to realize the point cloud rotation transformation operation;
[0021] ③ Point cloud filtering: Due to factors such as sensor error, the original point cloud surface of the target inevitably has some noisy points. Since they are relatively sparse in distribution relative to the target point cloud, they are called outliers. Therefore, the point cloud data processed in step ② is filtered out by statistical filtering algorithm, and the pile point cloud is extracted after clustering.
[0022] ④ MLS point cloud smoothing: Due to the inherent defects of SLAM, the point cloud obtained on the surface of the stockpile sometimes has the problem of "local overthickness", which is not good for the bottom projection and triangulation effect. Therefore, the moving least squares method is used to smooth the stockpile point cloud cluster after step ③. MLS is a method to fit the data by minimizing the sum of squared errors.
[0023] Furthermore, Delaunay triangulation is used to triangulate the point cloud, resulting in the following properties after triangulation: 1) the circumcircles of all triangles satisfy the empty circle property; 2) among all triangulations of a given point set P, the minimum angle obtained by Delaunay triangulation is the largest; 3) among all triangulations of a given point set, the radius of the largest circumcircle obtained by Delaunay triangulation is the smallest; 4) if any four points in point set P are not concyclic, then there exists a unique Delaunay triangulation; if four points A, B, C, and D in point set P are concyclic, and VABC and VBCD belong to Delaunay triangulation T, then the triangulation T' (containing VABD and VACD) obtained by flipping edge BC is also a Delaunay triangulation.
[0024] Furthermore, step four specifically involves: 1) Inputting the preprocessed point cloud of the stockpile from step three, and projecting it onto the XOY plane of the world coordinate system according to the minimum z-coordinate value in the point cloud, making it parallel or coincident.
[0025] 2) Triangulate the bottom point cloud obtained by projection using step three;
[0026] 3) Traverse each triangular mesh. Since the bottom point cloud is obtained by projecting the stockpile point cloud, its corresponding point can always be found in the stockpile point cloud, thus dividing the stockpile point cloud into n approximate triangular prisms.
[0027] 4) Calculate the volume V(volume[i]) of each approximate triangular prism, V = V 全 -V 补 The specific formula is as follows:
[0028] V 全 =s·h,
[0029]
[0030]
[0031] h = |p1” - p1|.
[0032]
[0033] s”=(|p”2-p’2|+|p”3-p’3|)·(|p”2-p”3|) / 2,
[0034] h”=dis(p”1,area(p”2,p’2,p”3,p’3)).
[0035] V = V 全 -V 补
[0036] Where dis(p,area(p1,p2,p3,p4)) represents the distance from point p to plane area(p1,p2,p3,p4);
[0037] 5) Summing up the volumes of all approximate triangular prisms yields the total volume of the stockpile.
[0038] Compared with existing technologies, this invention acquires point clouds of the stockpile surface using solid-state lidar scanning. Simultaneously, an inertial odometry system acquires the pose and odometer data of the measuring device while the lidar is acquiring point cloud data. Then, in the data processor, a rectangular point cloud region containing the 3D model of the stockpile is obtained using a point cloud ROI extraction method based on SLAM-Odom information. Point cloud preprocessing is performed through downsampling, segmentation, filtering, clustering, transformation, and smoothing. The bottom point cloud is then obtained using a projection method, and Delaunay triangulation is used to mesh the target point cloud (this method is applicable to both regular and irregular stockpiles). The approximate volume of each meshed section is calculated and summed to obtain the final volume. Experimental results show that this invention can ensure good measurement accuracy and efficiency while being easy for frontline operators to operate. Measurement errors are minimal and consistent across different operators. Furthermore, this invention is particularly suitable for measuring the volume of irregular stockpiles. Since existing methods require measuring a large amount of data for irregularly shaped stockpiles, this invention only requires measuring around the stockpile once, and the data processor calculates the final volume. Attached Figure Description
[0039] Figure 1 This is an overall flowchart of the stack body measurement of the present invention;
[0040] Figure 2 This is a schematic diagram illustrating the ROI extraction principle based on Odom information in the embodiment.
[0041] Figure 3 This is a partial view of the original point cloud and a schematic diagram of ROI extraction in the embodiment.
[0042] Figure 4 This is a flowchart of the point cloud preprocessing process in the embodiment;
[0043] Figure 5 This is a diagram showing the downsampling result of the voxel filtering algorithm in the embodiment;
[0044] Figure 6 This is a flowchart of the RANSAC ground segmentation process in the embodiment;
[0045] Figure 7 This is a schematic diagram of point cloud coordinate transformation in the embodiment;
[0046] Figure 8This is a flowchart of point cloud coordinate transformation in the embodiment;
[0047] Figure 9 This is a diagram showing the RANSAC ground segmentation results in the embodiment;
[0048] Figure 10 This is a diagram showing the results of SOR filtering and Euclidean clustering in the embodiment;
[0049] Figure 11 This is an MLS smoothing result diagram from the embodiment;
[0050] Figure 12 This is a comparison diagram between ordinary triangulation and Delaunay triangulation in this embodiment;
[0051] Figure 13 This is a schematic diagram illustrating the principle of volume determination by triangulation in the embodiment.
[0052] Figure 14 This is a schematic diagram of the triangularly partitioned approximate triangular prism in the embodiment;
[0053] Figure 15 This is a projection diagram of the bottom surface in the embodiment;
[0054] Figure 16 This is a diagram showing the triangulation result of the bottom surface in the embodiment;
[0055] Figure 17 This is a diagram of the experimental object in the embodiment. Detailed Implementation
[0056] The present invention will be further described below.
[0057] Example: To facilitate manual measurement and calculation, and thus verify the accuracy of the volume measurement of this invention, a hexahedral stone pier (i.e., a regular shape) with a smaller top and larger bottom was selected as the experimental object to replace the material stacking model, such as... Figure 17 The stone pier consists of a thin rectangular top and a hexahedron with trapezoidal sides on both sides. Manual measurements show that the length, width, and height of the thin rectangular top are 10m, 0.95m, and 0.038m respectively, with a volume of approximately 0.3610m³. 3 The trapezoidal lateral surface of the lower hexahedron has an upper base of 0.9m, a lower base of 1.453m, and a height of 1.695m, a length of 10m, and a volume of approximately 19.9417m³. 3 The total volume of the stone pier is approximately 20.3027 m³. 3 Next, the staff used the method of this invention to measure the volume of the experimental object, such as... Figure 1 As shown, the specific steps are as follows:
[0058] Step 1: Acquire the original point cloud of the stockpile: The operator turns on the measuring device and holds it in hand, facing the target to be measured and remaining stationary for about 2 seconds to complete the algorithm initialization. Maintaining a distance of 0.5 to 1m from the stockpile, the operator walks around the stockpile at a constant speed (ensuring that the surface of the object is scanned as much as possible during the walking around), so that the measuring device scans the stockpile and uses the FastLIO2 algorithm to acquire the original point cloud of the stockpile; all subsequent processing steps are performed in the data processor.
[0059] Step 2: Point Cloud Extraction and Preprocessing: The raw point cloud obtained in Step 1 is processed using Odom information to extract the ROI (Region of Interest). Then, point cloud preprocessing is performed to remove useless points, resulting in the processed point cloud. Specifically:
[0060] A. Point Cloud ROI Extraction Based on Odom Information: Since step one involves the measuring equipment circling the stack to obtain point cloud data, the point cloud is confined to a region bounded by the walking trajectory. Therefore, the x and y coordinates of the inertial odometry information Odom (Odometry) output by the FastLIO2 algorithm are used as boundary conditions. A pass-through filter is added to the original point cloud to obtain a coarse point cloud ROI, such as... Figure 2 As shown, the specific process is as follows: 1) Since the inertial odometer output frequency is high (>3000Hz), Odom is first sampled and a series of point coordinates (Odom.x, Odom.y, Odom.z) are extracted; 2) The maximum and minimum values of the x and y coordinates are calculated, respectively, as Odom.x... MAX Odom.x MIN Odom.y MAX Odom.y MIN 3) Using the coordinate values obtained in step 2) as a threshold, perform pass-through filtering before saving the map pcd file to obtain a point cloud file ROI.pcd with a vertical projection of a rectangle.
[0061] Experimental results are as follows Figure 3 , Figure 3 (a) is a partial schematic diagram of the original point cloud (Map) obtained by scanning, which records a total of 3,959,333 points. The dense area in the center of the image is the target to be measured. Since the LiDAR illumination range is wide, the file not only records the surface point cloud of the stockpile, but also includes the surrounding trees, ground, and noise, so the first step must be to extract the ROI of the point cloud. Figure 3 (b) The light blue broken line is the trajectory plot of Odom sampled at a certain frequency and connected and then displayed in Rviz. The red border is the pass-through filter range. Performing the filtering operation will yield a point cloud ROI with a vertical projection of a rectangle.
[0062] B. Point Cloud Preprocessing: Although ROI.pcd was obtained through point cloud ROI extraction, the number of point clouds is still large, and it inevitably records messy point clouds and noisy point clouds other than those in the material pile; therefore, point cloud preprocessing is still required before volume calculation. The preprocessing process is as follows: Figure 4 .
[0063] ① Point Cloud Downsampling: The point cloud file ROI.pcd is downsampled using the voxel grid filtering algorithm, a commonly used point cloud data downsampling method that reduces the number of points while preserving their shape. In the voxel grid filtering algorithm, a 3D voxel grid is first created based on the input point cloud data. Then, all points within each voxel are approximated using the centroid of the set of points within that voxel. The specific process is as follows:
[0064] 1) Find the maximum and minimum x, y, and z coordinates of the original point cloud L containing m points. MAX ,y MAX ,z MAX x MIN ,y MIN ,z MIN Therefore, establish a structure with length, width, and height of l. x =x MAX -x MIN , l y =y MAX -y MIN , l z =z MAX -z MIN The smallest bounding box;
[0065] 2) If the voxel grid side length is set to r, the original point cloud is divided into N = N x ×N y ×N z N grids, where N x =∨(l x / r), N y =∨(l y / r), N z =∨(l z / r), ∨(g) represents rounding down; 3) Number each voxel grid and calculate the centroid of all points in the grid, and use the calculated centroid point p o As the downsampled points The numerator is the sum of the coordinates of points within each voxel grid, and the denominator is the total number of points within each voxel grid.
[0066] Experimental results are as follows Figure 5 , Figure 5 (a) Figure 5(b) The downsampling results are shown from different perspectives. The number of points after downsampling is 2,923,392. The red circles in the figure represent cluttered point cloud clusters, and the arrows point to sparse noise point clouds.
[0067] ②RANSAC ground segmentation and point cloud transformation:
[0068] I. The point cloud data processed in step ① is segmented into ground planes using the RANSAC (Random Sample Consensus) segmentation algorithm. RANSAC is a method for iteratively calculating mathematical model parameters on a series of data containing outliers. The specific segmentation process is as follows:
[0069] 1) Assumption: The entire dataset contains both good points and bad points, called inliers and outliers respectively. The distribution of the data is described by a certain mathematical model. Inliers are points that can fit the model, while outliers are points that cannot fit the model.
[0070] 2) Random sampling: Randomly select several points from the dataset, assuming they are inliers. The number of points should be determined based on the characteristics of the model, generally choosing the minimum number of data points suitable for the model. For example, to fit a straight line from a set of points, select two points, because two points determine a straight line; if you want to fit a plane, you need to select at least three non-collinear points.
[0071] 3) Model estimation: Calculate the mathematical model that fits these points;
[0072] 4) Model validation: Calculate the values of other points p in the dataset based on the set threshold. i Determine whether the mathematical model is satisfied. If it is, mark it as an interior point of the model and record the number N of interior points in the model.
[0073] 5) Iteration: Repeat the iteration multiple times. Each model generated is either discarded because it has too few interior points, or it is selected because it is better than the existing model.
[0074] 6) Exit Condition: If the iteration exit condition is met, the loop exits, and the most reasonable solution in the entire iteration process is obtained, such as... Figure 6 As shown.
[0075] II. Since the coordinates of the original point cloud in the world coordinate system (which depends on the radar's initial pose) are dependent on the radar's initial pose, the change in the radar's initial pose during each scan measurement increases the difficulty of parameter adjustment in each stage and the effectiveness of the algorithm. Therefore, a point cloud coordinate system transformation is required. In step I, during ground segmentation using RANSAC, a planar model M of the ground can be obtained. i Ax + By + Cd + D = 0, normal vector of the XOY plane Therefore, the ground normal vector can be calculated. and rotating shaft And the rotation angle θ, and then use the axis-angle relationship to realize the point cloud rotation transformation operation, such as Figure 7 and 8 As shown;
[0076] Experimental results are as follows Figure 9 As shown, Figure 9 (a) shows the segmented non-bottom point cloud. After removing the ground, the messy "point cloud clusters" are more clearly visible, and there are also many sparse outlier noise point clouds. Figure 9 (b) is the segmented ground point cloud. At this time, the bottom surface of the target under test is not parallel to the world coordinate system XOY plane. Therefore, in this step, the transformation matrix is obtained by using the plane equation obtained by RANSAC, and the coordinate transformation is performed on the non-ground point cloud so that no matter what the initial pose of the lidar is during the experiment, the bottom surface of the target under test can be transformed to be parallel to the world coordinate system XOY plane.
[0077] ③ Point cloud filtering: Due to factors such as sensor errors, the surface of the original point cloud of the target inevitably contains some outliers. Because their distribution is relatively sparse compared to the target point cloud, they are called outliers. The point cloud data processed in step ② is processed using a statistical filtering algorithm to remove outliers, thereby further extracting the point cloud of the stockpile; the specific process is as follows:
[0078] 1) Traverse the original point cloud for statistical analysis, assuming point p i The distances to each point in the neighborhood containing K points form a Gaussian distribution. The distribution N ~ (μ, σ) is calculated.
[0079] 2) Remove outliers with an average distance greater than μ+n×σ.
[0080] Next is clustering and segmentation, using the Euclidean clustering algorithm. The specific process is as follows:
[0081] 1) Select a point p0 in the original point cloud L, and find k points closest to p0 using the KD-Tree search algorithm;
[0082] 2) Cluster points whose distance from point p0 is less than a set threshold into set Q0;
[0083] 3) Continue to select points p1, p2, etc., other than p0 in set Q0, and repeat the above process until the number of elements in Q0 no longer increases, and record the point cloud cluster index;
[0084] 4) Traverse other unvisited points, performing steps 1), 2), and 3);
[0085] 5) Save the target point cloud cluster.
[0086] Experimental results are as follows Figure 10 , Figure 10 (a) Point cloud after outlier removal Figure 10 (b) is the point cloud of the material pile obtained by clustering.
[0087] ④ MLS Point Cloud Smoothing: Due to the inherent limitations of the SLAM algorithm, the resulting point cloud on the surface of the stockpile sometimes exhibits "local over-thickness," which is detrimental to bottom projection and triangulation effects. Therefore, Moving Least Squares (MLS) is used to smooth the point cloud clusters processed in step ③. MLS is a method that fits data by minimizing the sum of squared errors. The specific process is as follows:
[0088] 1) For each point p in the point cloud i Choose a spherical neighborhood containing several points;
[0089] 2) Fit a planar or surface model using the least squares method within a selected neighborhood to minimize the sum of squared errors between the model and the data points in the neighborhood;
[0090] 3) For each data point in the neighborhood, calculate the error between it and the fitted plane or surface, i.e., the distance to the plane or surface;
[0091] 4) If the error is less than the set threshold d, retain it; otherwise, delete it.
[0092] 5) For the points that are retained, a smoothed point cloud can be obtained by calculating their average or weighted average.
[0093] Experimental results are as follows Figure 11 As shown, after MLS smoothing, the situation where a certain point cloud plane has a local distribution of "multi-layer" point clouds will no longer occur.
[0094] Step 3, Triangulation: Project the point cloud processed in Step 2 onto a 2D plane to obtain the base point cloud. Then, triangulate the base point cloud. Specifically, Delaunay triangulation is used to triangulate the point cloud, ensuring that the triangulated point cloud has the following properties: 1) The circumcircle of all triangles satisfies the empty circle property (the circumcircle of any triangle does not contain any vertices from the point set, such as...). Figure 12(Red part: the two triangles on the left do not satisfy the empty circle property, while the two triangles on the right satisfy the empty circle property); 2) Among all triangulations of a given point set P, the smallest angle obtained by the Delaunay triangulation (the smallest value among the interior angles of all triangles) is the largest; 3) Among all triangulations of a given point set, the largest circumcircle radius obtained by the Delaunay triangulation (the largest value among the circumcircle radii of all triangles) is the smallest; 4) If any four points in the point set P are not concyclic, then there exists a unique Delaunay triangulation; If four points A, B, C, and D in the point set P are concyclic, and VABC and VBCD belong to the Delaunay triangulation T, then the triangulation T' obtained by flipping edge BC (containing VABD and VACD) is also a Delaunay triangulation.
[0095] Step 4, Volume Calculation: Map the triangular base point cloud after meshing in Step 3 back to three-dimensional space to obtain several approximate triangular prism models. By accumulating and calculating the volume of these triangular prism models, the volume of the stockpile point cloud can be obtained. Specifically, 1) Input the stockpile point cloud after preprocessing in Step 3, and project it according to the minimum z-coordinate in the point cloud to be parallel or coincident with the XOY plane of the world coordinate system.
[0096] 2) Triangulate the bottom point cloud obtained by projection using step three;
[0097] 3) Traverse each triangular mesh. Since the base point cloud is obtained by projecting the stockpile point cloud, its corresponding point can always be found in the stockpile point cloud, thus dividing the stockpile point cloud into n approximate triangular prisms, such as... Figure 13 and Figure 14 As shown; taking a conical target point cloud as an example, from left to right, the diagrams show: a schematic diagram of the conical point cloud being divided into an approximate triangular prism, a schematic diagram of it being completed into a complete triangular prism, and a schematic diagram of the part to be subtracted after completion. Experimental results are as follows: Figure 15 The bottom point cloud is obtained by projecting the point cloud of the material stack. Figure 16 It is a Delaunay (greedy) triangulated bottom mesh model with a total of 55,706 triangular meshes.
[0098] 4) Calculate the volume V(volume[i]) of each approximate triangular prism, V = V 全 -V 补 The specific formula is as follows:
[0099] V 全 =s·h,
[0100]
[0101]
[0102] h = |p1” - p1|.
[0103]
[0104] s”=(|p'2'-p'2|+|p'3'-p'3|)·(|p'2'-p'3'|) / 2,
[0105] h”=dis(p1”,area(p'2',p'2,p'3',p'3)).
[0106] V = V 全 -V 补
[0107] Where dis(p,area(p1,p2,p3,p4)) represents the distance from point p to plane area(p1,p2,p3,p4);
[0108] 5) Summing up the volumes of all approximate triangular prisms yields the total volume of the stockpile. Equals 20.8515m 3 The relative error compared to manual measurement is approximately 2.7031%.
[0109] The measurement equipment used in the above method includes a housing, a solid-state lidar (LiDAR), an inertial odometry (IMU), a data processor, and a display screen. The solid-state lidar, the inertial odometry, and the data processor are all housed inside the housing, and the display screen is mounted on the surface of the housing. The solid-state lidar is used to acquire point cloud data of the stockpile and feed it back to the data processor. The inertial odometry is used to simultaneously acquire the pose and odometer data of the measurement equipment while the solid-state lidar is acquiring point cloud data and feed it back to the data processor. The data processor is used to analyze and process the feedback data to obtain the stockpile volume and send it to the display screen for display.
[0110] Since the above processing is performed by a data processor, operators only need to carry the measuring device around the stockpile to quickly obtain the stockpile volume, eliminating the need for tedious manual measurement. Moreover, it has high accuracy and is especially suitable for measuring the volume of irregularly shaped stockpiles.
[0111] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A SLAM-based method for measuring stockpile volume, characterized in that, The specific steps are as follows: Step 1: Acquire the original point cloud of the stockpile: Turn on the measuring device and hold it in your hand, maintaining a certain distance from the stockpile to be measured. Scan the stockpile at a constant speed, and use the FastLIO2 algorithm to acquire the original point cloud of the stockpile. The measuring device includes a housing, a solid-state lidar, an inertial odometry, a data processor, and a display screen. Step 2: Point Cloud Extraction and Preprocessing: The original point cloud obtained in Step 1 is processed using Odom information to extract the ROI (Region of Interest). Then, point cloud preprocessing is performed to remove useless points, resulting in a processed point cloud. The specific steps are as follows: A. Point Cloud ROI Extraction Based on Odom Information: Since step one involves the measuring equipment circling the material pile to obtain point cloud data, the point cloud is confined to an area bounded by the walking trajectory. Therefore, the Odom information output by SLAM is used to extract the point cloud ROI. , Using coordinates as boundary conditions, a pass-through filter is added to the original point cloud to obtain a coarse point cloud ROI. The specific process is as follows: 1) First, Odom samples and extracts a series of point coordinates ( , , 1) Find the maximum and minimum values of the x and y coordinates respectively. , , , 3) Using the coordinate values obtained in step 2) as a threshold, perform pass-through filtering before saving the map pcd file to obtain a point cloud file with a rectangular vertical projection. ; B. Point cloud preprocessing: ① Point cloud downsampling: Voxel filtering algorithm is used to downsample point cloud files. To perform downsampling, first, a 3D voxel grid is created based on the input point cloud data. Then, all points within each voxel are approximated using the centroid of the set of points within that voxel. The specific process is as follows: 1) Find the contained Original point cloud of each point of , , Maximum coordinates and minimum value Therefore, establish the length, width, and height as follows: , , The smallest bounding box; 2) Set the voxel grid side length to The original point cloud is then divided into 1 grid, of which , , , Indicates rounding down; 3) Number each voxel grid and calculate the centroid of all points within the grid, using the calculated centroid points As the downsampled points The numerator is the sum of the coordinates of points within each voxel grid, and the denominator is the total number of points within each voxel grid. ②RANSAC ground segmentation and point cloud transformation: I. The point cloud data processed in step ① is segmented into ground using the RANSAC segmentation algorithm; II. Since the coordinates of the original point cloud in the world coordinate system depend on the initial pose of the solid-state lidar, and the initial pose of the solid-state lidar changes with each scan measurement, a point cloud coordinate system transformation is required. In step I, the planar model of the ground can be obtained during ground segmentation using RANSAC. XOY plane normal vector Therefore, the ground normal vector can be calculated. and rotating shaft and rotation angle Then, the point cloud rotation transformation operation is achieved using the axis-angle relationship; ③ Point cloud filtering: The point cloud data processed in step ② is subjected to statistical filtering algorithm to remove outliers, and then the data is clustered to extract the point cloud of the material pile. ④MLS point cloud smoothing: The moving least squares method is used to smooth the point cloud clusters of the stockpile after step ③. Step 3, Triangulation: Project the point cloud processed in Step 2 onto a two-dimensional plane to obtain the bottom point cloud, and then triangulate the bottom point cloud. Step 4, Volume Calculation: Map the triangular base point cloud obtained from step 3 back into 3D space to obtain several approximate triangular prism models. By accumulating and calculating the volume of all triangular prism models, the volume of the material pile point cloud can be obtained.
2. The SLAM-based method for measuring stock volume according to claim 1, characterized in that, The solid-state lidar, inertial odometry, and data processor are all housed within the casing, while the display screen is mounted on the surface of the casing. The solid-state lidar is used to acquire point cloud data of the material pile and feed it back to the data processor. The inertial odometry is used to simultaneously acquire the pose and odometer data of the measuring device while the solid-state lidar is acquiring point cloud data and feed it back to the data processor. The data processor is used to analyze and process the feedback data to obtain the volume of the material pile and send it to the display screen for display.
3. The SLAM-based method for measuring stock volume according to claim 1, characterized in that, The distance between the object and the stockpile during step one is determined based on the height of the stockpile; the higher the stockpile, the greater the distance.
4. The SLAM-based method for measuring stock volume according to claim 1, characterized in that, The specific process of step three is as follows: Delaunay triangulation is used to triangulate the point cloud into a mesh.
5. The SLAM-based method for measuring stock volume according to claim 1, characterized in that, Step four specifically involves: 1) Inputting the preprocessed point cloud of the stockpile from step two, and then processing it according to the point cloud... Minimum coordinate projection onto the world coordinate system Planes are parallel or coincident; 2) Triangulate the bottom point cloud obtained by projection using step three; 3) Traverse each triangular mesh. Since the bottom point cloud is obtained by projecting the stockpile point cloud, its corresponding point can always be found in the stockpile point cloud, thus dividing the stockpile point cloud into... An approximate triangular prism; 4) Calculate the volume of each approximate triangular prism. The specific formula is as follows: in Point to plane The distance; 5) Summing up the volumes of all approximate triangular prisms yields the total volume of the stockpile. .