Boundary detection method, device and equipment based on point cloud data and medium
By processing point cloud data using RANSAC and PCA algorithms, the problem of environmental interference in existing boundary detection methods is solved, and high-precision boundary anomaly detection is achieved.
Patent Information
- Application Number
- CN202511406184.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-24
AI Technical Summary
Existing boundary detection methods are susceptible to interference from environmental factors such as lighting and weather, resulting in high false alarm rates and low detection accuracy.
The RANSAC algorithm is used to perform planar fitting on the point cloud data to distinguish between the point clouds of the surrounding columns and the surrounding surfaces. Abnormal surrounding surfaces are identified through local density analysis and mesh generation. The PCA algorithm is used to determine the tilt angle of the surrounding columns and generate the boundary detection results.
It improves the accuracy and precision of perimeter detection, reduces the cost of manual inspections and environmental interference, and enables accurate identification of perimeter fence damage and tilted posts.
Smart Images

Figure CN121564631A_ABST
Abstract
Description
[0001] A method, apparatus, equipment and medium for boundary detection based on point cloud data Technical Field This application relates to the field of boundary anomaly detection technology, and in particular to a boundary detection method, apparatus, equipment and medium based on point cloud data. Background Technology
[0002] Physical boundaries (such as barbed wire, fences, etc.) are the first line of defense for important areas such as airports, critical infrastructure, and industrial parks. Their integrity is directly related to the security of the area. In order to ensure the security of the area, it is necessary to conduct anomaly detection on the boundaries from time to time to discover abnormal boundary areas with damage or other hidden dangers, including abnormal perimeter surfaces and abnormal perimeter posts, so as to carry out repairs as soon as possible.
[0003] Existing perimeter detection methods generally rely on video surveillance for perimeter intrusion detection. However, these methods are susceptible to interference from environmental factors such as lighting, weather, and obstructions, resulting in a high false alarm rate. Furthermore, video images lack accurate three-dimensional information, leading to low detection accuracy.
[0004] Therefore, existing boundary detection methods suffer from low detection efficiency and accuracy. Summary of the Invention
[0005] This application provides a boundary detection method, apparatus, equipment, and medium based on point cloud data to solve the problems of low detection efficiency and accuracy in existing boundary detection methods.
[0006] Firstly, this application provides a boundary detection method based on point cloud data, the method comprising: Based on the RANSAC algorithm, plane fitting is performed on multiple target point cloud data to obtain the initial surrounding column point cloud and the initial surrounding surface point cloud corresponding to the target point cloud data. Local density analysis is then performed on the initial surrounding surface point cloud to obtain the target surrounding surface point cloud with local density lower than the preset density threshold. The target surface point cloud is divided into multiple point cloud grids. Based on the number of points in each point cloud grid and a preset number threshold, abnormal surface grids are determined. The number of points in the abnormal surface grid is less than the preset number threshold. Cluster the initial perimeter point cloud to obtain multiple target perimeter point clouds, and determine the tilt angle between each target perimeter point cloud and the gravity vector according to the PCA algorithm. Based on various tilt angles and preset angle thresholds, abnormal perimeter point clouds are determined, and based on abnormal perimeter grids and abnormal perimeter point clouds, the boundary detection results corresponding to the target point cloud data are determined; the tilt angle corresponding to the abnormal perimeter point cloud is greater than the preset angle threshold.
[0007] In some embodiments of this application, according to the RANSAC algorithm, planar fitting is performed on multiple target point cloud data to obtain the initial perimeter point cloud and the initial perimeter surface point cloud corresponding to the target point cloud data, including: Based on the mobile acquisition device, the original point cloud data corresponding to the boundary is determined, and the original point cloud data is denoised and downsampled to obtain the initial point cloud data. Based on the preset boundary centerline, determine the distance between each initial point cloud data and the boundary centerline, and based on the preset distance threshold, determine the target point cloud data whose distance is less than the preset distance threshold. Based on the RANSAC algorithm and the target point cloud data, the initial perimeter point cloud and the initial perimeter surface point cloud are determined.
[0008] In some embodiments of this application, determining the initial perimeter point cloud and the initial perimeter surface point cloud based on the RANSAC algorithm and target point cloud data includes: Based on the RANSAC algorithm, multiple random point cloud planes corresponding to the target point cloud data are generated, and the distance from each target point cloud data to each random point cloud plane is calculated. Based on a preset planar distance threshold, standard boundary point clouds with distances less than the preset planar distance threshold are determined, and target point cloud planes are determined based on the standard boundary point clouds corresponding to each random point cloud plane; the number of standard boundary point clouds corresponding to the target point cloud plane is the largest. The standard bounding surface point cloud contained in the target point cloud plane is identified as the initial bounding surface point cloud, and other target point cloud data are identified as the initial bounding column point cloud.
[0009] In some embodiments of this application, local density analysis is performed on the initial surface point cloud to obtain a target surface point cloud with a local density lower than a preset density threshold, including: The initial bounding point cloud is divided into multiple local voxels and the local density corresponding to each local voxel, and the target local voxels with local density lower than a preset density threshold are identified. The initial bounding surface point cloud in the target local voxel is determined as the target bounding surface point cloud.
[0010] In some embodiments of this application, the initial perimeter point cloud is clustered to obtain multiple target perimeter point clouds, including: According to the K-means clustering rule, the initial cylindrical point cloud is clustered to obtain multiple clustered cylindrical point clouds. The circumscribed cube is determined based on the cylindrical length, width and height values corresponding to each clustered cylindrical point cloud. Calculate the ratio of the column length to the column width to obtain the aspect ratio of the circumscribed cube, and determine the target aspect ratio greater than the preset aspect ratio threshold and the target circumscribed cube corresponding to the target aspect ratio based on the preset aspect ratio threshold. The target surrounding column point cloud is determined based on the clustered surrounding column point cloud corresponding to the target circumscribed cube.
[0011] In some embodiments of this application, the tilt angle between the point cloud of each target pericyte and the gravity vector is determined according to the PCA algorithm, including: Determine the geometric center of all target perimeter point clouds and the center coordinates of the geometric center. Based on the center coordinates and the point cloud coordinates of each target perimeter point cloud, calculate the difference between each point cloud coordinate and the center coordinates to obtain the corresponding point cloud center coordinates. Based on the PCA algorithm, calculate the covariance matrix corresponding to the center coordinates of all point clouds, and determine the multiple eigenvalues corresponding to the covariance matrix and the eigenvectors corresponding to each eigenvalue. The target feature value with the largest value among the feature values and the feature vector corresponding to the target feature value are identified as the target feature vector, and the vector direction of the target feature vector is identified as the target point cloud direction corresponding to the target cylindrical point cloud. Determine the tilt angle based on the direction of the target point cloud and the direction of gravity.
[0012] In some embodiments of this application, the boundary detection result corresponding to the target point cloud data is determined based on the abnormal boundary mesh and the abnormal boundary column point cloud, including: Based on the mobile acquisition device, determine the boundary coordinate information corresponding to each original point cloud data, and based on the boundary coordinate information, determine the abnormal boundary coordinate information corresponding to the abnormal boundary grid and abnormal boundary column point cloud respectively. Generate boundary detection results based on the abnormal boundary coordinate information.
[0013] Secondly, this application provides a boundary detection device based on point cloud data, the device comprising: The fitting module is used to perform planar fitting on multiple target point cloud data according to the RANSAC algorithm to obtain the initial surrounding column point cloud and the initial surrounding surface point cloud corresponding to the target point cloud data, and to perform local density analysis on the initial surrounding surface point cloud to obtain the target surrounding surface point cloud with local density lower than the preset density threshold. The partitioning module is used to partition the target surface point cloud into multiple point cloud grids, and to determine abnormal surface grids based on the number of points in each point cloud grid and a preset number threshold; the number of points in the abnormal surface grid is less than the preset number threshold. The clustering module is used to cluster the initial perimeter point cloud to obtain multiple target perimeter point clouds, and to determine the tilt angle between each target perimeter point cloud and the gravity vector according to the PCA algorithm. The determination module is used to determine the abnormal perimeter point cloud based on various tilt angles and preset angle thresholds, and to determine the boundary detection result corresponding to the target point cloud data based on the abnormal perimeter mesh and abnormal perimeter point cloud; the tilt angle corresponding to the abnormal perimeter point cloud is greater than the preset angle threshold.
[0014] Thirdly, this application provides a computer device, including: a processor, and a memory communicatively connected to the processor; The memory stores the instructions that the computer executes; The processor executes computer execution instructions stored in memory to implement the method of this application.
[0015] Fourthly, this application provides a computer-readable storage medium storing program code, which, when executed by a processor, is used to implement the method of this application.
[0016] This application provides a boundary detection method, apparatus, device, and medium based on point cloud data. The method involves performing planar fitting on multiple target point cloud data using the RANSAC algorithm to obtain initial boundary point clouds and initial boundary surface point clouds corresponding to the target point cloud data. Local density analysis is then performed on the initial boundary surface point clouds to obtain target boundary surface point clouds with local densities lower than a preset density threshold. The target boundary surface point clouds are then meshed to obtain multiple point cloud meshes. Based on the number of points in each point cloud mesh and a preset number threshold, abnormal boundary surface meshes are identified; the number of points corresponding to abnormal boundary surface meshes is less than the preset number threshold. The initial boundary point clouds are clustered to obtain multiple target boundary point clouds. The tilt angle between each target boundary point cloud and the gravity vector is determined using the PCA algorithm. Based on each tilt angle and a preset angle threshold, abnormal boundary point clouds are identified. Finally, based on the abnormal boundary surface meshes and abnormal boundary point clouds, the boundary detection result corresponding to the target point cloud data is determined; the tilt angle corresponding to the abnormal boundary point clouds is greater than the preset angle threshold.
[0017] Thus, by using the RANSAC algorithm to perform planar fitting on the target point cloud data, the initial perimeter point cloud can be distinguished from the initial perimeter surface point cloud based on the geometrical differences between the physical perimeter fence plane and the three-dimensional perimeter posts in the actual application scenario. This avoids misjudgments in physical perimeter detection caused by the mixing of point cloud data from the fence and posts, thereby improving the accuracy of subsequent perimeter anomaly detection and enhancing detection precision. By performing local density analysis on the initial perimeter surface point cloud, target perimeter surface point clouds with local densities below a preset threshold are selected to exclude interfering point clouds that conform to planar shapes but do not meet the sparse mesh characteristics of the fence, such as metal plates and flat debris. This ensures that only real perimeter point clouds are used in subsequent detection, significantly improving the reliability of perimeter detection. After meshing the target perimeter surface point cloud, the number of points contained in each point cloud mesh is compared with a preset threshold to determine the appropriate number of points. The method of defining anomaly perimeter grids transforms the detection of perimeter fencing damage from a large-scale, fuzzy process into precise localization of small grids. This avoids the common problem of a large damaged grid being identified as multiple small damaged grids in practical applications, enabling accurate identification and delineation of damaged areas. Clustering the initial perimeter post point cloud yields multiple target post point clouds. The PCA algorithm is then used to extract the principal axis direction of the posts and calculate their tilt angle relative to the gravity vector. This directional angle allows for precise quantification of post tilt. By comparing the tilt angle with a preset angle threshold, anomaly post point clouds are identified. The method integrates the anomaly perimeter grids and the anomaly post point clouds to output perimeter detection results. This approach simultaneously covers two core anomalies: perimeter fencing damage and post tilt. It significantly reduces the labor costs and subjective errors of manual inspections and is unaffected by environmental factors such as lighting and weather, improving the accuracy and precision of physical perimeter anomaly detection. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] Figure 1 A flowchart illustrating a boundary detection method based on point cloud data provided in this application embodiment; Figure 2 A schematic diagram of a boundary detection method based on point cloud data provided in an embodiment of this application; Figure 3 A schematic diagram of a boundary detection device based on point cloud data provided in this application embodiment; Figure 4 This is a structural block diagram of an apparatus for performing a boundary detection method based on point cloud data according to an embodiment of this application. Detailed Implementation
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0021] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0022] Figure 1 This is a flowchart illustrating a boundary detection method based on point cloud data, provided as an embodiment of this application. Figure 1 As shown, this boundary detection method based on point cloud data may include the following steps: S110. Based on the RANSAC algorithm, perform plane fitting on multiple target point cloud data to obtain the initial surrounding column point cloud and the initial surrounding surface point cloud corresponding to the target point cloud data. Then, perform local density analysis on the initial surrounding surface point cloud to obtain the target surrounding surface point cloud with a local density lower than the preset density threshold.
[0023] Among them, the RANSAC algorithm is a robust algorithm that can iteratively search for points that conform to a specific mathematical model from data containing noise or outliers. It can then randomly sample and select interior points that conform to the specific model and exterior points that do not conform to the model. In practical applications, the fence and posts of a physical boundary exhibit different characteristics in the point cloud data detected by LiDAR. That is, the posts have continuous surfaces, while the fence has discontinuous surfaces. By determining the shape of the fence, the RANSAC algorithm can be used to identify the point cloud data in the target point cloud data that conforms to the planar shape of the fence, so as to distinguish the point cloud of the perimeter and the point cloud of the posts.
[0024] Target point cloud data refers to the three-dimensional point cloud data obtained after data preprocessing, which is used for boundary anomaly detection. It can be understood as a three-dimensional set of environmental information related to the physical boundary. By collecting the environmental information corresponding to the boundary and converting it into the corresponding three-dimensional point cloud data, the corresponding target point cloud data can be further determined.
[0025] Plane fitting refers to finding a virtual plane from point cloud data through mathematical calculations, so that the plane can fit the actual spatial distribution of the fence to the greatest extent, that is, the distance error between the fence point cloud and the plane is minimized. In this way, the planar physical characteristics of the fence are transformed into a mathematical planar model, so as to distinguish the fence from the fence posts in the future.
[0026] The initial point cloud of the perimeter pillars refers to the point cloud that is determined to be inconsistent with the perimeter plane model after plane fitting by the RANSAC algorithm. That is, the distance from the point to the plane exceeds the error threshold. It may contain the point cloud of the pillars in the real scene, as well as a small number of interfering point clouds, such as birds and non-planar objects.
[0027] The initial perimeter point cloud refers to the point cloud that is determined to conform to the perimeter plane model after plane fitting by the RANSAC algorithm. That is, the distance from the point to the plane is less than the error threshold. It includes the real perimeter point cloud and a small number of interference point clouds that conform to the plane, such as metal plates and flat ground.
[0028] Local density analysis refers to the analysis of the sparsity of the point cloud of the initial enclosure by calculating the number of point clouds within a unit space. It can also be understood as the process of calculating the distribution density of point cloud data in a local small area in three-dimensional space, thereby removing interference from the initial enclosure point cloud and removing point clouds of solid objects that were mistakenly included, such as metal signs on the enclosure.
[0029] The preset density threshold refers to a pre-determined local point cloud density threshold, used to determine whether the local density corresponding to the current initial surface point cloud meets the actual requirements.
[0030] The target perimeter point cloud refers to the point cloud whose local density is lower than the preset density threshold after local density analysis. It can be understood as a pure point cloud that conforms to the physical characteristics of the perimeter net (sparse mesh structure), thereby achieving the removal of interfering point clouds.
[0031] Based on this, the RANSAC algorithm is used to perform planar fitting on the target point cloud data. The fitting results are then used to identify the initial perimeter point cloud that satisfies the perimeter planar characteristics and the initial perimeter column point cloud that does not, thus enabling the classification of the target point cloud data. This allows for different detection methods to be applied to perimeter and perimeter column point clouds, improving the accuracy of perimeter anomaly detection. Furthermore, by performing local density analysis on the initial perimeter point cloud—that is, calculating the number of points per unit space—the sparsity of the perimeter point cloud is analyzed. This yields target perimeter point clouds with local densities below a preset density threshold, thus removing interference and obtaining clean perimeter point cloud data. This allows for better analysis of whether the perimeter is damaged or exhibits other anomalies.
[0032] S120. Divide the target surface point cloud into multiple point cloud grids, and determine the abnormal surface grids based on the number of points in each point cloud grid and a preset number threshold; the number of points in the abnormal surface grids is less than the preset number threshold.
[0033] Among them, the preset quantity threshold refers to the threshold of the number of point clouds that is predetermined, which is used to determine whether the number of point clouds included in the point cloud grid meets the actual requirements.
[0034] Anomaly surface mesh refers to a mesh in the surface mesh where the point cloud data contains anomalies. In practical applications, if the surface is damaged, the number of points in the corresponding 3D mesh will also decrease. Therefore, by checking the number of points in the surface point cloud, we can reflect whether the actual physical surface corresponding to the mesh is damaged.
[0035] Based on this, the number of points in the surface point cloud can reflect whether the corresponding actual physical surface is damaged. To improve detection efficiency and accuracy, the target surface point cloud can be further subdivided into multiple grids. The grids can then be checked for quantity based on a preset quantity threshold, avoiding omissions or errors caused by directly checking the surface point cloud. If the number of point cloud data contained in the grid is less than the preset quantity threshold, it indicates that the actual physical surface corresponding to the current grid may be damaged, i.e., the surface is abnormal. If the number of point cloud data contained in the grid is not less than the preset quantity threshold, it indicates that the actual physical surface corresponding to the current grid is not damaged and the surface is normal.
[0036] S130. Cluster the initial perimeter point cloud to obtain multiple target perimeter point clouds, and determine the tilt angle between each target perimeter point cloud and the gravity vector according to the PCA algorithm.
[0037] Clustering is an algorithm that groups similar elements in a dataset into the same group (cluster). Examples include Euclidean clustering and k-means clustering. In point cloud processing, by calculating the spatial distance between points, points with a distance less than a threshold are grouped into the same cluster. This allows the single column point cloud in the initial column point cloud to be separated from the mixed point cloud. The initial column point cloud may contain point clouds of multiple columns, weeds, stones, and other non-planar objects. Through clustering, point clouds belonging to the same column are identified and formed into an independent set of point clouds.
[0038] The target column point cloud refers to the point cloud cluster obtained after clustering, which represents a single independent column. It can be understood as the pure column point cloud selected from the initial column point cloud, that is, the column point cloud that has eliminated most of the non-column interference points.
[0039] PCA stands for Principal Component Analysis, a statistical method that extracts the main distribution direction of data through linear transformation. In point cloud processing, PCA can find the direction with the greatest dispersion of point cloud clusters. Since the pillar is a slender structure, its point cloud has the greatest dispersion along its length. By determining this direction, the overall orientation of the pillar can be characterized, so as to further determine whether the pillar is tilted.
[0040] The gravity vector is a vertical vector pointing towards the Earth's center, such as the positive Z-axis in the world coordinate system, which can be obtained by sensors such as IMU (Inertial Measurement Unit).
[0041] Based on this, in order to determine whether the perimeter pillars are tilted, the initial pillar point cloud can be clustered to obtain the target pillar point cloud that can be used to characterize the actual pillars. Then, according to the PCA algorithm, the main extension direction corresponding to each target pillar point cloud can be determined, thereby determining the tilt angle between the target pillar point cloud and the gravity vector, that is, the degree of tilt of the pillars in the actual scene.
[0042] S140. Based on each tilt angle and a preset angle threshold, determine the abnormal perimeter point cloud, and based on the abnormal perimeter grid and the abnormal perimeter point cloud, determine the boundary detection result corresponding to the target point cloud data; the tilt angle corresponding to the abnormal perimeter point cloud is greater than the preset angle threshold.
[0043] Among them, the preset angle threshold refers to the pre-determined tilt angle threshold of the surrounding column, which is used to determine whether the tilt angle of the current surrounding column meets the actual requirements.
[0044] An abnormal surrounding column point cloud refers to a point cloud with a tilt angle greater than a preset angle threshold, meaning that the actual surrounding column is tilted too much. If the tilt angle between the main direction and the gravity direction of the surrounding column point cloud is greater than the preset angle threshold, it indicates that the physical surrounding column corresponding to the surrounding column point cloud in the actual scene may be too tilted, posing a safety hazard.
[0045] The boundary detection result refers to the detection result obtained after performing anomaly detection on the physical boundary corresponding to the point cloud data. This includes the actual detection results corresponding to various detection indicators such as whether the boundary netting is damaged or whether the perimeter posts are overly tilted. This allows users to check and repair any boundary areas with anomalies as soon as possible based on the boundary detection results, thereby eliminating safety hazards.
[0046] Based on this, by determining whether the angle between the main direction of the column point cloud and the gravity direction is greater than a preset angle threshold, it can be determined whether there is an anomaly in the column point cloud, so as to generate the detection result corresponding to the boundary based on the detection results of the column point cloud and the boundary surface point cloud respectively.
[0047] Based on the feasible implementation of S110 described above, this application further provides a method for performing planar fitting on multiple target point cloud data according to the RANSAC algorithm to obtain initial perimeter point clouds and initial perimeter surface point clouds corresponding to the target point cloud data, including: Based on the mobile acquisition device, the original point cloud data corresponding to the boundary is determined, and the original point cloud data is denoised and downsampled to obtain the initial point cloud data. Based on the preset boundary centerline, determine the distance between each initial point cloud data and the boundary centerline, and based on the preset distance threshold, determine the target point cloud data whose distance is less than the preset distance threshold. Based on the RANSAC algorithm and the target point cloud data, the initial perimeter point cloud and the initial perimeter surface point cloud are determined.
[0048] Among them, mobile acquisition devices refer to acquisition devices that can move along the perimeter to collect actual physical data corresponding to the complete perimeter, such as mobile devices carrying lidar.
[0049] Raw point cloud data refers to point cloud data directly determined from raw boundary data collected by mobile acquisition devices without any data processing. This data may contain a large amount of noise and interference.
[0050] Initial point cloud data refers to the point cloud data obtained after denoising and downsampling the original point cloud data, thereby achieving standardized processing of point cloud data.
[0051] The preset boundary centerline refers to the pre-set centerline of the boundary, which can be understood as a digital virtual track. This track is pre-loaded into the control system of the mobile unmanned platform (robot dog) to guide it to walk along the boundary, collect data, and serve as a spatial reference benchmark for data processing.
[0052] The preset distance threshold refers to a pre-determined distance threshold used to determine whether the distance between the point cloud data and the centerline meets the actual requirements.
[0053] Based on this, the collected raw point cloud data is processed, and the processed initial point cloud data is filtered according to the centerline to initially extract the boundary-related point cloud in order to obtain the target point cloud data.
[0054] Based on the feasible implementation of S110 described above, this application further provides a method for determining the initial perimeter point cloud and the initial perimeter surface point cloud according to the RANSAC algorithm and the target point cloud data, including: Based on the RANSAC algorithm, multiple random point cloud planes corresponding to the target point cloud data are generated, and the distance from each target point cloud data to each random point cloud plane is calculated. Based on a preset planar distance threshold, standard boundary point clouds with distances less than the preset planar distance threshold are determined, and target point cloud planes are determined based on the standard boundary point clouds corresponding to each random point cloud plane; the number of standard boundary point clouds corresponding to the target point cloud plane is the largest. The standard bounding surface point cloud contained in the target point cloud plane is identified as the initial bounding surface point cloud, and other target point cloud data are identified as the initial bounding column point cloud.
[0055] Among them, the random point cloud plane refers to the virtual plane generated by randomly selecting 3 points (3 points can determine a plane) from the target point cloud data based on the RANSAC algorithm. Each plane can be represented by a mathematical equation (such as ax+by+cz+d=0) to represent its spatial position and orientation. By generating a large number of random planes, the plane that is closest to the real fence plane can be selected in the future. Since the fence is a planar structure, there must exist a random plane that can fit the distribution of the fence point cloud to the greatest extent so as to separate the fence from the fence posts in the future.
[0056] The preset planar distance threshold is a pre-set critical distance for judging whether a point cloud conforms to the planar distribution pattern. If the distance from a point to the plane of the random point cloud is less than the threshold, it means that the point is approximately distributed on the plane, which conforms to the planar characteristics of the enclosure. Otherwise, it is judged to be off-planar, which conforms to the three-dimensional characteristics of the enclosure pillar.
[0057] A standard perimeter point cloud refers to all target point cloud data whose distance to a given random point cloud plane is less than a preset plane distance threshold. The more standard perimeter point clouds there are, the closer the random plane is to the real perimeter plane.
[0058] The target point cloud plane refers to the plane with the largest number of standard enclosure point clouds among all random point cloud planes, that is, the virtual plane that best matches the actual spatial distribution of the enclosure.
[0059] Based on this, the RANSAC algorithm is used to generate multiple random planes. By determining the distance from each point cloud data to each random plane, the random plane containing the most point cloud data is determined according to the preset plane distance threshold. This is the target point cloud plane. Based on the target point cloud plane, the initial circumferential point cloud and other initial circumferential column point clouds within the target point cloud data can be distinguished.
[0060] Based on the feasible implementation of S110 described above, this application further provides a method for performing local density analysis on the initial surface point cloud to obtain a target surface point cloud with a local density lower than a preset density threshold, including: The initial bounding point cloud is divided into multiple local voxels and the local density corresponding to each local voxel, and the target local voxels with local density lower than a preset density threshold are identified. The initial bounding surface point cloud in the target local voxel is determined as the target bounding surface point cloud.
[0061] In this context, a local voxel refers to a small cubic unit obtained by dividing the three-dimensional space containing the initial enclosure point cloud. Each unit is a local voxel, containing a portion of the initial enclosure point cloud within that spatial range. In practical applications, determining whether the enclosure is damaged can be done by analyzing the local density corresponding to the enclosure point cloud, rather than directly analyzing the complete density corresponding to the entire enclosure point cloud. This is because the enclosure is essentially a discontinuous mesh structure, and its point cloud distribution in space exhibits natural local differences. Specifically, the number of local point clouds is greater at the intersections of the mesh lines or in densely packed sections. The density of points in the netting is relatively high; however, in the gaps between the mesh openings or in sparse sections of the netting, the number of points in the local point cloud is extremely small, and the density is relatively low. If the overall density of the point cloud of the entire netting is directly analyzed, the differences will be averaged out. For example, even if there is a large mesh opening in the netting (the local density is extremely low, which is a normal structure), the overall density may still be within a reasonable range due to the normal density of other areas, and it will not reflect the true structural characteristics of the netting. However, local density analysis can accurately capture this local difference, which not only preserves the core feature of the overall sparseness of the netting, but also does not cover up the details of the local structure, and perfectly matches the physical form of the netting.
[0062] The target local voxel refers to the local voxel whose local density is lower than the preset density threshold after local density analysis. This voxel unit conforms to the sparse mesh structure characteristics of the fence. Only the initial fence point cloud within these voxels is retained, thereby excluding voxels containing high-density interference points, so as to obtain a pure target fence point cloud. This ensures that subsequent fence damage detection is based only on the real fence point cloud, thus improving detection accuracy.
[0063] Based on this, by dividing the surface point cloud into several small voxels, the surface point cloud in each voxel region is accurately analyzed, thereby identifying the target local voxels with local density lower than a preset density threshold, and thus obtaining the target surface point cloud.
[0064] Based on the feasible implementation of S130 described above, this application further provides clustering of the initial perimeter point cloud to obtain multiple target perimeter point clouds, including: According to the K-means clustering rule, the initial cylindrical point cloud is clustered to obtain multiple clustered cylindrical point clouds. The circumscribed cube is determined based on the cylindrical length, width and height values corresponding to each clustered cylindrical point cloud. Calculate the ratio of the column length to the column width to obtain the aspect ratio of the circumscribed cube, and determine the target aspect ratio greater than the preset aspect ratio threshold and the target circumscribed cube corresponding to the target aspect ratio based on the preset aspect ratio threshold. The target surrounding column point cloud is determined based on the clustered surrounding column point cloud corresponding to the target circumscribed cube.
[0065] K-means clustering rule refers to an unsupervised clustering algorithm rule based on distance similarity. It first presets the number of clusters K (e.g., estimated based on the total number of boundary pillars), and then iteratively calculates to group points that are spatially close in the initial boundary pillar point cloud into the same cluster, and points that are far apart into different clusters, so that the similarity of points within each cluster is the highest and the similarity of points between clusters is the lowest.
[0066] Clustered column point cloud refers to an independent cluster of point clouds representing a single potential column, separated from the initial column point cloud after calculation using the K-means clustering rule. Each cluster corresponds to a set of spatially densely distributed point clouds, which can characterize the corresponding physical column in the actual scene.
[0067] The circumscribed cube is a three-dimensional cube that can completely enclose a single clustered cylindrical point cloud and has the smallest volume. Its length, width, and height correspond to the maximum coordinate difference of the clustered cylindrical point cloud on the X, Y, and Z coordinate axes, respectively.
[0068] The preset aspect ratio threshold is a threshold corresponding to the length ratio of the circumscribed cube, usually set to 1. It is used to determine whether the aspect ratio of the smallest circumscribed cube meets the actual requirements, thereby eliminating clusters with aspect ratios close to 1 (such as spherical objects) or that do not conform to the column shape characteristics.
[0069] The target circumscribed cube refers to the circumscribed cube obtained after filtering by a preset aspect ratio threshold. The aspect ratio is greater than the preset threshold, which is a cube that conforms to the slender shape of a real column.
[0070] Based on this, the initial column point cloud is clustered using the K-means clustering rule to obtain multiple clustered column point clouds that can represent the actual physical column. Furthermore, the minimum bounding cube corresponding to each column point cloud is determined, thereby removing column point clouds whose aspect ratio does not conform to the column shape characteristics, and obtaining the target column point cloud.
[0071] Based on the feasible implementation of S130 described above, this application further provides a method for determining the tilt angle between the point cloud of each target perimeter cylinder and the gravity vector according to the PCA algorithm, including: Determine the geometric center of all target perimeter point clouds and the center coordinates of the geometric center. Based on the center coordinates and the point cloud coordinates of each target perimeter point cloud, calculate the difference between each point cloud coordinate and the center coordinates to obtain the corresponding point cloud center coordinates. Based on the PCA algorithm, calculate the covariance matrix corresponding to the center coordinates of all point clouds, and determine the multiple eigenvalues corresponding to the covariance matrix and the eigenvectors corresponding to each eigenvalue. The target feature value with the largest value among the feature values and the feature vector corresponding to the target feature value are identified as the target feature vector, and the vector direction of the target feature vector is identified as the target point cloud direction corresponding to the target cylindrical point cloud. Determine the tilt angle based on the direction of the target point cloud and the direction of gravity.
[0072] The geometric center refers to the spatial center of a single target point cloud cluster, which is determined by the average of the coordinates of all point clouds in the cluster on the X, Y, and Z axes.
[0073] Point cloud coordinates are the original three-dimensional spatial coordinates of each point in the target surrounding column point cloud cluster. They are point cloud data representing the real column, obtained by LiDAR after collection and filtering, and contain the specific location information of each point in the world coordinate system.
[0074] The point cloud center coordinates refer to the coordinates obtained by centering the original three-dimensional spatial coordinates of each point in the target column point cloud cluster according to the geometric center. By aligning all point cloud coordinates with the geometric center, the interference of the position offset of the point cloud in space is eliminated, so that the subsequent PCA analysis focuses only on the distribution pattern of the point cloud, such as the extension direction of the column, rather than the absolute position of the point cloud. In practical applications, the corresponding point cloud coordinates are determined by subtracting the coordinates of the center point from the coordinates of each point.
[0075] The covariance matrix is a 3×3 matrix calculated based on the center coordinates of a point cloud. It describes the dispersion and correlation between coordinates of the point cloud along the X, Y, and Z axes. In practical applications, the covariance matrix can be determined based on the same direction (e.g., X and X) and different directions (e.g., X and Y). The same direction refers to the degree of dispersion of the point cloud in the X direction, which is calculated by squaring the x-coordinate of the center coordinate of each point, adding all the squares together, and then dividing by the total number of points. Different directions calculate whether the dispersion of the point cloud in the X and Y directions is correlated, which is calculated by multiplying the x-coordinate and y-coordinate of each point, adding them together, and then dividing by the total number of points.
[0076] Eigenvalues are three numerical values obtained by solving the characteristic equation of the covariance matrix; while eigenvectors are three-dimensional unit vectors corresponding to each eigenvalue.
[0077] The target eigenvalue refers to the largest eigenvalue among the three eigenvalues of the covariance matrix, which corresponds to the direction with the greatest dispersion of the point cloud.
[0078] Based on this, the point cloud data in the target surrounding pillar point cloud is coordinate centered by using the geometric center corresponding to each target surrounding pillar point cloud to obtain the corresponding point cloud center coordinates. This allows for further calculation of the covariance matrix corresponding to the target surrounding pillar point cloud using the PCA algorithm. The covariance matrix can characterize the dispersion of the target surrounding pillar point cloud. Based on the eigenvalues corresponding to the covariance matrix, the largest eigenvalue, i.e., the target eigenvalue, is determined. Based on the eigenvector direction corresponding to the target eigenvalue, the target point cloud direction, i.e., the principal direction of the target surrounding pillar point cloud, is determined. Then, based on the target point cloud direction and the gravity direction, the corresponding tilt angle is calculated.
[0079] Based on the feasible implementation of S140 described above, this application further provides a method for determining the boundary detection result corresponding to the target point cloud data based on the abnormal boundary mesh and the abnormal boundary column point cloud, including: Based on the mobile acquisition device, determine the boundary coordinate information corresponding to each original point cloud data, and based on the boundary coordinate information, determine the abnormal boundary coordinate information corresponding to the abnormal boundary grid and abnormal boundary column point cloud respectively. Generate boundary detection results based on the abnormal boundary coordinate information.
[0080] Among them, mobile acquisition equipment refers to acquisition equipment that can move along the boundary to collect the actual physical data corresponding to the complete boundary; raw point cloud data refers to point cloud data directly determined based on the raw boundary data collected by the mobile acquisition equipment without any data processing.
[0081] The boundary coordinate information is based on the GPS / IMU positioning data of the mobile acquisition device, which determines the relevant point cloud of the boundary, including the physical coordinates of the netting point cloud and the pillar point cloud in the actual scene, so as to realize the positioning of the netting point cloud and the pillar point cloud in the boundary.
[0082] Anomaly boundary coordinate information refers to the coordinates corresponding to the anomaly boundary grid and the anomaly boundary point cloud.
[0083] Based on this, the GPS / IMU module in the data acquisition device determines the actual coordinates of each boundary section during information acquisition. This allows for the determination of the corresponding coordinate information after identifying the abnormal boundary grid and abnormal boundary point cloud, thereby generating boundary detection results. This enables users to promptly arrive at the site for safety inspection based on the coordinates corresponding to the abnormal boundary grid and abnormal boundary point cloud, improving maintenance efficiency.
[0084] Please refer to Figure 2 , Figure 2 A schematic diagram of a scenario for another boundary detection method based on point cloud data provided in this application embodiment; as shown. Figure 2As shown, the fencing and posts have different characteristics, mainly reflected in the differences in density and geometric structure; the anomaly detection of physical fencing includes two parts: the verticality detection of the fencing posts, that is, if the fencing collapses, it will lose its function of preventing external intrusion; and the fencing damage detection, that is, if the fencing has holes, it will create an opportunity for outsiders and animals to enter.
[0085] In some embodiments of this application, actual data related to the perimeter are collected using devices such as lidar to determine the corresponding original point cloud data. Further data preprocessing is performed on the original point cloud data to obtain target point cloud data. A plane fitting operation is performed using the RANSAC algorithm. Multiple candidate planes are generated by randomly sampling point clouds. The distances from all target point clouds to each candidate plane are calculated. The plane with the largest number of point clouds whose distances are less than a preset plane distance threshold is selected as the reference plane for the perimeter fence. The point clouds within this plane are then identified as the initial perimeter point cloud, while the remaining point clouds that do not meet the planar distribution are identified as the initial perimeter pillar point clouds, achieving initial separation between the perimeter fence and the pillar point clouds. Local density analysis is performed on the initial perimeter point cloud to select local units with densities lower than a preset density threshold. The point clouds within these units are identified as the target perimeter point cloud, excluding high-density interference objects such as metal plates. The target perimeter point cloud is then divided into two-dimensional grids, such as 10cm × 10cm grids, and the values of each point cloud grid are statistically analyzed. The number of point clouds within the perimeter is counted, and grids with a number less than a preset threshold are identified as abnormal perimeter grids, corresponding to areas of perimeter damage. Simultaneously, a clustering algorithm is applied to the initial perimeter point clouds to group spatially close point clouds into the same cluster, resulting in multiple target perimeter point clouds representing potential single pillars. Non-pillar interference clusters are excluded. Each target perimeter point cloud is analyzed using the PCA algorithm: first, the geometric center of the point cloud is calculated and coordinate centering is performed, and the covariance matrix is calculated to solve for eigenvalues and eigenvectors. The eigenvector corresponding to the largest eigenvalue is determined as the pillar's principal axis direction, allowing the calculation of the angle between this principal axis direction and the gravity vector, thus obtaining the tilt angle of each pillar. By comparing the tilt angle of each pillar with a preset angle threshold, point clouds with angles greater than the threshold are identified as abnormal perimeter point clouds, corresponding to pillars with excessive tilt. By integrating the spatial location information of all abnormal perimeter grids with the location and tilt angle information of the abnormal perimeter point clouds, corresponding perimeter detection results are generated.
[0086] Thus, by using the RANSAC algorithm to perform planar fitting on the target point cloud data, the initial perimeter point cloud can be distinguished from the initial perimeter surface point cloud based on the geometrical differences between the physical perimeter fence plane and the three-dimensional perimeter posts in the actual application scenario. This avoids misjudgments in physical perimeter detection caused by the mixing of point cloud data from the fence and posts, thereby improving the accuracy of subsequent perimeter anomaly detection and enhancing detection precision. By performing local density analysis on the initial perimeter surface point cloud, target perimeter surface point clouds with local densities below a preset threshold are selected to exclude interfering point clouds that conform to planar shapes but do not meet the sparse mesh characteristics of the fence, such as metal plates and flat debris. This ensures that only real perimeter point clouds are used in subsequent detection, significantly improving the reliability of perimeter detection. After meshing the target perimeter surface point cloud, the number of points contained in each point cloud mesh is compared with a preset threshold to determine the appropriate number of points. The method of defining anomaly perimeter grids transforms the detection of perimeter fencing damage from a large-scale, fuzzy process into precise localization of small grids. This avoids the common problem of a large damaged grid being identified as multiple small damaged grids in practical applications, enabling accurate identification and delineation of damaged areas. Clustering the initial perimeter post point cloud yields multiple target post point clouds. The PCA algorithm is then used to extract the principal axis direction of the posts and calculate their tilt angle relative to the gravity vector. This directional angle allows for precise quantification of post tilt. By comparing the tilt angle with a preset angle threshold, anomaly post point clouds are identified. The method integrates the anomaly perimeter grids and the anomaly post point clouds to output perimeter detection results. This approach simultaneously covers two core anomalies: perimeter fencing damage and post tilt. It significantly reduces the labor costs and subjective errors of manual inspections and is unaffected by environmental factors such as lighting and weather, improving the accuracy and precision of physical perimeter anomaly detection.
[0087] Figure 3 This is a schematic diagram of a boundary detection device 300 based on point cloud data, provided as an embodiment of this application. Figure 3 As shown, the boundary detection device 300 based on point cloud data includes: a fitting module 310, a partitioning module 320, a clustering module 330, and a determination module 340; wherein: The fitting module 310 is used to perform planar fitting on multiple target point cloud data according to the RANSAC algorithm to obtain the initial surrounding column point cloud and the initial surrounding surface point cloud corresponding to the target point cloud data, and to perform local density analysis on the initial surrounding surface point cloud to obtain the target surrounding surface point cloud with local density lower than the preset density threshold. The partitioning module 320 is used to partition the target surface point cloud into multiple point cloud grids, and to determine abnormal surface grids based on the number of points in each point cloud grid and a preset number threshold; the number of points in the abnormal surface grid is less than the preset number threshold. Clustering module 330 is used to cluster the initial perimeter point cloud to obtain multiple target perimeter point clouds, and to determine the tilt angle between each target perimeter point cloud and the gravity vector according to the PCA algorithm. The determination module 340 is used to determine the abnormal perimeter point cloud based on various tilt angles and preset angle thresholds, and to determine the boundary detection result corresponding to the target point cloud data based on the abnormal perimeter mesh and the abnormal perimeter point cloud; the tilt angle corresponding to the abnormal perimeter point cloud is greater than the preset angle threshold.
[0088] In this embodiment of the application, the fitting module 310 can also be specifically used for: Based on the mobile acquisition device, the original point cloud data corresponding to the boundary is determined, and the original point cloud data is denoised and downsampled to obtain the initial point cloud data. Based on the preset boundary centerline, determine the distance between each initial point cloud data and the boundary centerline, and based on the preset distance threshold, determine the target point cloud data whose distance is less than the preset distance threshold. Based on the RANSAC algorithm and the target point cloud data, the initial perimeter point cloud and the initial perimeter surface point cloud are determined.
[0089] In this embodiment of the application, the fitting module 310 can also be specifically used for: Based on the RANSAC algorithm, multiple random point cloud planes corresponding to the target point cloud data are generated, and the distance from each target point cloud data to each random point cloud plane is calculated. Based on a preset planar distance threshold, standard boundary point clouds with distances less than the preset planar distance threshold are determined, and target point cloud planes are determined based on the standard boundary point clouds corresponding to each random point cloud plane; the number of standard boundary point clouds corresponding to the target point cloud plane is the largest. The standard bounding surface point cloud contained in the target point cloud plane is identified as the initial bounding surface point cloud, and other target point cloud data are identified as the initial bounding column point cloud.
[0090] In this embodiment of the application, the fitting module 310 can also be specifically used for: The initial bounding point cloud is divided into multiple local voxels and the local density corresponding to each local voxel, and the target local voxels with local density lower than a preset density threshold are identified. The initial bounding surface point cloud in the target local voxel is determined as the target bounding surface point cloud.
[0091] In this embodiment of the application, the clustering module 330 can also be specifically used for: According to the K-means clustering rule, the initial cylindrical point cloud is clustered to obtain multiple clustered cylindrical point clouds. The circumscribed cube is determined based on the cylindrical length, width and height values corresponding to each clustered cylindrical point cloud. Calculate the ratio of the column length to the column width to obtain the aspect ratio of the circumscribed cube, and determine the target aspect ratio greater than the preset aspect ratio threshold and the target circumscribed cube corresponding to the target aspect ratio based on the preset aspect ratio threshold. The target surrounding column point cloud is determined based on the clustered surrounding column point cloud corresponding to the target circumscribed cube.
[0092] In this embodiment of the application, the clustering module 330 can also be specifically used for: Determine the geometric center of all target perimeter point clouds and the center coordinates of the geometric center. Based on the center coordinates and the point cloud coordinates of each target perimeter point cloud, calculate the difference between each point cloud coordinate and the center coordinates to obtain the corresponding point cloud center coordinates. Based on the PCA algorithm, calculate the covariance matrix corresponding to the center coordinates of all point clouds, and determine the multiple eigenvalues corresponding to the covariance matrix and the eigenvectors corresponding to each eigenvalue. The target feature value with the largest value among the feature values and the feature vector corresponding to the target feature value are identified as the target feature vector, and the vector direction of the target feature vector is identified as the target point cloud direction corresponding to the target cylindrical point cloud. Determine the tilt angle based on the direction of the target point cloud and the direction of gravity.
[0093] In this embodiment of the application, the determining module 340 can also be specifically used for: Based on the mobile acquisition device, determine the boundary coordinate information corresponding to each original point cloud data, and based on the boundary coordinate information, determine the abnormal boundary coordinate information corresponding to the abnormal boundary grid and abnormal boundary column point cloud respectively. Generate boundary detection results based on the abnormal boundary coordinate information.
[0094] Figure 4 This is a schematic diagram of the structure of an apparatus for performing a boundary detection method based on point cloud data according to an embodiment of this application. Figure 4 As shown, the device 400 includes: The device 400 may include a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a communication component 403, and other components. The processor 401, memory 402, and communication component 403 are connected via a bus 404.
[0095] In the specific implementation process, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to execute the above-mentioned boundary detection method based on point cloud data.
[0096] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0097] Furthermore, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0098] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0099] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0100] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the steps in any of the above-described boundary detection methods based on point cloud data.
[0101] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0102] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0103] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of program codes that can be loaded by a processor to execute the steps in any of the point cloud data-based boundary detection methods provided in embodiments of this application.
[0104] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0105] According to one aspect of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium.
[0106] Since the instructions stored in the storage medium can execute the steps of any of the point cloud data-based boundary detection methods provided in the embodiments of this application, the beneficial effects that any of the point cloud data-based boundary detection methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0107] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the appended claims.
[0108] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A boundary detection method based on point cloud data, characterized in that, The method includes: According to the RANSAC algorithm, plane fitting is performed on multiple target point cloud data to obtain the initial surrounding column point cloud and the initial surrounding surface point cloud corresponding to the target point cloud data. Local density analysis is then performed on the initial surrounding surface point cloud to obtain the target surrounding surface point cloud with a local density lower than a preset density threshold. The target surface point cloud is divided into multiple point cloud grids, and abnormal surface grids are determined based on the number of points in each point cloud grid and a preset number threshold; the number of points in the abnormal surface grid is less than the preset number threshold. The initial perimeter point cloud is clustered to obtain multiple target perimeter point clouds, and the tilt angle between each target perimeter point cloud and the gravity vector is determined according to the PCA algorithm. Based on the tilt angles and preset angle thresholds, abnormal perimeter point clouds are determined, and based on the abnormal perimeter grid and the abnormal perimeter point clouds, the boundary detection result corresponding to the target point cloud data is determined; the tilt angle corresponding to the abnormal perimeter point cloud is greater than the preset angle threshold.
2. The method according to claim 1, characterized in that, The step of performing planar fitting on multiple target point cloud data according to the RANSAC algorithm to obtain the initial perimeter point cloud and initial perimeter surface point cloud corresponding to the target point cloud data includes: Based on the mobile acquisition device, the original point cloud data corresponding to the boundary is determined, and the original point cloud data is denoised and downsampled to obtain the initial point cloud data. Based on the preset boundary center line, determine the distance between each initial point cloud data and the boundary center line, and based on the preset distance threshold, determine the target point cloud data whose distance is less than the preset distance threshold. Based on the RANSAC algorithm and the target point cloud data, the initial perimeter point cloud and the initial perimeter surface point cloud are determined.
3. The method according to claim 2, characterized in that, The step of determining the initial perimeter point cloud and the initial perimeter surface point cloud based on the RANSAC algorithm and the target point cloud data includes: According to the RANSAC algorithm, multiple random point cloud planes corresponding to the target point cloud data are generated, and the distance from each target point cloud data to each random point cloud plane is calculated. Based on a preset planar distance threshold, standard surface point clouds with distances less than the preset planar distance threshold are determined, and target point cloud planes are determined based on the standard surface point clouds corresponding to each random point cloud plane; the number of standard surface point clouds corresponding to the target point cloud plane is maximized. The standard perimeter point cloud contained in the target point cloud plane is determined as the initial perimeter point cloud, and the other target point cloud data are determined as the initial perimeter column point cloud.
4. The method according to claim 1, characterized in that, The step of performing local density analysis on the initial surface point cloud to obtain a target surface point cloud with a local density lower than a preset density threshold includes: The initial surface point cloud is divided into multiple local voxels and the local density corresponding to each local voxel, and the target local voxel whose local density is lower than the preset density threshold is determined. The initial surface point cloud in the target local voxel is determined as the target surface point cloud.
5. The method according to claim 1, characterized in that, The initial perimeter point cloud is clustered to obtain multiple target perimeter point clouds, including: According to the K-means clustering rule, the initial perimeter point cloud is clustered to obtain multiple clustered perimeter point clouds, and the circumscribed cube is determined according to the perimeter length, perimeter width and perimeter height values corresponding to each clustered perimeter point cloud. Calculate the ratio of the length value of the surrounding column to the width value of the surrounding column to obtain the aspect ratio of the circumscribed cube, and determine the target aspect ratio greater than the preset aspect ratio threshold and the target circumscribed cube corresponding to the target aspect ratio based on the preset aspect ratio threshold. The target perimeter point cloud is determined based on the clustered perimeter point cloud corresponding to the target circumscribed cube.
6. The method according to claim 1, characterized in that, The step of determining the tilt angle between each target pericyte point cloud and the gravity vector according to the PCA algorithm includes: Determine the geometric center and center coordinates corresponding to all the target surrounding column point clouds, and calculate the difference between each point cloud coordinate and the center coordinate based on the center coordinates and the point cloud coordinates corresponding to each target surrounding column point cloud to obtain the corresponding point cloud center coordinates; According to the PCA algorithm, calculate the covariance matrix corresponding to the center coordinates of all the point clouds, and determine the multiple eigenvalues corresponding to the covariance matrix and the eigenvectors corresponding to each eigenvalue; The target feature value with the largest value among the feature values and the feature vector corresponding to the target feature value are determined as the target feature vector, and the vector direction of the target feature vector is determined as the target point cloud direction corresponding to the target column point cloud; The tilt angle is determined based on the direction of the target point cloud and the direction of gravity.
7. The method according to claim 1, characterized in that, The step of determining the boundary detection result corresponding to the target point cloud data based on the abnormal boundary mesh and the abnormal boundary column point cloud includes: Based on the mobile acquisition device, determine the boundary coordinate information corresponding to each original point cloud data, and based on the boundary coordinate information, determine the abnormal boundary coordinate information corresponding to the abnormal boundary surface grid and the abnormal boundary column point cloud respectively. The boundary detection result is generated based on the abnormal boundary coordinate information.
8. A boundary detection device based on point cloud data, characterized in that, The device includes: The fitting module is used to perform planar fitting on multiple target point cloud data according to the RANSAC algorithm to obtain the initial perimeter point cloud and initial perimeter point cloud corresponding to the target point cloud data, and to perform local density analysis on the initial perimeter point cloud to obtain the target perimeter point cloud with local density lower than a preset density threshold. The segmentation module is used to perform mesh segmentation on the target surface point cloud to obtain multiple point cloud meshes, and to determine abnormal surface meshes based on the number of points in each point cloud mesh and a preset number threshold; the number of points in the abnormal surface mesh is less than the preset number threshold. The clustering module is used to cluster the initial perimeter point cloud to obtain multiple target perimeter point clouds, and to determine the tilt angle between each target perimeter point cloud and the gravity vector according to the PCA algorithm. The determination module is used to determine the abnormal perimeter point cloud based on each tilt angle and a preset angle threshold, and to determine the boundary detection result corresponding to the target point cloud data based on the abnormal perimeter grid and the abnormal perimeter point cloud; the tilt angle corresponding to the abnormal perimeter point cloud is greater than the preset angle threshold.
9. A computer device, characterized in that, include: One or more processors; Memory; One or more programs, wherein the one or more programs are stored in memory and configured to be executed by one or more processors, the one or more programs being configured to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that can be called by a processor to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Transmission tower inclination detection method, device and equipment and storage medium
CN115810012A
Electric power tower inclination angle calculation method based on laser point cloud
CN117213446A
Workpiece pose estimation method and system
CN117274645A
Road pavement construction effect detection system
CN118037727A
Optimized RANSAC point cloud plane fitting method based on DBSCAN clustering
CN118312880A