Three-dimensional point cloud-based pile volume measuring and calculating method and device, and electronic equipment
By projecting and triangulating the three-dimensional point cloud, calculating the volume of the triangular mesh and superposing it, the problem of complex and inaccurate volume measurement in the existing technology is solved, and efficient and accurate volume measurement of the pile is achieved.
Patent Information
- Application Number
- CN202410945289.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-18
AI Technical Summary
Existing volume measurement methods based on three-dimensional point clouds are complex for large and irregularly shaped piles, require a large amount of calculation, and are not accurate enough.
By projecting data points on the three-dimensional point cloud, the triangulated grid data is constructed, and the volume of each triangular grid is calculated and then superimposed and summed to obtain the volume of the pile. Statistical filtering and Delaunay triangulation are used to improve the data. Quality and measurement efficiency.
It simplifies the pile volume measurement process, improves measurement efficiency and accuracy, reduces the amount of calculation, and obtains more accurate and reliable measurement results.
Smart Images

Figure CN118799378A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of volume measurement, and in particular relates to a method, device and electronic equipment for measuring the volume of a pile based on three-dimensional point clouds. Background Art
[0002] The volume measurement method based on three-dimensional point cloud is to analyze and process the point cloud data in three-dimensional space to calculate the volume of the represented object or area.
[0003] Several common volume measurement methods based on 3D point clouds include surface reconstruction method (Surface Reconstruction), geometric volume estimation method and deep learning-based method.
[0004] However, the use of surface reconstruction algorithms to measure the volume of large objects such as coal piles is complex and computationally intensive. Similarly, using geometric volume estimation methods to try to fit a simplified geometric shape to represent the entire coal pile and then measure the volume of the coal pile will result in inaccurate geometric volume estimation results due to the irregular shape of the coal pile. In addition, deep learning-based methods for volume measurement of coal piles require a large amount of labeled data for training, and have high requirements for data quality and diversity, which is difficult to meet in practice.
[0005] Therefore, there is an urgent need for a method that is easy to implement and has accurate measurement results and is suitable for pile volume measurement. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the present invention provides a method, device and electronic equipment for measuring the volume of a pile based on three-dimensional point cloud.
[0007] The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0008] In a first aspect, the present invention provides a method for calculating a pile volume based on a three-dimensional point cloud, the method comprising:
[0009] Scan the pile to generate a three-dimensional point cloud;
[0010] Constructing triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom;
[0011] Traversing the triangulated mesh data includes: calculating the volume of the triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh;
[0012] The volume of the stack is obtained by superimposing the volumes of the triangular prisms where each triangular grid is located.
[0013] Optionally, before constructing triangulated mesh data according to the three-dimensional point cloud, the method further includes:
[0014] The three-dimensional point cloud is filtered using a statistical filtering method.
[0015] Optionally, constructing triangulated mesh data according to the three-dimensional point cloud includes:
[0016] Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure;
[0017] Constructing a reference triangle that encloses the bounding box of the projection point;
[0018] According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0019] The reference triangle is deleted from the first mesh data, and the lines connected to the vertices of the reference triangle are deleted to obtain second mesh data as the triangulated mesh data.
[0020] Optionally, constructing triangulated mesh data according to the three-dimensional point cloud includes:
[0021] Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure;
[0022] Constructing a reference triangle that encloses the bounding box of the projection point;
[0023] According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0024] Deleting the reference triangle from the first mesh data, and deleting the lines connected to the vertices of the reference triangle, to obtain second mesh data;
[0025] Each triangle of the second mesh data is traversed to obtain the triangulated mesh data; wherein, when each triangle of the second mesh data is traversed, a triangular facet is fitted based on the triangle and triangles in the neighborhood of the triangle to replace the triangle.
[0026] Optionally, fitting a triangular patch to replace the triangle based on the triangle and triangles in the neighborhood of the triangle includes:
[0027] Based on the triangle and the triangles in the neighborhood of the triangle, a triangular patch is fitted using the Moving Least Squares algorithm to replace the triangle.
[0028] In a second aspect, the present invention provides a device for measuring the volume of a pile based on a three-dimensional point cloud, the device comprising:
[0029] A three-dimensional point cloud generation module is used to scan the pile and generate a three-dimensional point cloud;
[0030] A triangulated mesh data construction module, used to construct triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom;
[0031] A volume calculation module, used for traversing the triangulated mesh data, including: calculating the volume of the triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh;
[0032] The volume superposition module is used to superimpose the volume of the triangular prism where each triangular grid is located to obtain the volume of the stack.
[0033] Optionally, the device further comprises:
[0034] The filtering module is used to filter the three-dimensional point cloud using a statistical filtering method before constructing triangulated mesh data based on the three-dimensional point cloud.
[0035] Optionally, the triangulated mesh data construction module is specifically used to:
[0036] Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure;
[0037] Constructing a reference triangle that encloses the bounding box of the projection point;
[0038] According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0039] The reference triangle is deleted from the first mesh data, and the lines connected to the vertices of the reference triangle are deleted to obtain second mesh data as the triangulated mesh data.
[0040] Optionally, the triangulated mesh data building module is also used to:
[0041] Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure;
[0042] Constructing a reference triangle that encloses the bounding box of the projection point;
[0043] According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0044] Deleting the reference triangle from the first mesh data, and deleting the lines connected to the vertices of the reference triangle, to obtain second mesh data;
[0045] Each triangle of the second mesh data is traversed to obtain the triangulated mesh data; wherein, when each triangle of the second mesh data is traversed, a triangular facet is fitted based on the triangle and triangles in the neighborhood of the triangle to replace the triangle.
[0046] Optionally, in the triangulated mesh data construction module, fitting a triangular facet to replace the triangle based on the triangle and triangles in the neighborhood of the triangle includes:
[0047] Based on the triangle and the triangles in the neighborhood of the triangle, a triangular patch is fitted using the Moving Least Squares algorithm to replace the triangle.
[0048] In a third aspect, the present invention provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0049] Memory, used to store computer programs;
[0050] The processor is used to implement the method steps described in any of the above-mentioned methods for measuring the volume of a pile based on three-dimensional point clouds when executing the program stored in the memory.
[0051] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any of the above-mentioned methods for calculating the pile volume based on three-dimensional point clouds are implemented.
[0052] In another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method steps described in any of the above-mentioned methods for calculating the volume of a pile based on three-dimensional point clouds.
[0053] The present invention provides a method for measuring the volume of a pile based on a three-dimensional point cloud. The method generates a three-dimensional point cloud by scanning the pile; constructs triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom; traverses the triangulated mesh data, including: calculating the volume of a triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh; and superimposing the volumes of the triangular prisms where each triangular mesh is located to obtain the volume of the pile.
[0054] Compared with the existing volume measurement method based on three-dimensional point cloud, when measuring piles with large volume and irregular shape, there are problems such as complex measurement and excessive calculation, and the final measurement result is not accurate enough. In this scheme, triangulated mesh data is constructed by the projection points of data points in the three-dimensional point cloud, and then the volume of each triangular mesh in the triangulated mesh data is calculated separately, and then the pile volume is obtained by superposition and summation. While making the measurement result more accurate and reliable, it also simplifies the measurement process of the pile volume, reduces the amount of calculation required for measurement and improves the measurement efficiency.
[0055] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of a method for calculating the volume of a pile based on three-dimensional point cloud provided by an embodiment of the present invention;
[0057] Figure 2 It is a schematic diagram of the comparison of triangulated mesh data processed using the Moving Least Squares algorithm;
[0058] Figure 3 This is a schematic diagram of the result of Delaunay triangulation of a three-dimensional pile;
[0059] Figure 4 is a schematic diagram of a calculation process of the volume of a triangular prism where an exemplary triangular grid is located;
[0060] Figure 5 It is a flow chart of another method for calculating the volume of a pile based on three-dimensional point cloud provided by an embodiment of the present invention;
[0061] Figure 6 It is a structural schematic diagram of a pile volume measurement device based on three-dimensional point cloud provided by an embodiment of the present invention;
[0062] Figure 7 It is a structural diagram of an electronic device. DETAILED DESCRIPTION
[0063] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0064] In order to solve the problems of high difficulty in measurement and inaccurate measurement results in existing three-dimensional point cloud volume measurement methods, embodiments of the present invention provide a method, device and electronic device for measuring the volume of a pile based on three-dimensional point clouds.
[0065] The following is a detailed description of a method for calculating the volume of a pile based on a three-dimensional point cloud provided by an embodiment of the present invention. Figure 1 , Figure 1 1 is a flow chart of a method for calculating the volume of a pile based on a three-dimensional point cloud provided by an embodiment of the present invention, comprising the following steps:
[0066] Step S101, scanning the pile to generate a three-dimensional point cloud.
[0067] In this embodiment, the pile may be an irregular large-volume object such as a coal pile, a soil pile or a stone pile.
[0068] A 3D point cloud is a data structure used to represent an object or scene in a 3D space. It is a collection of multiple 3D coordinate points (x, y, z). These points are obtained by discrete sampling of the surface of an actual object (i.e., the pile in this scheme). In addition to the 3D coordinate information, each data point in the 3D point cloud can also include other attribute information such as the echo intensity and reflectivity of the data point.
[0069] Commonly used 3D point cloud acquisition methods include laser radar acquisition, stereo vision acquisition, and structured light acquisition. The laser radar acquisition method is a 3D point cloud acquisition method that uses a laser radar device to emit a laser beam to the pile and measure its return time to obtain the 3D spatial information of the pile. This acquisition method has high measurement accuracy and a large measurement range.
[0070] For example, in mines, construction sites or geological exploration, laser radar equipment can scan the entire surface of a large volume of a pile in a short time and quickly obtain a three-dimensional point cloud containing a large number of discrete data points. Therefore, in this embodiment, considering that the pile volume to be scanned is large and the accuracy requirement for the three-dimensional point cloud is high, the laser radar acquisition method is preferably used to obtain the three-dimensional point cloud.
[0071] Step S102, constructing triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom.
[0072] In this embodiment, the data points of the three-dimensional point cloud are projected from top to bottom, and the projection points of each data point can be obtained on the plane, and then the triangulated mesh data can be obtained based on the projection points, wherein the triangulated mesh data includes multiple triangular meshes, and the vertices of the triangular meshes are the projection points of the data points.
[0073] In order to ensure the high quality of triangulated mesh data, the triangulated meshes need to be relatively regular triangulated meshes, that is, triangulated meshes that are too sharp or flat should not appear in the triangulated mesh data. Therefore, each triangulated mesh in the triangulated mesh data constructed in this embodiment has the characteristic of an outer circle: any four projection points are not in the same circle, that is, there will be no other projection points within the circumscribed circle of each triangulated mesh.
[0074] Step S103, traversing the triangulated mesh data, includes: calculating the volume of the triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh.
[0075] In this embodiment, for a triangular mesh, a triangular prism where the triangular mesh is located can be determined according to the vertical coordinates of the triangular mesh and its three vertices. During calculation, the data required for calculating the volume of the triangular prism can be obtained according to the three-dimensional coordinates of the three vertices, and then the volume of the triangular prism where the triangular mesh is located can be calculated.
[0076] Traversing the triangulated mesh data, that is, calculating the volume of the triangular prism where each triangular mesh is located.
[0077] Step S104, superimposing the volumes of the triangular prisms where each triangular mesh is located to obtain the volume of the pile.
[0078] Since the vertices of each triangular mesh in the triangulated mesh data are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom, and the three-dimensional point cloud is generated by scanning the pile, after obtaining the volume of the triangular prism where each triangular mesh is located, the volume of the triangular prism where each triangular mesh is located is superimposed to obtain the volume of the pile.
[0079] In this embodiment, compared with the existing volume measurement method based on three-dimensional point cloud, when measuring a pile with a large volume and irregular shape, there are problems such as complex measurement and excessive calculation, and the final measurement result is not accurate enough. In this embodiment, triangulated mesh data is constructed by the projection points of the data points in the three-dimensional point cloud, and then the volume of each triangular mesh in the triangulated mesh data is calculated separately, and then the pile volume is obtained by superposition and summation. While making the measurement result more accurate and reliable, it also simplifies the measurement process of the pile volume, reduces the amount of calculation required for the measurement and improves the measurement efficiency.
[0080] In the embodiment of the present invention, before constructing triangulated mesh data according to the three-dimensional point cloud, the three-dimensional point cloud is filtered using a statistical filtering method.
[0081] The statistical filtering function in the statistical filtering method can be used to filter outlier data points in the three-dimensional point cloud to reduce the scanning error of the lidar equipment and the noise introduced by external environmental factors, thereby improving the data quality of the three-dimensional point cloud.
[0082] The following will explain how to use the statistical filtering function to filter the three-dimensional point cloud:
[0083] First, let the coordinates of the nth data point in the 3D point cloud be (X n ,Y n ,Z n ), the point to any coordinate is (X m ,Y m ,Z m ) is calculated as follows:
[0084]
[0085] Among them, μ represents the average distance between a data point and its neighboring data points; i represents the distance between the currently traversed points.
[0086] Then, calculate the standard deviation of the mean distance:
[0087]
[0088] Here, σ represents the standard deviation of the distance.
[0089] In the statistical filtering method, in order to make the 3D point cloud present a relatively uniform distribution as a whole, the average distance between each data point in the 3D point cloud and its neighboring data points will not exceed the preset threshold. The preset threshold is determined as follows:
[0090] D = μ + std × σ;
[0091] Where D is the preset threshold and std is a custom standard deviation coefficient used to control the impact of σ on D.
[0092] In this embodiment, data points exceeding a preset threshold value D are regarded as outlier data points, and outlier data points can be eliminated through statistical filtering, thereby reducing the noise introduced by scanning equipment errors or external environmental factors to improve the quality of the three-dimensional point cloud.
[0093] In an embodiment of the present invention, constructing triangulated mesh data according to a three-dimensional point cloud includes:
[0094] Project the three-dimensional point cloud from top to bottom to obtain a plane figure containing the projection points of all data points; and determine the projection point boundary box according to the outermost projection points in the plane figure;
[0095] Construct a reference triangle that wraps the bounding box of the projected points;
[0096] According to each projection point, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0097] The reference triangle is deleted from the first mesh data, and the lines connected to the vertices of the reference triangle are deleted to obtain the second mesh data as the triangulated mesh data.
[0098] In this embodiment, after the three-dimensional point cloud is projected from top to bottom, all data points in the three-dimensional point cloud can be projected onto a plane figure, and projection points of all data points can be obtained on the plane figure. In this embodiment, the plane figure can be determined according to the coordinate axis plane XY plane of the three-dimensional point cloud data points.
[0099] Based on the outermost projection points projected on the plane figure, a projection point bounding box can be determined, and then a reference triangle is constructed according to the projection point bounding box. The reference triangle is a triangle that can enclose all projection points.
[0100] According to each projection point, Delaunay triangulation is performed on the reference triangle to obtain first mesh data.
[0101] The following example illustrates the Delaunay triangulation process:
[0102] According to the reference triangle that has been constructed, for the first projection point 1, connect it with the three vertices of the reference triangle to form three small triangles, and use the vertices of the reference triangle and projection point 1 as connected points.
[0103] Each triangle mesh after Delaunay triangulation has an empty circle feature, that is, there will be no other points within the circumscribed circle of any triangle mesh in the Delaunay triangle mesh.
[0104] Take the triangle mesh ABC with three vertex coordinates A(x1,y1), B(x2,y2) and C(x3,y3) as an example, the calculation process of its circumscribed circle is as follows:
[0105]
[0106] Where a, b and c are the three side lengths of the triangle mesh ABC.
[0107] After obtaining the side length of the triangle mesh ABC, the area of the triangle mesh can be calculated.
[0108]
[0109] Where s represents the semi-perimeter of the triangular mesh ABC; S represents the area of the triangular mesh ABC.
[0110] According to the vertex coordinates, side length and area of the triangle mesh ABC, the radius R of the circumscribed circle of the triangle mesh ABC and the coordinates of the center of the circumscribed circle (x0, y0) can be determined:
[0111]
[0112] Among them, x0 represents the horizontal coordinate of the center of the circumscribed circle; y0 represents the vertical coordinate of the center of the circumscribed circle.
[0113] The circumscribed circle of the triangle mesh ABC is determined by the radius R of the circumscribed circle and the coordinates (x0, y0) of the center of the circumscribed circle.
[0114] According to the circumscribed circle of the triangle mesh, it can be determined whether the next projection point 2 is within the circumscribed circle of the triangle mesh. If so, the triangle mesh needs to be adjusted to construct a new triangle mesh.
[0115] Specifically, for the next inserted projection point within the circumscribed circle of the triangular mesh, connect it with the three connected points closest to itself to form three new triangles, and use projection point 2 as a connected point. This operation can make the newly inserted projection point not within the circumscribed circle, and the Delaunay triangulated mesh data at this time meets the empty circle characteristics.
[0116] For projection point 3, the same operation as that of projection point 2 is performed until all projection points are traversed to obtain the first grid data.
[0117] After obtaining the first mesh data, the reference triangle and the lines connecting the vertices of the reference triangle may be deleted to obtain the second mesh data as the final triangulated mesh data.
[0118] In this embodiment, the triangulated mesh data obtained by Delaunay triangulation is unique and regular, that is, no matter which data point is used as the first data point for Delaunay triangulation processing, the triangulated mesh data finally obtained is consistent, and the triangular mesh in the triangulated mesh data is a relatively regular triangular mesh, and there will be no overly sharp or flat triangular meshes, thereby improving the quality of the triangulated mesh data.
[0119] In the embodiment of the present invention, in order to further improve the accuracy of the triangular mesh data, after obtaining the second mesh data, each triangle of the second mesh data can be traversed to obtain triangulated mesh data; wherein, when traversing each triangle of the second mesh data, a triangular facet is fitted based on the triangle and the triangles in the neighborhood of the triangle to replace the triangle. The specific steps are as follows:
[0120] 1) Selecting a neighborhood: For each triangle of the second mesh data, select a neighborhood, which includes other triangles within a certain radius based on the triangle.
[0121] 2) Fitting the surface: For each triangle, use the least squares method to fit a triangular patch so that the sum of the squares of the distances from all triangles in the neighborhood of the triangle to the patch of this triangle is minimized.
[0122] 3) Smoothing: Replace the original triangle according to the fitted triangle patch, that is, replace the value of the original triangle with the value of the fitted triangle patch.
[0123] 4) Repeat processing: Repeat the above steps for all triangles of the second mesh data until all triangles have been processed to obtain triangulated mesh data.
[0124] In the embodiment of the present invention, fitting a triangular patch to replace the triangle based on the triangle and triangles in the neighborhood of the triangle includes:
[0125] Based on the triangle and the triangles in its neighborhood, a triangular patch is fitted using the Moving Least Squares algorithm to replace the triangle. Figure 2 , Figure 2 It is a comparative schematic diagram of triangulated mesh data processed by Moving Least Squares algorithm. From the comparative schematic diagram before and after processing, it can be seen that the reconstruction of the pile surface can be made more accurate and continuous by smoothing the triangulated mesh data by Moving Least Squares algorithm.
[0126] In this embodiment, the Moving Least Squares algorithm is as follows:
[0127] H={x∈R 3 |b T x=b T q};
[0128] E MLS (q,b)=∑(b T -b T q)2 θ(||p i -q||);
[0129] ∑(g(X i ,Y i )-f i ) 2 θ(||p i -q||);
[0130] Where H represents the local approximate hyperplane, that is, the fitted triangular patch; x represents a point in three-dimensional space; R 3 represents three-dimensional real space; b represents the normal vector; T represents the transpose of the matrix; E MLS (·) represents the nonlinear energy function, H should make E MLS (·) is the smallest; θ represents a monotonically decreasing positive weight function; p i represents the position coordinates of a data point in the local point set; g(X i ,Y i ) represents the value of the surface at that coordinate point; X i The X coordinate of the point on the surface; Y i represents the Y coordinate of a point on the surface; f i represents the actual observation value of the point; q represents a reference data point or query data point selected during the optimization process.
[0131] See also Figure 3 After obtaining the triangulated mesh data, the height data is substituted, that is, the vertical coordinate of each data point is substituted to obtain the Delaunay triangulated image of the three-dimensional pile, and then the volume of the pile can be calculated based on this. Among them, Depth in Feet represents the vertical coordinate; Latitude represents the longitudinal coordinate; Longtitude represents the horizontal coordinate.
[0132] In the embodiment of the present invention, the volume of the triangular prism where any triangular mesh is located is obtained by splitting it into the volume of the regular triangular prism and the volume of the pentahedron, respectively calculating and summing them. The following will describe in detail how to calculate the volume of the triangular prism where each triangular mesh is located. Figure 4 , Figure 4 The figure is a schematic diagram of the calculation process of the volume of a triangular prism in which an exemplary triangular mesh is located.
[0133] exist Figure 4 In (1), the three-dimensional coordinates of the triangular prism where the triangular mesh is located and the data points a, b and c are known, and the coordinates of a' and c' can be obtained based on the coordinates of a, b and c. Among them, the horizontal and vertical coordinates of a' are the same as those of a, and its vertical coordinate is the vertical coordinate of b. Similarly, the three-dimensional coordinates of c' can be obtained.
[0134] Figure 4 (2) shows a regular triangular prism decomposed from a triangular prism. The height h of the regular triangular prism can be determined based on the vertical coordinates of a' and c'. The area S of the triangle formed by a', b and c' can be calculated based on the horizontal and vertical coordinates of a', b and c'. Then, the volume of the regular triangular prism can be calculated based on h and S.
[0135] Specifically, Figure 4 Taking (2) as an example, the volume calculation method of a regular triangular prism is explained as follows:
[0136]
[0137] V1=S*min(a z ,b z ,c z );
[0138] Wherein, V1 represents the volume of the regular triangular prism; a x represents the horizontal coordinate of a; b x represents the horizontal coordinate of b; c x represents the horizontal coordinate of c; a y represents the ordinate of a; b y represents the ordinate of b; c y represents the ordinate of c; S represents the base area of the regular triangular prism; a z represents the vertical coordinate of a; b z represents the vertical coordinate of b; c z Represents the vertical coordinate of c.
[0139] See also Figure 4 (3) Figure 4 (3) is a pentahedron decomposed from a triangular prism. To calculate the volume of the pentahedron, see Figure 4 (4), it can be further split into two tetrahedrons for volume calculation, and then the volume of the pentahedron can be obtained by summing up the volumes calculated separately. The calculation process is as follows:
[0140] First, use the following formula Figure 4 (4) Calculate the volume of the tetrahedron on the left:
[0141]
[0142] Among them, (x1, y1, z1) is the three-dimensional coordinate of a; (x2, y2, z2) is the three-dimensional coordinate of a';
[0143] (x3, y3, z3) is the three-dimensional coordinate of c; (x4, y4, z4) is the three-dimensional coordinate of b. V is calculated based on the three-dimensional coordinates of a, a', c and b. 四面体 , that is Figure 4(4) The volume of the tetrahedron on the left is V2.
[0144] right Figure 4 (4) The volume of the tetrahedron on the right, V3, is also calculated using V 四面体 The calculation formula is used, where (x1, y1, z1) is the three-dimensional coordinate of a'; (x2, y2, z2) is the three-dimensional coordinate of b; (x3, y3, z3) is the three-dimensional coordinate of c; and (x4, y4, z4) is the three-dimensional coordinate of c'. V calculated based on the three-dimensional coordinates of a', b, c and c' 四面体 , that is Figure 4 (4) The volume of the tetrahedron on the right is V3.
[0145] By superimposing the volumes of the triangular prism and the two tetrahedrons, we can get the volume of the triangular prism where the triangle mesh is located:
[0146] V i =V1+V2+V3;
[0147] Among them, V i is the volume of the triangular prism where the triangle mesh is located.
[0148] In this embodiment, the volume of the pile can be obtained by superimposing the volume of the triangular prism where each triangular grid is located:
[0149]
[0150] Among them, V represents the volume of the heap; n represents the total number of triangular meshes; i represents the sequence number of the triangular mesh, that is, the current triangular mesh is the i-th triangular mesh.
[0151] In order to further illustrate a method for calculating the volume of a pile based on a three-dimensional point cloud provided by an embodiment of the present invention, see Figure 5 , Figure 5 1 is a flow chart of another method for calculating the volume of a pile based on a three-dimensional point cloud provided by an embodiment of the present invention, comprising the following steps:
[0152] Step S501: Scan the pile body using a high-precision laser radar device to generate a three-dimensional point cloud.
[0153] In this embodiment, the three-dimensional point cloud includes a plurality of data points including three-dimensional coordinates.
[0154] Step S502: Filter the three-dimensional point cloud using a statistical filtering method.
[0155] By using statistical filtering to filter the 3D point cloud, the noise introduced by scanning equipment errors or external environmental factors can be reduced, thereby improving the quality of data points in the 3D point cloud.
[0156] Step S503, perform Delaunay triangulation, calculate the bounding box, and construct a super triangle.
[0157] Delaunay triangulation is performed on the filtered 3D point cloud. First, the 3D point cloud is projected from top to bottom to obtain a plane figure containing the projection points of all data points. Then, the projection point bounding box is determined based on the outermost projection points in the plane figure. Then, a super triangle (the aforementioned reference triangle) that encloses all projection points is constructed based on the projection point bounding box, and all projection points are put into the triangle list.
[0158] Step S504, adding the projection points one by one, finding the triangle where they are located, and connecting them with the vertices.
[0159] The circumscribed circle of each small triangle is calculated, and the newly added projection point is processed according to the empty circle characteristics of Delaunay triangulation, and connected with the vertices of the triangle in which it is located to form three small triangles.
[0160] After processing the projection point, continue to perform the same processing on the next projection point.
[0161] The specific process can be found in the above content and will not be repeated here.
[0162] Step S505: Check whether all points have been inserted.
[0163] If not, it means there are projection points that have not been inserted, and the process returns to step S504 to continue execution; if yes, it means all projection points have been inserted, and the process executes step S506.
[0164] Step S506, deleting the super triangle and the triangles associated with the super triangle.
[0165] After traversing all the projection points, the super triangle and the triangles associated with the super triangle are deleted to obtain the triangle mesh data, wherein deleting the triangles associated with the super triangle means deleting the lines connected to the vertices of the super triangle.
[0166] Step S507: Use the Moving Least Squares algorithm to smooth the mesh data after Delaunay triangulation.
[0167] The specific steps are as described above and will not be repeated here.
[0168] Step S508, traverse all triangular meshes, find the volume of the triangular prism where each triangular mesh is located, and add up the volumes of the triangular prisms where all triangular meshes are located to obtain the volume of the pile.
[0169] In this embodiment, a large amount of discrete point cloud data can be obtained through high-precision laser radar scanning, providing a sufficient data basis for subsequent measurement. Statistical filtering can effectively remove outliers and noise, improve the quality of three-dimensional point clouds, and make subsequent processing more robust and reliable. Delaunay triangulation technology is used to obtain triangulated mesh data, and then the moving least squares algorithm is used to smooth the triangulated mesh data, so that the surface reconstruction is more accurate and continuous, which can effectively improve the fitting accuracy of the pile surface and reduce measurement errors, thereby more accurately reflecting the actual shape and size of the pile. Finally, the volume is solved by traversing each triangular mesh, and the volume of the triangular prism where each triangular mesh is located is superimposed and summed to obtain the final pile volume. The pile volume measurement method based on three-dimensional point cloud provided by this embodiment makes the volume measurement result more accurate and reliable.
[0170] Based on the same inventive concept, the embodiment of the present invention also provides a pile volume measurement device based on three-dimensional point cloud, see Figure 6 , Figure 6 : is a schematic diagram of a structure of a pile volume measurement device based on three-dimensional point cloud provided by an embodiment of the present invention, the device comprising:
[0171] A three-dimensional point cloud generation module 601 is used to scan the pile body and generate a three-dimensional point cloud;
[0172] A triangulated mesh data construction module 602 is used to construct triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom;
[0173] The volume calculation module 603 is used to traverse the triangulated mesh data, including: calculating the volume of the triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh;
[0174] The volume superposition module 604 is used to superimpose the volume of the triangular prism where each triangular grid is located to obtain the volume of the stack.
[0175] Compared with the existing volume measurement method based on three-dimensional point cloud, when measuring piles with large volume and irregular shape, there are problems such as complex measurement and excessive calculation, and the final measurement result is not accurate enough. In this scheme, triangulated mesh data is constructed by the projection points of data points in the three-dimensional point cloud, and then the volume of each triangular mesh in the triangulated mesh data is calculated separately, and then the pile volume is obtained by superposition and summation. While making the measurement result more accurate and reliable, it also simplifies the measurement process of the pile volume, reduces the amount of calculation required for measurement and improves the measurement efficiency.
[0176] Optionally, the device further comprises:
[0177] The filtering module is used to filter the three-dimensional point cloud using a statistical filtering method before constructing triangulated mesh data based on the three-dimensional point cloud.
[0178] Optionally, the triangulated mesh data construction module is specifically used to:
[0179] Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure;
[0180] Constructing a reference triangle that encloses the bounding box of the projection point;
[0181] According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0182] The reference triangle is deleted from the first mesh data, and the lines connected to the vertices of the reference triangle are deleted to obtain second mesh data as the triangulated mesh data.
[0183] Optionally, the triangulated mesh data building module is also used to:
[0184] Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure;
[0185] Constructing a reference triangle that encloses the bounding box of the projection point;
[0186] According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data;
[0187] Deleting the reference triangle from the first mesh data, and deleting the lines connected to the vertices of the reference triangle, to obtain second mesh data;
[0188] Each triangle of the second mesh data is traversed to obtain the triangulated mesh data; wherein, when each triangle of the second mesh data is traversed, a triangular facet is fitted based on the triangle and triangles in the neighborhood of the triangle to replace the triangle.
[0189] Optionally, in the triangulated mesh data construction module, fitting a triangular facet to replace the triangle based on the triangle and triangles in the neighborhood of the triangle includes:
[0190] Based on the triangle and the triangles in the neighborhood of the triangle, a triangular patch is fitted using the Moving Least Squares algorithm to replace the triangle.
[0191] The embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.
[0192] Memory 703, used for storing computer programs;
[0193] The processor 701 is used to implement the method steps described in any of the above-mentioned methods for calculating the pile volume based on three-dimensional point clouds when executing the program stored in the memory 703.
[0194] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not represent that there is only one bus or one type of bus.
[0195] The communication interface is used for communication between the above electronic device and other devices.
[0196] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0197] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0198] The present invention also provides a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the method steps described in any of the above-mentioned methods for calculating the volume of a pile based on three-dimensional point clouds are implemented.
[0199] Optionally, the computer-readable storage medium may be a non-volatile memory (NVM), such as at least one disk memory.
[0200] Optionally, the computer-readable memory may also be at least one storage device located away from the aforementioned processor.
[0201] In another embodiment of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method steps described in any of the above-mentioned methods for calculating the volume of a pile based on three-dimensional point clouds.
[0202] It should be noted that, for the device / electronic device / storage medium / computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0203] It should be noted that the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention.
[0204] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification.
[0205] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other changes to the disclosed embodiments by viewing the drawings and the disclosed content. In the description of the present invention, the term "comprising" does not exclude other components or steps, "one" or "an" does not exclude multiple situations, and "multiple" means two or more, unless otherwise clearly and specifically limited. In addition, certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.
[0206] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.
[0207] As for the device / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0208] It should be noted that the device, electronic device and storage medium of the embodiments of the present invention are respectively a device, electronic device and storage medium that apply the above-mentioned method for measuring the volume of a pile based on three-dimensional point clouds. All embodiments of the above-mentioned method for measuring the volume of a pile based on three-dimensional point clouds are applicable to the device, electronic device and storage medium, and can achieve the same or similar beneficial effects.
[0209] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for calculating pile volume based on three-dimensional point cloud. It is characterized in that The method comprises: Scan the pile to generate a three-dimensional point cloud; Constructing triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom; Traversing the triangulated mesh data includes: calculating the volume of the triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh; The volume of the stack is obtained by superimposing the volumes of the triangular prisms where each triangular grid is located.
2. The method according to claim 1, It is characterized in that Before constructing triangulated mesh data according to the three-dimensional point cloud, the method further includes: The three-dimensional point cloud is filtered using a statistical filtering method.
3. The method according to claim 1, It is characterized in that Constructing triangulated mesh data according to the three-dimensional point cloud, including: Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure; Constructing a reference triangle that encloses the bounding box of the projection point; According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data; The reference triangle is deleted from the first mesh data, and the lines connected to the vertices of the reference triangle are deleted to obtain second mesh data as the triangulated mesh data.
4. The method according to claim 1, It is characterized in that Constructing triangulated mesh data according to the three-dimensional point cloud, including: Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure; Constructing a reference triangle that encloses the bounding box of the projection point; According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data; Deleting the reference triangle from the first mesh data, and deleting the lines connected to the vertices of the reference triangle, to obtain second mesh data; Each triangle of the second mesh data is traversed to obtain the triangulated mesh data; wherein, when each triangle of the second mesh data is traversed, a triangular facet is fitted based on the triangle and triangles in the neighborhood of the triangle to replace the triangle.
5. The method according to claim 1, It is characterized in that Fitting a triangular patch based on the triangle and triangles in the neighborhood of the triangle to replace the triangle includes: Based on the triangle and the triangles in the neighborhood of the triangle, a triangular patch is fitted using the Moving Least Squares algorithm to replace the triangle.
6. A pile volume measurement device based on three-dimensional point cloud, It is characterized in that The device comprises: A three-dimensional point cloud generation module is used to scan the pile and generate a three-dimensional point cloud; A triangulated mesh data construction module, used to construct triangulated mesh data according to the three-dimensional point cloud; wherein the triangulated mesh data includes a plurality of triangular meshes; the vertices of the triangular meshes are projection points obtained by projecting the data points of the three-dimensional point cloud from top to bottom; A volume calculation module, used for traversing the triangulated mesh data, including: calculating the volume of the triangular prism where the triangular mesh is located according to the vertical coordinates of the data points corresponding to the vertices of each triangular mesh; The volume superposition module is used to superimpose the volume of the triangular prism where each triangular grid is located to obtain the volume of the stack.
7. The device according to claim 6, It is characterized in that The device also includes: The filtering module is used to filter the three-dimensional point cloud using a statistical filtering method before constructing triangulated mesh data based on the three-dimensional point cloud.
8. The device according to claim 6, It is characterized in that The triangulated mesh data construction module is specifically used for: Projecting the three-dimensional point cloud from top to bottom to obtain a plane figure containing projection points of all data points; and determining a projection point boundary box according to the outermost projection points in the plane figure; Constructing a reference triangle that encloses the bounding box of the projection point; According to each of the projection points, the reference triangle is subjected to Delaunay triangulation processing to obtain first mesh data; The reference triangle is deleted from the first mesh data, and the lines connected to the vertices of the reference triangle are deleted to obtain second mesh data as the triangulated mesh data.
9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Solid mineral resource reserve estimation system based on double-layer database
CN119202094A
Target pose estimation method based on consumer-level depth camera in real environment
CN119540351A
Three-dimensional visual monitoring method and equipment for fire coal batch
CN119600193A
Three-dimensional visualization monitoring method and equipment for coal batches
CN119600193B
Method, device and equipment for determining surface volume of material stack, medium and product
CN120125645A
