Laser point cloud plane detection and distance measurement method, device, equipment and medium
The raw point cloud data of the tunnel wall was acquired by lidar, and the facade point cloud was established. Large-scale facade point cloud was extracted by voxelization and RANSAC algorithm. The real-time distance was calculated by combining moving median filtering, which solved the distance deviation problem caused by manual measurement and achieved higher accuracy tunnel wall distance measurement.
Patent Information
- Application Number
- CN202511302753.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-12
AI Technical Summary
When existing technologies measure tunnel wall distances manually, the measurement points are prone to falling on uneven surfaces, resulting in distances that deviate from the true distance and cannot be represented. Existing technologies cannot effectively solve the technical challenges existing on the tunnel wall surface.
The raw point cloud data of the tunnel wall was detected by lidar to establish the facade point cloud. Large-scale facade point cloud was extracted by voxelization and RANSAC algorithm, and the plane fitting distance was fitted. The real-time distance was calculated by combining the moving median filter.
It improves the accuracy of tunnel wall distance measurement, enabling it to more accurately represent the actual working plane of the tunnel wall and adapt to changes in the tunnel wall as excavation operations progress.
Smart Images

Figure CN120802208B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of distance measurement, in particular to a laser point cloud plane detection and distance measurement method, device, equipment and medium. BACKGROUND
[0002] The coal wall in the coal mine and the tunnel wall in the tunnel generated by tunneling all belong to the tunnel wall, and the tunnel wall changes constantly with the progress of the tunneling operation. For example, mining operations can cause new coal seams to collapse constantly, resulting in a concave-convex structure on the coal wall surface, and the degree of concave-convex changes constantly with the progress of the tunneling operation. The prior art measures the distance of the tunnel wall manually (the distance can be the distance from the tunnel wall to the tunnel entrance or the distance from the tunnel wall to the measuring tool), and the distance measured by manual measurement is the local distance of the tunnel wall, which is easy to cause the measurement point to fall on the concave-convex position on the tunnel wall, so that the measured distance cannot represent the true distance of the whole tunnel wall.
[0003] In summary, the distance of the tunnel wall measured by the prior art deviates from the true distance.
[0004] Therefore, the prior art still needs to be improved and improved. SUMMARY
[0005] To solve the above technical problems, the present application provides a laser point cloud plane detection and distance measurement method, device, equipment and medium, which solves the problem that the distance of the tunnel wall measured by the prior art deviates from the true distance.
[0006] To achieve the above purpose, the present application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a laser point cloud plane detection and distance measurement method, which comprises:
[0008] Obtaining the original point cloud data of the tunnel wall detected by the laser radar, and establishing a vertical plane point cloud representing the tunnel wall based on the original point cloud data;
[0009] Determining the measurement distance of the laser radar to the vertical plane point cloud;
[0010] Based on the measurement distance, determining the real-time distance of the laser radar to the tunnel wall.
[0011] In an implementation mode, establishing a vertical plane point cloud representing the tunnel wall based on the original point cloud data comprises:
[0012] Performing voxelization processing on the original point cloud data to obtain voxelized point cloud;
[0013] Based on the voxelized point cloud, a facade point cloud representing the tunnel wall is established.
[0014] In an implementation, the original point cloud data is voxelized to obtain a voxelized point cloud, including:
[0015] The original point cloud data is meshed to obtain a plurality of original points falling into a mesh;
[0016] All the original points in the mesh are replaced by a point located at the center position of the mesh to obtain the voxelized point cloud.
[0017] In an implementation, based on the voxelized point cloud, a facade point cloud representing the tunnel wall is established, including:
[0018] A point set of coplanar points in the voxelized point cloud is determined;
[0019] The point set with the largest number of points is filtered out from the point set, and a facade point cloud representing the tunnel wall is established based on the point set with the largest number of points.
[0020] In an implementation, the point set of coplanar points in the voxelized point cloud is determined, including:
[0021] Three points are filtered out from the voxelized point cloud, and a plane where the three points are located is constructed, denoted as a coplanar plane;
[0022] A point-to-plane distance of the remaining points in the voxelized point cloud to the coplanar plane is determined, the remaining points being points other than the three points in the voxelized point cloud;
[0023] According to the point-to-plane distance corresponding to the remaining points, points belonging to the coplanar plane are filtered out from the remaining points, and the point set is constructed according to the three points and the points filtered out belonging to the coplanar plane.
[0024] In an implementation, the measurement distance of the laser radar to the facade point cloud is determined, including:
[0025] A covariance matrix of the facade point cloud is constructed;
[0026] Eigenvalues of the covariance matrix are determined, and an eigenvector of the covariance matrix corresponding to the smallest eigenvalue is determined;
[0027] A centroid located at the facade point cloud is determined;
[0028] A fitting plane is constructed according to the centroid and the eigenvector corresponding to the smallest eigenvalue;
[0029] determine a fitting distance of the laser radar to the fitting plane, and determine a measurement distance of the laser radar to the facade point cloud according to the fitting distance.
[0030] In an implementation manner, the original point cloud data includes a history frame point cloud and a current frame point cloud which vary with the tunnel wall changing in real time, the measurement distance includes a history distance corresponding to the history frame point cloud and a current distance corresponding to the current frame point cloud; and the real-time distance of the laser radar to the tunnel wall is determined based on the measurement distance, including:
[0031] applying a moving median filter to the history distance and the current distance to obtain a filtering result;
[0032] determining the real-time distance of the laser radar to the tunnel wall based on the filtering result and the current distance.
[0033] In a second aspect, the embodiment of the present application further provides a laser point cloud plane detection and distance measurement device, wherein the device includes the following components:
[0034] a facade point cloud construction module, configured to acquire original point cloud data of a tunnel wall detected by a laser radar, and establish a facade point cloud representing the tunnel wall based on the original point cloud data;
[0035] a measurement distance calculation module, configured to determine a measurement distance of the laser radar to the facade point cloud;
[0036] a real-time distance calculation module, configured to determine a real-time distance of the laser radar to the tunnel wall based on the measurement distance.
[0037] In a third aspect, the embodiment of the present application further provides a terminal device, wherein the terminal device includes a memory, a processor, and a laser point cloud plane detection and distance measurement program stored in the memory and executable on the processor; when the processor executes the laser point cloud plane detection and distance measurement program, the steps of the laser point cloud plane detection and distance measurement method described above are implemented.
[0038] In a fourth aspect, the embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a laser point cloud plane detection and distance measurement program; when the laser point cloud plane detection and distance measurement program is executed by a processor, the steps of the laser point cloud plane detection and distance measurement method described above are implemented.
[0039] Beneficial effects: the present application detects the original point cloud data of the tunnel wall by laser radar, then establishes the facade point cloud representing the tunnel wall based on the original point cloud data, that is, uses the facade point cloud to represent the plane where the tunnel wall is located, then calculates the measurement distance of the laser radar to the facade point cloud, and finally calculates the real-time distance of the tunnel wall based on the measurement distance. Since the present application uses the facade point cloud to represent the plane where the tunnel wall is located, the plane is the operation plane that affects the next construction, therefore the facade point cloud can compensate for the interference of the uneven surface of the tunnel wall on the real operation plane, so the real-time distance of the tunnel wall measured by the present application is closer to the real distance of the laser radar to the operation plane of the tunnel wall, and finally the accuracy of the real-time distance of the present application is improved. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is the overall flowchart of the present application;
[0041] Figure 2 is the facade point cloud extraction effect diagram in the embodiment of the present application;
[0042] Figure 3 is the structure diagram of the laser point cloud plane detection and distance measurement device provided by the present application;
[0043] Figure 4 is the internal structure principle block diagram of the terminal device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0044] The technical solutions in the present application are described clearly and completely in combination with the embodiments and the drawings of the specification. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0045] It is found through research that the coal wall in the coal mine underground and the tunnel wall in the tunnel produced by tunnel excavation all belong to the tunnel wall, and the tunnel wall changes constantly with the progress of the excavation operation, for example, the new coal seam collapses constantly due to the mining operation, so that the surface of the coal wall presents an uneven structure, and the degree of unevenness changes constantly with the progress of the excavation operation. The prior art measures the distance of the tunnel wall (which can be the distance from the tunnel wall to the tunnel entrance, or the distance from the tunnel wall to the measurement tool) manually, and the distance measured by manual measurement is the local distance of the tunnel wall, which is prone to falling on the uneven position on the tunnel wall, so that the measured distance cannot represent the real distance of the whole tunnel wall.
[0046] To solve the above technical problems, the present application provides a laser point cloud plane detection and distance measurement method, device, equipment and medium, which solves the problem that the distance of the tunnel wall measured by the prior art deviates from the real distance.
[0047] The laser point cloud plane detection and distance measurement method of the embodiment can be applied to a terminal device, which can be a terminal product with point cloud data processing function, such as a computer, etc. In the embodiment, as shown in Figure 1 The laser point cloud plane detection and distance measurement method specifically includes the following steps:
[0048] S100, obtaining original point cloud data of a tunnel wall detected by a laser radar, and establishing a facade point cloud representing the tunnel wall based on the original point cloud data;
[0049] S200, determining a measurement distance of the laser radar to the facade point cloud;
[0050] S300, determining a real-time distance of the laser radar to the tunnel wall based on the measurement distance.
[0051] When the tunnel wall in steps S100 and S300 is a coal wall, the distance measurement method based on steps S100, S200 and S300 can be used to measure the distance between the coal wall and the laser radar, and the specific application process is as follows:
[0052] The laser radar is set at the entrance of the coal mine or at a position close to the entrance of the coal mine, the transmitter of the laser radar emits laser pulses to the inside of the coal mine, the laser pulses are reflected when encountering the coal wall, the reflected laser is received by the receiver of the laser radar, the distance between each point on the coal wall and the laser radar is calculated according to the time difference from emission to reception of the laser and the speed of light, and the distance between each point on the coal wall and the laser radar is represented by original point cloud data. The facade point cloud representing the coal wall is established based on the original point cloud data, the plane formed by the points on the facade point cloud, i.e. the working face of the coal wall, through which the points located at the uneven or unsmooth places of the coal wall can be removed, which are not the points to be considered for the operation. Then the measurement distance of the laser radar to the facade point cloud is calculated, and finally the real-time distance between the laser radar and the coal wall is calculated.
[0053] When the tunnel wall is a tunnel wall, the distance measurement method based on steps S100, S200 and S300 can be used to measure the distance between the tunnel wall and the laser radar, and the specific application process is as follows:
[0054] The laser radar is arranged in a safety area set in the tunnel, the transmitter of the laser radar emits laser pulses to the construction direction of the tunnel, the laser pulses are reflected when encountering the tunnel wall, the reflected laser is received by the receiver of the laser radar, the distance between each point on the tunnel wall and the laser radar is calculated according to the time difference from emission to reception of the laser and the speed of light, and the original point cloud data represents the distance between each point on the tunnel wall and the laser radar, and the same processing method as the coal wall is used on the original point cloud data to obtain the real-time distance between the laser radar and the tunnel wall.
[0055] The original point cloud data in step S100 represents the coordinates of each point on the tunnel wall in the coordinate system of the laser radar, the origin of the coordinate system is the laser radar, the horizontal coordinate is in the length direction of the tunnel, the vertical coordinate is in the width direction of the tunnel, and the vertical coordinate is in the depth direction of the tunnel. The establishment of the elevation point cloud representing the tunnel wall based on the original point cloud data in step S100 includes the following specific steps S101, S102, S103, S104, S105 and S106:
[0056] S101, the original point cloud data is divided into a plurality of original points falling into the grid.
[0057] The original point cloud data is a plurality of single-frame point cloud data detected by the laser radar, each single-frame point cloud data is voxelized, that is, the single-frame point cloud data is three-dimensionally divided into a grid, so that each original point of the single-frame point cloud data is divided into a corresponding grid. The voxel size is 0.2 meters, that is, the distance between two original points in the same three-dimensional grid.
[0058] S102, replace all original points in the grid with a point located at the center of the grid to obtain the voxelized point cloud.
[0059] The three-dimensional grid center point (the center point is a point located at the center position) is used to replace all original points in the three-dimensional grid to re-express the single-frame point cloud data, that is, to express a grid with a point. When the grid falls within the single-frame point cloud data points, the network is a non-empty voxel. For scene (the scene is the scene inside the coal mine) re-expression, all non-empty voxels are replaced by the voxel center point instead of the original point in the voxel, thereby generating new single-frame point cloud data (new single-frame point cloud data is voxelized point cloud). The purpose of expressing the scene with voxelized point cloud is to eliminate the scanning property of the laser radar, because the nearby coal wall or the wrinkle structure on the coal wall may scan a large number of point clouds, and the distant coal wall has fewer point clouds. The scanning property of the laser radar for data acquisition will cause the acquired point cloud scene to have the disadvantage of "more near and less far", that is, the point cloud obtained by scanning the nearby coal wall is relatively dense, and the point cloud obtained by scanning the distant coal wall is relatively sparse. Through the voxelization of the point cloud, the voxel center point is used to replace the point cloud of the scene regardless of the distance or special structure, and all positions of the data are standardized to a lower limit of density (the density is a voxel distance), which overcomes the disadvantage of "more near and less far". That is, the original single-frame point cloud data is expressed by voxelized point cloud, which can make the single-frame point cloud data into homogeneous point cloud, that is, the point cloud on the tunnel wall is expressed in an averaged manner.
[0060] The above-mentioned voxelized point cloud expresses the original single-frame point cloud data, that is, the original single-frame point cloud data is expressed by fewer points. For example, the original single-frame point cloud data contains 1000 points, which are divided into 100 grids after voxelization processing, and the point located at the center position of the grid represents the grid. Therefore, the 1000 points become 100 points, that is, the single-frame point cloud data containing 1000 points becomes voxelized point cloud containing 100 points after voxelization processing.
[0061] The voxelized point cloud is applied to the RANSAC algorithm (RANSAC is Random Sample Consensus, RANSAC algorithm is Random Sample Consensus algorithm) to extract the maximum vertical plane point cloud from the voxelized point cloud. The detailed steps of the RANSAC algorithm include steps S103, S104, S105 and S106.
[0062] S103, three points are selected from the voxelized point cloud, and a plane where the three points are located is constructed, which is denoted as a coplanar plane.
[0063] Three points are randomly sampled from the several points contained in the voxelized point cloud, and the coordinates of the first sampling point, the second sampling point and the third sampling point are denoted as This represents the coordinates of the third sampling point. According to the principle of three points being coplanar, a plane can be obtained from these three points (this plane is called a coplanar plane), and the normal vector of this coplanar plane... It is calculated using the following formula:
[0064] ;
[0065] in Represents the cross product with respect to the normal vector. Normalization is performed to obtain the unit normal vector. Using the unit normal vector Indicates the coplanar plane:
[0066] ;
[0067] In the formula, and Given that the parameters of the plane equation can be calculated using the above formula, we can obtain the parameters of the plane equation. ,in, For Random It represents randomness.
[0068] S104, determine the point-to-plane distance from the remaining points in the voxelized point cloud to the coplanar plane, wherein the remaining points are the points in the voxelized point cloud other than the three points.
[0069] Calculate Then, using the unit normal vector and Calculate the distance from the remaining points in the voxelized point cloud to the coplanar plane; this distance is the point-to-plane distance.
[0070] ;
[0071] In the formula, Representing the The coordinates of the remaining points Representing the The distance from each remaining point to the coplanar plane (this distance is the point-to-plane distance).
[0072] S105, based on the point-plane distance corresponding to the remaining points, select points belonging to the coplanar plane from the remaining points, and construct the point set based on the three points and the selected points belonging to the coplanar plane.
[0073] From the remaining points, select the points that belong to the coplanar plane, using the following selection criteria: ,in Represents the threshold. The value can be 0.4 meters. When Less than At that time, the first The remaining points belong to the coplanar plane, therefore the th... The remaining points are added to the point set.
[0074] By randomly sampling three points multiple times, each random sampling will generate a corresponding set of points. In this embodiment, the number of random samplings is 500, so 500 set of points can be generated (that is, the number of set of points that can be generated is 500).
[0075] S106, select the point set with the most points from the point set, and establish a facade point cloud representing the tunnel wall based on the point set with the most points.
[0076] The point sets generated by multiple random samplings contain different numbers of points. The point set with the most points is selected from these point sets, and the point cloud formed by the points in the point set with the most points is taken as the elevation point cloud.
[0077] Continuing with the example above, the sample with the most planar points out of 500 samples is retained as the large-scale extracted elevation point cloud.
[0078] This embodiment extracts vertical point clouds on a large scale, which can bypass the geometric fluctuations caused by small-scale unevenness on the tunnel wall. In other words, it prevents points from uneven areas from appearing in the vertical point cloud, thus eliminating the influence of unevenness on distance measurement.
[0079] The point cloud of the coal face elevation extracted using the RANSAC algorithm in step S100 is as follows: Figure 2 As shown, Figure 2 The gray dots in the image represent single-frame point clouds, while the blue dots represent point clouds of the coal face obtained through RANSAC algorithm estimation. Figure 2 The green box in the image shows the extraction results of the point cloud facade of the same coal face from a top-down perspective.
[0080] Step S200 determines the measurement distance of the laser radar to the facade point cloud based on the least squares fitting method, including the following specific steps S201, S202, S203, S204, and S205:
[0081] S201, Construct the covariance matrix of the elevation point cloud. :
[0082] ;
[0083] ;
[0084] ;
[0085] ;
[0086] ;
[0087] ;
[0088] ;
[0089] wherein, represents a covariance, represents a horizontal coordinate of the i-th point on the facade point cloud, represents a vertical coordinate of the i-th point on the facade point cloud, represents a vertical coordinate of the i-th point on the facade point cloud, represents a vertical coordinate of the i-th point on the facade point cloud, represents a horizontal coordinate of the geometric center of the facade point cloud, represents a vertical coordinate of the geometric center of the facade point cloud, represents a vertical coordinate of the geometric center of the facade point cloud, represents a vertical coordinate of the geometric center of the facade point cloud, represents a total number of points contained in the facade point cloud.
[0090] S202, eigenvalues of the covariance matrix are determined, and an eigenvector of the covariance matrix corresponding to the smallest eigenvalue is determined.
[0091] Eigenvalues of the covariance matrix are calculated in the prior art, all eigenvalues of the covariance matrix are denoted by , and a matrix composed of all eigenvectors of the covariance matrix is denoted by , , , satisfy the following relationship:
[0092] ;
[0093] wherein, and are known, so can be calculated, since the covariance matrix is a 3x3 matrix, the covariance matrix has three eigenvectors, so can be decomposed into three eigenvectors, and the three eigenvectors are arranged in order of the eigenvalues corresponding to the three eigenvectors, i.e. , wherein is an eigenvector corresponding to the largest eigenvalue, is an eigenvector corresponding to an eigenvalue between the largest and smallest eigenvalues, and The eigenvector corresponding to the minimum eigenvalue.
[0094] S203, determining the centroid of the facade point cloud :
[0095] The centroid of the facade point cloud is a point located at the geometric center of the facade point cloud, , calculating the centroid is the prior art.
[0096] S204, constructing a fitting plane according to the centroid and the eigenvector corresponding to the minimum eigenvalue.
[0097] The equation of the constructed fitting plane is as follows:
[0098] ;
[0099] Wherein, represents the parameters of the fitting plane to be solved, , i.e. Fitting, represents the meaning of fitting, and is known, so the value of can be calculated. According to the decomposition property of three-dimensional covariance matrix, the eigenvector corresponding to the minimum eigenvalue is used as the normal vector to construct the fitting plane, which passes through the centroid of the facade point cloud, and the residual square sum of each point in the facade point cloud to the fitting plane is minimum (the residual refers to the shortest distance of each point to the fitting plane). Therefore, it can optimally represent the orientation of the facade point cloud.
[0100] S205, determining the fitting distance of the laser radar to the fitting plane, and determining the measurement distance of the laser radar to the facade point cloud according to the fitting distance.
[0101] Let represent the position of the laser radar, since the laser radar is located at the origin of the coordinate system, , represents the transpose of the matrix. Let represent the fitting distance of the laser radar to the fitting plane, then , and is taken as the measurement distance of the laser radar to the facade point cloud.
[0102] The step S100 of the embodiment adopts the RANSAC algorithm for large-scale extraction, and the step S200 adopts the least square method for small-scale fitting, which fully guarantees the correctness of the facade point cloud extraction and overcomes the influence of irregular tunnel wall surface and local irregularity on the measurement distance.
[0103] The raw point cloud data in step S100 includes several single-frame point cloud data collected sequentially over time. Since the distance between the tunnel wall and the lidar changes over time as the excavation operation progresses, the several single-frame point cloud data are also different from each other. Step S100 constructs a facade point cloud based on each single-frame point cloud data. Step S200 constructs a fitting plane based on the single-frame point cloud data and the measured distance of the lidar to this fitting plane. Therefore, the real-time distance between the tunnel wall and the lidar can be calculated based on the measured distances corresponding to each of the several single-frame point cloud data, so as to determine the location of the working face where the tunnel wall is located. Step S300 calculates the real-time distance using the measured distances corresponding to each of the several single-frame point cloud data. Step S300 includes the following specific steps S301 and S302:
[0104] S301, apply moving median filtering to the historical distance and the current distance to obtain the filtering result.
[0105] The raw point cloud data includes historical frame point clouds and current frame point clouds that change with the real-time changes in the tunnel walls. The historical distance is the distance between the lidar and the facade point cloud calculated based on the historical frame point cloud, and the current distance is the distance between the lidar and the facade point cloud calculated based on the current frame point cloud.
[0106] Moving median filtering is: , Represents moving median filtering. This represents the current distance between the LiDAR sensor, calculated based on the current frame's point cloud, and the facade's point cloud. Represents the current moment; Representative based on the first The historical distance between the LiDAR and the facade point cloud, calculated from historical frame points. The value is 4; The threshold representing the moving median filter, It can be 10%.
[0107] for In other words, as long as In Replace with ,Will Replace it with the feature vector corresponding to the smallest feature value calculated based on the current frame point. By replacing the parameters with those of the fitted plane calculated using cloud computing based on the current frame points, we can calculate... The value can be calculated using the same method. The value of .
[0108] S302, determining a real-time distance of the laser radar to the tunnel wall based on the filtering result and the current distance.
[0109] current distance satisfies , then is taken as the real-time distance of the laser radar to the tunnel wall.
[0110] If the current distance does not satisfy , then is taken as the real-time distance of the laser radar to the tunnel wall, where is a historical distance between the laser radar and the facade point cloud calculated based on the first historical frame point cloud.
[0111] Although the current distance does not satisfy , but still can use to establish the following inequality: , where is a distance between the laser radar and a facade point cloud at a next time, and the facade point cloud at the next time is a facade point cloud calculated based on a single frame point cloud data collected at the next time. Still use The reason is to prepare for the change of the tunnel wall distance, when the tunnel wall distance actually changes, the correct measurement value can be obtained after a window period (i.e. ), to prevent the median lock situation. Therefore, the measurement result of the tunnel wall distance can be output in real time, and the output is continuous every frame, and the output frequency is consistent with the frequency of the laser radar.
[0112] The algorithm stability is ensured by using the moving median filtering to limit the output of the non-qualified, and the actual change of the tunnel wall distance can be adapted.
[0113] The embodiment also provides a laser point cloud plane detection and distance measurement device, as shown in Figure 3 , the device comprises the following components:
[0114] The facade point cloud construction module 01 is used to acquire the original point cloud data of the tunnel wall detected by the laser radar, and establish a facade point cloud representing the tunnel wall based on the original point cloud data.
[0115] The measurement distance calculation module 02 is used to determine the measurement distance of the laser radar to the facade point cloud.
[0116] The real-time distance calculation module 03 is used to determine the real-time distance of the laser radar to the tunnel wall based on the measurement distance.
[0117] Based on the above embodiments, the application further provides a terminal device, a principle block diagram of which can be shown as follows. Figure 4 The terminal device includes a processor, a memory, a network interface, and a display screen connected through a system bus. The processor of the terminal device is configured to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the laser point cloud plane detection and distance measurement method. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.
[0118] Those skilled in the art can understand that, Figure 4 The principle block diagram shown in the above embodiments is only a block diagram of part of the structure related to the application scheme, and does not constitute a limitation on the terminal device to which the application scheme is applied. The specific terminal device can include more or fewer components than those shown in the diagram, or combine certain components, or have a different component arrangement.
[0119] In one embodiment, a terminal device is provided, which includes a memory, a processor, and a laser point cloud plane detection and distance measurement program stored in the memory and executable on the processor. When the processor executes the laser point cloud plane detection and distance measurement program, the following operation instructions are implemented:
[0120] Obtaining original point cloud data of a tunnel wall detected by a laser radar, and establishing a facade point cloud representing the tunnel wall based on the original point cloud data;
[0121] Determining a measurement distance of the laser radar to the facade point cloud;
[0122] Based on the measurement distance, determining a real-time distance of the laser radar to the tunnel wall.
[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0124] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for laser point cloud plane detection and distance measurement, characterized in that, The method comprises the following steps: acquiring original point cloud data of a tunnel wall detected by a laser radar, and establishing a facade point cloud representing the tunnel wall based on the original point cloud data, the original point cloud data comprising historical frame point cloud and current frame point cloud varying with the tunnel wall in real time; determining a measurement distance of the laser radar to the facade point cloud, the measurement distance comprising historical distance corresponding to the historical frame point cloud and current distance corresponding to the current frame point cloud; determining a real-time distance of the laser radar to the tunnel wall based on the measurement distance; establishing a facade point cloud representing the tunnel wall based on the original point cloud data, comprising: voxelizing the original point cloud data to obtain a voxelized point cloud; selecting three points from the voxelized point cloud and constructing a plane where the three points are located, denoted as a coplanar plane; determining point-to-plane distances of the remaining points in the voxelized point cloud to the coplanar plane, the remaining points being points other than the three points in the voxelized point cloud; selecting points belonging to the coplanar plane from the remaining points according to the point-to-plane distances corresponding to the remaining points, and constructing a point set according to the three points and the selected points belonging to the coplanar plane; selecting a point set with the largest number of points from the point set, and establishing a facade point cloud representing the tunnel wall based on the point set with the largest number of points; determining a measurement distance of the laser radar to the facade point cloud, comprising: constructing a covariance matrix of the facade point cloud; determining eigenvalues of the covariance matrix, and determining an eigenvector of the covariance matrix corresponding to the smallest eigenvalue; determining a centroid of the facade point cloud; constructing a fitting plane according to the centroid and the eigenvector corresponding to the smallest eigenvalue; determining a fitting distance of the laser radar to the fitting plane, and determining the measurement distance of the laser radar to the facade point cloud according to the fitting distance.
2. The method of claim 1, wherein, voxelizing the original point cloud data to obtain a voxelized point cloud, comprising: dividing the original point cloud data into grids to obtain a plurality of original points falling into the grids; replacing all the original points in the grid with a point located at the center position of the grid to obtain the voxelized point cloud.
3. The method of claim 1, wherein; determining a real-time distance of the laser radar to the tunnel wall based on the measurement distance, comprising: applying a moving median filter to the historical distance and the current distance to obtain a filtering result; determining the real-time distance of the laser radar to the tunnel wall based on the filtering result and the current distance.
4. A laser point cloud plane detection and distance measurement device, characterized in that, The device comprises the following components: a facade point cloud construction module, configured to acquire original point cloud data of a tunnel wall detected by a laser radar, and establish a facade point cloud representing the tunnel wall based on the original point cloud data, the original point cloud data comprising historical frame point cloud and current frame point cloud varying with the tunnel wall in real time; a measurement distance calculation module, configured to determine a measurement distance of the laser radar to the facade point cloud, the measurement distance comprising historical distance corresponding to the historical frame point cloud and current distance corresponding to the current frame point cloud; A real-time distance calculation module is configured to determine a real-time distance from the laser radar to the tunnel wall based on the measured distance. A facade point cloud representing the tunnel wall is established based on the original point cloud data, including: The original point cloud data is voxelized to obtain a voxelized point cloud; Three points are selected from the voxelized point cloud, and a plane on which the three points are located is constructed, denoted as a coplanar plane; A point-to-plane distance from the remaining points in the voxelized point cloud to the coplanar plane is determined, the remaining points being points other than the three points in the voxelized point cloud; Points belonging to the coplanar plane are selected from the remaining points according to the point-to-plane distances corresponding to the remaining points, and a point set is constructed based on the three points and the selected points belonging to the coplanar plane; A point set with the largest number of points is selected from the point set, and a facade point cloud representing the tunnel wall is established based on the point set with the largest number of points. A measured distance from the laser radar to the facade point cloud is determined, including: A covariance matrix of the facade point cloud is constructed; Eigenvalues of the covariance matrix are determined, and an eigenvector of the covariance matrix corresponding to the smallest eigenvalue is determined; A centroid of the facade point cloud is determined; A fitting plane is constructed based on the centroid and the eigenvector corresponding to the smallest eigenvalue; A fitting distance from the laser radar to the fitting plane is determined, and a measured distance from the laser radar to the facade point cloud is determined based on the fitting distance.
5. A terminal device, characterized by, The terminal device includes a memory, a processor, and a laser point cloud plane detection and distance measurement program stored in the memory and executable on the processor. When the processor executes the laser point cloud plane detection and distance measurement program, the steps of the laser point cloud plane detection and distance measurement method according to any one of claims 1-3 are implemented.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a laser point cloud plane detection and distance measurement program. When the processor executes the laser point cloud plane detection and distance measurement program, the steps of the laser point cloud plane detection and distance measurement method according to any one of claims 1-3 are implemented.
Citation Information
Patent Citations
Building deformation monitoring method based on three-dimensional laser point cloud geometric features
CN113804118A
Building facade structure extraction method based on multi-scale dynamic graph convolution
CN116977572A