A method, device, electronic device and storage medium for extracting rock mass trace lines
By obtaining the three-dimensional point cloud data of the rock mass, extracting edge points and constructing an undirected graph to determine the topological relationship, the problem of relying on manual operation for rock mass trace measurement is solved, and efficient and accurate rock mass trace extraction is achieved.
Patent Information
- Application Number
- CN202510514796.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-23
AI Technical Summary
In the prior art, the measurement of rock mass traces relies on manual operation, with low accuracy and low efficiency.
By obtaining the three-dimensional point cloud data of the target rock mass, extracting edge points, using the L1 median algorithm to obtain the skeleton point cloud data, and constructing an undirected graph to determine the topological relationship between the skeleton points to generate rock mass traces.
Efficient and accurate rock mass trace extraction is achieved, manual intervention is reduced, and measurement accuracy and efficiency are improved.
Smart Images

Figure CN120047478B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rock mass monitoring, and more specifically, to a method, device, electronic device, and storage medium for extracting rock mass trace lines. Background Art
[0002] The trace lines of the structural planes of a rock mass are generated by the intersection of the rock mass surface and the rock discontinuity planes, and are used to characterize the basic parameter quality of the rock extension, providing important reference indicators in the rock mass quality classification and the analysis of the rock mass structure stability.
[0003] Currently, the measurement of the exposed trace lines of the structural planes of a rock mass is carried out on-site by a handheld device. For example, manual measurements are performed by an operator holding devices such as a geological compass, an inclinometer, a tape measure, and a roughness profiler. This manual measurement method relies on the experience of the operator, has a low accuracy rate, and is inefficient. Summary of the Invention
[0004] The problem solved by the present invention is how to improve the extraction efficiency and accuracy rate of rock mass trace lines.
[0005] To solve the above problems, the present invention provides a method, device, electronic device, and storage medium for extracting rock mass trace lines.
[0006] In a first aspect, the present invention provides a method for extracting rock mass trace lines, including:
[0007] Obtaining three-dimensional point cloud data of a target rock mass;
[0008] Extracting edge points of the target rock mass from the three-dimensional point cloud data to obtain an initial shrinkage feature point set;
[0009] Extracting L1 median points from the initial shrinkage feature point set by using the L1 median algorithm to obtain skeleton point cloud data;
[0010] Determining a neighborhood point set of each skeleton point in the skeleton point cloud data to obtain a plurality of skeleton point neighborhood sets;
[0011] Constructing an undirected graph according to each of the skeleton point neighborhood sets, and determining the topological relationship between each skeleton point in each of the skeleton point neighborhood sets according to the undirected graph;
[0012] Generating the trace lines of the target rock mass according to the topological relationship between each skeleton point in each of the skeleton point neighborhood sets.
[0013] Optionally, the obtaining of the three-dimensional point cloud data of the target rock mass includes:
[0014] Collecting structural plane image data of the target rock mass by an image acquisition device;
[0015] Generate the three-dimensional point cloud data of the target rock mass based on the structural plane image data.
[0016] Optionally, extracting the edge points of the target rock mass in the three-dimensional point cloud data includes:
[0017] Determine the k-neighborhood point set of each point in the three-dimensional point cloud data;
[0018] Determine the centroid of the k-neighborhood point set of each point and determine the resolution of the k-neighborhood point set of each point;
[0019] For the k-neighborhood point set of each point, determine whether the distance between each point in the k-neighborhood point set and the centroid is greater than the classification threshold; the classification threshold is the product of the resolution of the k-neighborhood point set and a preset parameter;
[0020] If the distance between a point in the k-neighborhood point set and the centroid is greater than the classification threshold, then take this point as an edge point.
[0021] Optionally, determining the neighborhood point set of each skeleton point in the skeleton point cloud data includes:
[0022] For each skeleton point, determine the skeleton points in the skeleton point cloud data whose distance from this skeleton point is less than a preset threshold to obtain the neighborhood point set of this skeleton point.
[0023] Optionally, the nodes in the undirected graph are the skeleton points in the skeleton point neighborhood set, and each edge in the undirected graph is attached with a corresponding weight value, and the weight value is the distance between the two skeleton points connected by the corresponding edge.
[0024] Optionally, determining the topological relationship between the skeleton points in each skeleton point neighborhood set according to the undirected graph includes:
[0025] For each skeleton point neighborhood set, perform the following processing according to the undirected graph:
[0026] Set the first point cloud set and the second point cloud set, where the first point cloud set includes a root node R in the undirected graph, and the second point cloud set includes other nodes in the undirected graph except the root node R; the root node R is the center point of the skeleton point neighborhood set;
[0027] Select a node closest to the root node R from the second point cloud set, denoted as node s, and move the node s from the second point cloud set to the first point cloud set;
[0028] Calculate the distances from the root node R to each node in the second point cloud set passing through the node s, and obtain the first distances from the root node R to each node in the second point cloud set;
[0029] Calculate the distances from the root node R to each node in the second point cloud set without passing through the node s, and obtain the second distances corresponding to each node in the second point cloud set from the root node R;
[0030] For each node in the second point cloud set, if the second distance from the root node R to this node is less than the first distance, then use the sum of the second distance and the weight value of the edge connecting the root node R and this node in the undirected graph as the new second distance;
[0031] Loop through the steps of selecting a node s closest to the root node R from the second point cloud set, moving the node s from the second point cloud set to the second point cloud set, calculating the first distance, calculating the second distance, and updating the second distance until all nodes in the second point cloud set are moved to the first point cloud set, to obtain the shortest paths from the root node R to each node other than the root node R in the undirected graph, so as to obtain the topological relationships between each skeleton point in each skeleton point neighborhood set.
[0032] Optionally, the generating the trace line of the target rock mass according to the topological relationships between each skeleton point in each skeleton point neighborhood set includes:
[0033] Connect each node in sequence according to the shortest paths from the root node R to each node other than the root node R in the undirected graph, to form the trace line of the target rock mass.
[0034] In a second aspect, the present invention provides an apparatus for extracting a trace line of a rock mass, including:
[0035] A data acquisition module, configured to acquire three-dimensional point cloud data of a target rock mass;
[0036] An edge point extraction module, configured to extract edge points of the target rock mass from the three-dimensional point cloud data, to obtain an initial shrinkage feature point set;
[0037] A skeleton point extraction module, configured to extract L1 median points in the initial shrinkage feature point set by using the L1 median algorithm, to obtain skeleton point cloud data;
[0038] A skeleton point neighborhood determination module, configured to determine a neighborhood point set of each skeleton point in the skeleton point cloud data, to obtain a plurality of skeleton point neighborhood sets;
[0039] A topological relationship determination module, configured to construct an undirected graph based on each of the skeleton point neighborhood sets, and determine the topological relationship between each skeleton point in each of the skeleton point neighborhood sets according to the undirected graph;
[0040] A trace line generation module, configured to generate a trace line of the target rock mass according to the topological relationship between each skeleton point in each of the skeleton point neighborhood sets.
[0041] In a third aspect, the present invention provides an electronic device, including a memory and a processor;
[0042] The memory is used to store a computer program;
[0043] The processor is configured to implement the method for extracting the trace line of the rock mass as described in the first aspect when executing the computer program.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for extracting the trace line of the rock mass as described in the first aspect is implemented.
[0045] The beneficial effects of the method, device, electronic device and storage medium for extracting the trace line of the rock mass of the present invention are as follows: Obtain the three-dimensional point cloud data of the target rock mass, and the three-dimensional point cloud data includes the spatial three-dimensional coordinates of the target rock mass. Extract the edge points of the target rock mass in the three-dimensional point cloud data to obtain the initial shrinkage feature point set. Since the trace line of the rock mass exists at the edge position of the rock mass, extracting the edge points of the target rock mass can reduce the computational amount of extracting the trace line of the rock mass from the point cloud data subsequently. Use the L1 median algorithm to extract the L1 median points in the initial shrinkage feature point set to obtain the skeleton point cloud data, and further determine the skeleton points from the extracted edge points. Construct an undirected graph according to each skeleton point neighborhood set, and determine the topological relationship between each skeleton point in each skeleton point neighborhood set according to the undirected graph. The shortest path connecting each skeleton point can be quickly and accurately found through the undirected graph. Generate the trace line of the target rock mass according to the topological relationship between each skeleton point in each skeleton point neighborhood set, so as to efficiently and automatically obtain the accurate trace line of the target rock mass. Moreover, compared with the method of manually measuring the trace line on site, the present invention accurately extracts the skeleton points from the three-dimensional point cloud data of the target rock mass by using a software algorithm, and combines the undirected graph to determine the topological relationship between each skeleton point, so as to accurately find the shortest path connecting each skeleton point, thereby extracting the accurate trace line of the target rock mass. The whole process does not require manual intervention and does not depend on the experience of the operator, greatly improving the accuracy of extracting the trace line of the rock mass. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of a method for extracting the trace line of the rock mass according to an embodiment of the present invention;
[0047] Figure 2 Schematic diagram of extracting skeleton points in the neighborhood of the initial contraction feature point set of an embodiment;
[0048] Figure 3 Schematic diagram of an undirected graph of an embodiment;
[0049] Figure 4 Flowchart of extracting edge points in three-dimensional point cloud data of an embodiment;
[0050] Figure 5 Flowchart of determining the topological relationship between each skeleton point in the skeleton point neighborhood set of an embodiment;
[0051] Figure 6 Schematic diagram of the skeleton line connecting each skeleton point of an embodiment;
[0052] Figure 7 Schematic diagram of the image data of the target rock mass and its corresponding trace of an embodiment;
[0053] Figure 8 Structural schematic diagram of an apparatus for extracting rock mass traces according to an embodiment of the present invention;
[0054] Figure 9 Structural schematic diagram of an electronic device according to an embodiment of the present invention. Detailed implementation manners
[0055] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention is provided in conjunction with the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments described herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.
[0056] It should be understood that the steps described in the method embodiments of the present invention can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this regard.
[0057] As used herein, the term "comprising" and its variations are open-ended, i.e., "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiment". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0058] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".
[0059] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0060] As Figure 1 shown, an extraction method of rock mass traces provided by an embodiment of the present invention includes:
[0061] S100: Obtain the three-dimensional point cloud data of the target rock mass.
[0062] In some embodiments, the structural plane image data of the target rock mass is collected by an image acquisition device; based on the structural plane image data, the three-dimensional point cloud data of the target rock mass is generated. Among them, the image acquisition device can be an unmanned aerial vehicle camera device or a high-definition camera.
[0063] Specifically, the structural plane image data is used to generate high-resolution three-dimensional point cloud data through the SIFT algorithm.
[0064] Specifically, the structural plane image data is a structural plane photo, and the structural plane can be the slope of the target rock mass.
[0065] Specifically, the three-dimensional point cloud data is three-dimensional coordinate data in space.
[0066] S200: Extract the edge points of the target rock mass in the three-dimensional point cloud data to obtain an initial set of contraction feature points.
[0067] Specifically, through analysis, it is found that the rock mass trace is often located at the edge of the rock mass. Therefore, edge points can be extracted from the three-dimensional point cloud data first, and then subsequent processing can be carried out based on the extracted edge points. The three-dimensional point cloud data contains the point clouds corresponding to various structures of the target rock mass, making the data volume of the three-dimensional point cloud data too large. Directly extracting the skeleton points corresponding to the trace from the three-dimensional point cloud data will result in an excessive amount of calculation, thus affecting the calculation efficiency. Therefore, in this embodiment, edge points are extracted from the three-dimensional point cloud data first to reduce the data calculation amount for subsequent extraction of skeleton points.
[0068] S300: Extract the L1 median points from the initial set of contracted feature points using the L1 median algorithm to obtain the skeleton point cloud data.
[0069] Specifically, the expression of the L1 median algorithm is as follows:
[0070] ;
[0071] ;
[0072] In the formula, represents the Gaussian weight function, E represents the initial set of contracted feature points, represents the initial set of contracted feature points E in one point, , m is the initial set of contracted feature points E the number of points in, represents the source input point in the initial set of contracted feature points E , is the point to the source input point distance, represents the parameter controlling the neighborhood size, argmin() represents finding the parameter value that makes the objective function reach the minimum value, X represents the L1 median point. The L1 median point is a skeleton point in the skeleton point cloud data.
[0073] As Figure 2 shown, extract the L1 median points from the initial set of contracted feature points using the L1 median algorithm, that is, divide the initial set of contracted feature points into multiple neighborhoods B, and extract the L1 median points in each neighborhood B. This L1 median point is the skeleton point B1.
[0074] S400: Determine the neighborhood point set of each skeleton point in the skeleton point cloud data to obtain multiple skeleton point neighborhood sets.
[0075] Specifically, after obtaining the skeleton point cloud data, save the skeleton point cloud data, then calculate the neighborhoods of all points in the skeleton point cloud data, and put the calculated neighborhoods into a new set to obtain multiple skeleton point neighborhood sets.
[0076] S500: Construct an undirected graph based on each skeleton point neighborhood set, and determine the topological relationship between each skeleton point in each skeleton point neighborhood set according to the undirected graph.
[0077] Specifically, as Figure 3 shown, the undirected graph consists of a set of nodes (A1, A2, A3, A4, A5, A6) and a set of edges. Among them, the edges have no directionality. The nodes in the undirected graph are the skeleton points in the skeleton point neighborhood set, and each edge in the undirected graph is attached with a corresponding weight value, and the weight value is the distance between the two skeleton points connected by the corresponding edge.
[0078] S600: Generate the trace line of the target rock mass according to the topological relationship between each skeleton point in each skeleton point neighborhood set.
[0079] In some embodiments, according to the determined topological relationship between each skeleton point in each skeleton point neighborhood set, connecting each skeleton point in sequence can obtain the trace line of the target rock mass.
[0080] In this embodiment, the three-dimensional point cloud data of the target rock mass is obtained, and the three-dimensional point cloud data includes the spatial three-dimensional coordinates of the target rock mass. The edge points of the target rock mass in the three-dimensional point cloud data are extracted to obtain the initial shrinkage feature point set. Since the rock mass trace line exists at the edge position of the rock mass, extracting the edge points of the target rock mass can reduce the calculation amount of extracting the rock mass trace line from the point cloud data subsequently. The L1 median algorithm is used to extract the L1 median points in the initial shrinkage feature point set to obtain the skeleton point cloud data, and further determine the skeleton points from the extracted edge points. An undirected graph is constructed based on each skeleton point neighborhood set, and according to the undirected graph, the topological relationship between each skeleton point in each skeleton point neighborhood set is determined. The shortest path connecting each skeleton point can be quickly and accurately found through the undirected graph. The trace line of the target rock mass is generated according to the topological relationship between each skeleton point in each skeleton point neighborhood set to efficiently and automatically obtain the accurate trace line of the target rock mass.
[0081] Optionally, as Figure 4 shown, the steps of extracting the edge points of the target rock mass in the three-dimensional point cloud data in S200 to obtain the initial shrinkage feature point set include the following:
[0082] S410: Determine the k-neighborhood point set of each point in the three-dimensional point cloud data.
[0083] S420: Determine the centroid of the k-neighborhood point set of each point, and determine the resolution of the k-neighborhood point set of each point.
[0084] S430: For each set of k-neighborhood points of a point, determine whether the distance between each point in the set of k-neighborhood points and the centroid is greater than the classification threshold; wherein, the classification threshold is the product of the resolution of the set of k-neighborhood points and a preset parameter.
[0085] S440: If the distance between a point in the set of k-neighborhood points and the centroid is greater than the classification threshold, then take this point as an edge point.
[0086] Specifically, use the K-D tree method to calculate the set of k-neighborhood points of each point in the three-dimensional point cloud data. For the set of k-neighborhood points of any point , randomly select a point as the centroid point of the set of k-neighborhood points , and calculate the centroid of the set of k-neighborhood points by taking the mean of adjacent points , and determine the centroid according to the following expression :
[0087] ;
[0088] In the formula, k represents the number of neighborhood points in the set of k-neighborhood points , represents a set of k-neighborhood points, represents the set of k-neighborhood points , represents the coordinates of any point in the set of k-neighborhood points , j represents the coordinates of the centroid of the set of k-neighborhood points,
[0089] Specifically, in order to adapt to the change of density, calculate the resolution of the set of k-neighborhood points according to the following expression :
[0090] ;
[0091] In the formula, , represent any two points in the set of k-neighborhood points .
[0092] Since the local density of the point is considered separately for each point, the evaluation of ensures scale invariance.
[0093] Specifically, multiply by a fixed preset parameter λ as the classification threshold. If the distance between the point and the centroid is greater than the classification threshold, then the point is classified as an edge point, and the expression is as follows:
[0094] ;
[0095] where λ is a preset parameter, is the resolution of the k-neighborhood point set of, represents any point in the k-neighborhood point set of, represents the centroid of the k-neighborhood point set of.
[0096] In this optional embodiment, the k-neighborhood point set of each point in the three-dimensional point cloud data is calculated, and then the centroid of each k-neighborhood point set is determined. Based on the centroid of the k-neighborhood point set, the resolution of the k-neighborhood point set is calculated to adapt to the change of density; the resolution of the k-neighborhood point set is used as a parameter for the classification threshold for edge point classification. Since the local density of each point in the three-dimensional point cloud data is considered separately, the edge point classification based on the resolution ensures scale invariance.
[0097] Optionally, determining the neighborhood point set of each skeleton point in the skeleton point cloud data in S400 includes:
[0098] For each skeleton point, determine the skeleton points in the skeleton point cloud data whose distance from the skeleton point is less than a preset threshold, and obtain the neighborhood point set of the skeleton point.
[0099] Specifically, the K-D tree method is used to determine the neighborhood corresponding to each skeleton point in the skeleton point cloud data. Specifically, a preset threshold can be set. For each skeleton point, calculate the distance between the skeleton point and other skeleton points in the skeleton point cloud data, and form a neighborhood point set of the skeleton point with the skeleton points whose distance is less than the preset threshold.
[0100] In this optional embodiment, determining the neighborhood of each skeleton point in the skeleton point cloud data provides data support for constructing an undirected graph corresponding to the neighborhood point set of each skeleton point later.
[0101] Optionally, as Figure 5 shown, in S500, an undirected graph is constructed according to each skeleton point neighborhood set, and according to the undirected graph, the topological relationship between each skeleton point in each skeleton point neighborhood set is determined, including the following steps:
[0102] For each skeleton point neighborhood set, perform the following processing according to the undirected graph:
[0103] S510: Set a first point cloud set and a second point cloud set, where the first point cloud set includes a root node R in an undirected graph, and the second point cloud set includes other nodes in the undirected graph except the root node R. The root node R is the center point of the skeleton point neighborhood set.
[0104] S520: Select a node closest to the root node R from the second point cloud set, denoted as node s, and move node s from the second point cloud set to the first point cloud set.
[0105] S530: Calculate the distances from the root node R through node s to each node in the second point cloud set to obtain the first distances from the root node R to each node in the second point cloud set.
[0106] S540: Calculate the distances from the root node R without passing through node s to each node in the second point cloud set to obtain the second distances corresponding to each node in the second point cloud set from the root node R.
[0107] S550: For each node in the second point cloud set, if the second distance from the root node R to this node is less than the first distance, then use the sum of the second distance and the weight value of the edge connecting node R and this node in the undirected graph as the new second distance.
[0108] S560: Iteratively loop through steps S520 to S550 until all nodes in the second point cloud set are moved to the first point cloud set. Connect each node in the undirected graph except the root node R in the order of their movement from the second point cloud set to the first point cloud set starting from the root node R, and the shortest path from the root node R to each node in the undirected graph except node R is obtained.
[0109] Integrate the shortest paths from the root node R to each node in the undirected graph except node R corresponding to each skeleton point neighborhood set, and the shortest paths of all skeleton points are obtained. Connect each skeleton point according to the shortest paths of all skeleton points, and the corresponding trace line is obtained, as Figure 6 shown.
[0110] In this optional embodiment, by circularly calculating the path distances from the root node R to each skeleton point, a shortest path from the root node R to each skeleton point is formed. This shortest path is the topological relationship between each skeleton point, enabling the efficient determination of the topological relationship between each skeleton point in the skeleton point neighborhood set.
[0111] As Figure 7 shown, Figure 7 are the image data of the target rock mass and its corresponding trace line.
[0112] In this alternative embodiment, by determining the shortest paths from the root node R to each skeleton point, the trace of the target rock mass can be quickly and accurately obtained.
[0113] As Figure 8 shown, an extraction device 800 for the trace of a rock mass provided by an embodiment of the present invention includes:
[0114] A data acquisition module 810, configured to acquire three-dimensional point cloud data of a target rock mass.
[0115] An edge point extraction module 820, configured to extract edge points of the target rock mass from the three-dimensional point cloud data to obtain an initial set of contraction feature points.
[0116] A skeleton point extraction module 830, configured to extract L1 median points from the initial set of contraction feature points by using the L1 median algorithm to obtain skeleton point cloud data.
[0117] A skeleton point neighborhood determination module 840, configured to determine a neighborhood point set of each skeleton point in the skeleton point cloud data to obtain a plurality of skeleton point neighborhood sets.
[0118] A topological relationship determination module 850, configured to construct an undirected graph according to each skeleton point neighborhood set, and determine the topological relationship between each skeleton point in each skeleton point neighborhood set according to the undirected graph.
[0119] A trace generation module 860, configured to generate a trace of the target rock mass according to the topological relationship between each skeleton point in each skeleton point neighborhood set.
[0120] Optionally, the acquiring of the three-dimensional point cloud data of the target rock mass includes:
[0121] Collecting structural plane image data of the target rock mass through an image acquisition device;
[0122] Generating three-dimensional point cloud data of the target rock mass based on the structural plane image data.
[0123] Optionally, the extracting of the edge points of the target rock mass from the three-dimensional point cloud data includes:
[0124] Determining a k-neighborhood point set of each point in the three-dimensional point cloud data;
[0125] Determining the centroid of the k-neighborhood point set of each point, and determining the resolution of the k-neighborhood point set of each point;
[0126] For the k-neighborhood point set of each point, determining whether the distance between each point in the k-neighborhood point set and the centroid is greater than a classification threshold; the classification threshold is the product of the resolution of the k-neighborhood point set and a preset parameter;
[0127] If the distance between a point in the k-neighborhood point set and the centroid is greater than the classification threshold, then this point is regarded as an edge point.
[0128] Optionally, determining the neighborhood point set of each skeleton point in the skeleton point cloud data includes:
[0129] For each skeleton point, determine the skeleton points in the skeleton point cloud data whose distance from this skeleton point is less than a preset threshold, and obtain the neighborhood point set of this skeleton point.
[0130] Optionally, the nodes in the undirected graph are the skeleton points in the skeleton point neighborhood set, and each edge of the undirected graph is attached with a corresponding weight value, and the weight value is the distance between the two skeleton points connected by the corresponding edge.
[0131] Optionally, according to the undirected graph, determining the topological relationship between the skeleton points in each skeleton point neighborhood set includes:
[0132] For each skeleton point neighborhood set, perform the following processing according to the undirected graph:
[0133] Set the first point cloud set and the second point cloud set, where the first point cloud set includes a root node R in the undirected graph, and the second point cloud set includes other nodes in the undirected graph except the root node R;
[0134] Select a node closest to the root node R from the second point cloud set, denoted as node s, and move the node s from the first point cloud set to the second point cloud set;
[0135] Calculate the distances from the root node R through the node s to each node in the second point cloud set, and obtain the first distances from the root node R to each node in the second point cloud set;
[0136] Calculate the distances from the root node R without passing through the node s to each node in the second point cloud set, and obtain the second distances corresponding to each node in the second point cloud set from the root node R;
[0137] For each node in the second point cloud set, if the second distance from the root node R to this node is less than the first distance, then use the sum of the second distance and the weight value corresponding to the edge connecting the root node R and this node in the undirected graph as the new second distance;
[0138] Loop through the steps of selecting a node s closest to the root node R from the second point cloud set, moving the node s from the second point cloud set to the second point cloud set, calculating the first distance, calculating the second distance, and updating the second distance until all nodes in the first point cloud set are moved to the second point cloud set, obtaining the shortest paths from the root node R to each node other than the root node R in the undirected graph, so as to obtain the topological relationships between the skeleton points in each skeleton point neighborhood set.
[0139] Optionally, generating the trace of the target rock mass according to the topological relationships between the skeleton points in each skeleton point neighborhood set includes:
[0140] According to the shortest paths from the root node R to each node other than the root node R in the undirected graph, connect each node in sequence to form the trace of the target rock mass.
[0141] As Figure 9 shown, an electronic device 900 provided by an embodiment of the present invention includes a memory 910 and a processor 920; the memory 910 is used to store a computer program; the processor 920 is used to implement the method for extracting the trace of the rock mass as described above when executing the computer program.
[0142] Or, an electronic device 900 includes a memory 910 and a processor 920 coupled to the memory 910; the memory 910 is configured to store a computer program; the processor 920 is configured to perform the following operations when executing the computer program:
[0143] Obtain the three-dimensional point cloud data of the target rock mass;
[0144] Extract the edge points of the target rock mass in the three-dimensional point cloud data to obtain an initial set of shrinkage feature points;
[0145] Use the L1 median algorithm to extract the L1 median points in the initial set of shrinkage feature points to obtain the skeleton point cloud data;
[0146] Determine the neighborhood point set of each skeleton point in the skeleton point cloud data to obtain a plurality of skeleton point neighborhood sets;
[0147] Construct an undirected graph according to each skeleton point neighborhood set, and determine the topological relationships between the skeleton points in each skeleton point neighborhood set according to the undirected graph;
[0148] Generate the trace of the target rock mass according to the topological relationships between the skeleton points in each skeleton point neighborhood set.
[0149] A computer-readable storage medium provided by an embodiment of the present invention, on which a computer program is stored. When the computer program is executed by a processor, the method for extracting rock mass trace lines as described above is implemented.
[0150] Alternatively, a non-volatile computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following operations:
[0151] Obtain three-dimensional point cloud data of a target rock mass;
[0152] Extract edge points of the target rock mass from the three-dimensional point cloud data to obtain an initial set of contraction feature points;
[0153] Use the L1 median algorithm to extract L1 median points from the initial set of contraction feature points to obtain skeleton point cloud data;
[0154] Determine a neighborhood point set for each skeleton point in the skeleton point cloud data to obtain a plurality of skeleton point neighborhood sets;
[0155] Construct an undirected graph based on each of the skeleton point neighborhood sets, and determine the topological relationship between each skeleton point in each of the skeleton point neighborhood sets according to the undirected graph;
[0156] Generate a trace line of the target rock mass according to the topological relationship between each skeleton point in each of the skeleton point neighborhood sets.
[0157] Now, an electronic device 900 that can be a server or a client of the present invention will be described. It is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device 900 is intended to represent various forms of digital electronic computer devices, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device 900 can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0158] The electronic device 900 includes a computing unit, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) or a computer program loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The computing unit, the ROM, and the RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.
[0159] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above various methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc. In the present application, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. One can select some or all of the units according to actual needs to achieve the purpose of the solution of the embodiments of the present invention. In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0160] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will all fall within the protection scope of the present invention.
Claims
1. A method for extracting rock mass trace lines, characterized in that, Comprising: Obtaining three-dimensional point cloud data of a target rock mass; Extracting edge points of the target rock mass from the three-dimensional point cloud data to obtain an initial shrinkage feature point set; Extracting L1 median points from the initial shrinkage feature point set by using the L1 median algorithm to obtain skeleton point cloud data; Determining a neighborhood point set of each skeleton point in the skeleton point cloud data to obtain a plurality of skeleton point neighborhood sets; Constructing an undirected graph according to each of the skeleton point neighborhood sets, and determining the topological relationship between each skeleton point in each of the skeleton point neighborhood sets according to the undirected graph; Generating a trace line of the target rock mass according to the topological relationship between each skeleton point in each of the skeleton point neighborhood sets; The nodes in the undirected graph are the skeleton points in the skeleton point neighborhood set, and each edge of the undirected graph is attached with a corresponding weight value, and the weight value is the distance between two skeleton points connected by the corresponding edge; The determining the topological relationship between each skeleton point in each of the skeleton point neighborhood sets according to the undirected graph includes: For each of the skeleton point neighborhood sets, performing the following processing according to the undirected graph: Setting a first point cloud set and a second point cloud set, wherein the first point cloud set includes a root node R in the undirected graph, and the second point cloud set includes other nodes in the undirected graph except the root node R; the root node R is the center point of the skeleton point neighborhood set; Selecting a node closest to the root node R from the second point cloud set, denoted as node s, and moving the node s from the second point cloud set to the first point cloud set; Calculating the distances from the root node R to each node in the second point cloud set passing through the node s, to obtain a first distance from the root node R to each node in the second point cloud set; Calculating the distances from the root node R to each node in the second point cloud set without passing through the node s, to obtain a second distance corresponding to each node in the second point cloud set from the root node R; For each node in the second point cloud set, if the second distance from the root node R to the node is less than the first distance, then taking the sum of the second distance and the weight value corresponding to the edge connecting the root node R and the node in the undirected graph as the new second distance; Repeatedly performing the steps of selecting a node s closest to the node R from the second point cloud set, moving the node s from the second point cloud set to the first point cloud set, calculating the first distance, calculating the second distance, and updating the second distance until all nodes in the second point cloud set are moved to the first point cloud set, to obtain the shortest path from the root node R to each node in the undirected graph except the root node R, so as to obtain the topological relationship between each skeleton point in each of the skeleton point neighborhood sets.
2. The method for extracting rock mass traces according to claim 1, characterized in that, The obtaining the three-dimensional point cloud data of the target rock mass includes: Collecting structural plane image data of the target rock mass by an image acquisition device; Generating the three-dimensional point cloud data of the target rock mass based on the structural plane image data.
3. The extraction method of rock mass trace according to claim 1, characterized in that The extracting the edge points of the target rock mass from the three-dimensional point cloud data includes: Determine the set of k-neighborhood points for each point in the three-dimensional point cloud data; Determine the centroid of the set of k-neighborhood points for each point, and determine the resolution of the set of k-neighborhood points for each point; For the set of k-neighborhood points of each point, determine whether the distance between each point in the set of k-neighborhood points and the centroid is greater than the classification threshold; the classification threshold is the product of the resolution of the set of k-neighborhood points and a preset parameter; If the distance between a point in the set of k-neighborhood points and the centroid is greater than the classification threshold, then take this point as an edge point.
4. The method for extracting rock mass trace according to claim 1, characterized in that The determination of the set of neighborhood points for each skeleton point in the skeleton point cloud data includes: For each skeleton point, determine the skeleton points in the skeleton point cloud data whose distance from this skeleton point is less than a preset threshold, and obtain the set of neighborhood points of this skeleton point.
5. The method for extracting rock mass trace according to claim 1, characterized in that The generation of the trace of the target rock mass according to the topological relationship between the skeleton points in each of the skeleton point neighborhood sets includes: According to the shortest paths from the root node R to each node other than the root node R in the undirected graph, connect each node in sequence to form the trace of the target rock mass.
6. An extraction device for rock mass trace lines, characterized in that Includes: A data acquisition module for acquiring the three-dimensional point cloud data of the target rock mass; An edge point extraction module for extracting the edge points of the target rock mass in the three-dimensional point cloud data to obtain an initial set of contraction feature points; A skeleton point extraction module for extracting the L1 median points in the initial set of contraction feature points by using the L1 median algorithm to obtain the skeleton point cloud data; A skeleton point neighborhood determination module for determining the set of neighborhood points for each skeleton point in the skeleton point cloud data to obtain multiple sets of skeleton point neighborhoods; A topological relationship determination module for constructing an undirected graph according to each of the skeleton point neighborhood sets, and determining the topological relationship between the skeleton points in each of the skeleton point neighborhood sets according to the undirected graph; A trace generation module for generating the trace of the target rock mass according to the topological relationship between the skeleton points in each of the skeleton point neighborhood sets; The nodes in the undirected graph are the skeleton points in the set of skeleton point neighborhoods, and each edge in the undirected graph is attached with a corresponding weight value, and the weight value is the distance between the two skeleton points connected by the corresponding edge; The determination of the topological relationship between the skeleton points in each of the skeleton point neighborhood sets according to the undirected graph includes: For each of the skeleton point neighborhood sets, perform the following processing according to the undirected graph: Set a first point cloud set and a second point cloud set, where the first point cloud set includes a root node R in the undirected graph, and the second point cloud set includes other nodes in the undirected graph except the root node R; the root node R is the center point of the set of skeleton point neighborhoods; Select a node closest to the root node R from the second point cloud set, denoted as node s, and move the node s from the second point cloud set to the first point cloud set; Calculate the distances from the root node R through the node s to each node in the second point cloud set to obtain the first distances from the root node R to each node in the second point cloud set; Calculate the distances from the root node R to each node in the second point cloud set without passing through the node s, and obtain the second distances corresponding to each node in the second point cloud set from the root node R; For each node in the second point cloud set, if the second distance from the root node R to this node is less than the first distance, then use the sum of the second distance and the weight of the edge connecting the root node R and this node in the undirected graph as the new second distance; Loop through the steps of selecting a node s closest to the node R from the second point cloud set, moving the node s from the second point cloud set to the first point cloud set, calculating the first distance, calculating the second distance, and updating the second distance, until all nodes in the second point cloud set are moved to the first point cloud set, to obtain the shortest paths from the root node R to each node other than the root node R in the undirected graph, so as to obtain the topological relationships between the skeleton points in each skeleton point neighborhood set.
7. An electronic device, characterized in that, Comprising a memory and a processor; The memory is used for storing a computer program; The processor is used for, when executing the computer program, implementing the method for extracting the rock mass trace line according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is executed by the processor, the method for extracting the rock mass trace line according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Single-sided tree point cloud skeleton line extraction method and system based on binocular vision
CN112465832A
Rock mass trace automatic extraction method and system based on point cloud
CN119169304A