Point cloud extraction method of target object, computer program product and electronic equipment
By using height thresholding and vector angle filtering combined with positional relationship merging in 3D laser point cloud data, the problem of low accuracy in target feature point cloud extraction was solved, achieving high-precision and universal extraction of target objects in complex environments.
Patent Information
- Application Number
- CN202410975952.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-19
AI Technical Summary
In existing technologies, the accuracy of extracting target features from 3D laser point cloud data is not high and lacks universality. In particular, the extraction of target feature point cloud data in complex environments suffers from false detection or missed detection.
By acquiring regional target point clouds, different parts of the target object's point clouds are filtered out using a preset height threshold and the angle between the principal vector and the normal vector. These points are then merged based on their positional relationships. Combined with clustering and a trained point cloud classification model, the accuracy and universality of point cloud extraction are improved.
It achieves high-precision extraction of point clouds of target objects from complex environments, and is applicable to a variety of objects, especially objects with obvious vertical features, such as streetlights and trees, thus improving the accuracy and wide applicability of point cloud data processing.
Smart Images

Figure CN118982652A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of point cloud data processing, and in particular to a point cloud extraction method for a target object, a computer program product, and an electronic device. Background Art
[0002] At present, with the continuous maturity and popularization of mobile laser scanning (MLS) technology, 3D laser point cloud provides a good data basis for accurately extracting the location of target objects with its high precision and high density. Compared with traditional 2D image data, 3D point cloud has richer geometric and spatial information, and can accurately reflect the 3D shape and external contour of the object. Using laser point cloud data to accurately extract the location of the target object has become one of the current research hotspots. However, due to the complexity of laser point cloud data itself and the presence of various different objects in the environment containing the target object, as well as factors such as mobile vehicle occlusion, dense noise interference, and scanning field of view limitation, the extraction of target object point cloud data still has problems such as low accuracy and lack of universality. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a point cloud extraction method for a target object, a computer program product and an electronic device, so as to achieve the technical effect of improving the accuracy and universality of point cloud extraction of target objects.
[0004] A first aspect of an embodiment of the present application provides a method for extracting a point cloud of a target object, wherein the target object includes a first part and a second part, and the point cloud of the second part is arranged in a vertical direction; the method includes:
[0005] Acquire a regional target point cloud, wherein the regional target point cloud includes a point cloud of the target object;
[0006] According to a preset height threshold, determining a plurality of first candidate point clouds of the first part and a plurality of target point clouds to be screened of the second part from the regional target point cloud;
[0007] Determine a plurality of second candidate point clouds of the second part from a plurality of the target point clouds to be screened based on an angle between a principal vector and a normal vector of each point in the target point cloud to be screened;
[0008] Based on the position relationship, each of the second candidate point clouds is merged with the first candidate point cloud corresponding to the position to obtain the point cloud of the target object.
[0009] In the above implementation process, the point cloud of a specific target object is accurately extracted from a larger range of point cloud data, especially for the case where the target object consists of two parts, and the point cloud of the second part is arranged in the vertical direction. Through the dual screening of height threshold and vector angle, the point cloud of the target object can be more accurately extracted from a complex environment, avoiding the interference of non-target point clouds and improving the extraction accuracy. The above method is not only applicable to objects with obvious vertical features such as street lights and traffic signs, but can also be applied to a variety of objects with specific structural features such as trees and buildings, broadening the application field of point cloud data processing and having high universality.
[0010] Furthermore, before obtaining the regional target point cloud, the method further includes:
[0011] Acquire the initial point cloud of the region, and perform a culling process on the initial point cloud of the region to obtain a culled point cloud; the culling process includes: culling the perigee cloud according to the terrain undulation information carried by the initial point cloud of the region, and / or culling the point cloud that does not meet the preset geometric features based on the grid projection density of the initial point cloud of the region;
[0012] The eliminated point cloud is downsampled and filtered to obtain the regional target point cloud.
[0013] In the above implementation process, irrelevant point clouds in the point cloud data are initially eliminated to optimize the quality of the point cloud data and ensure the effectiveness and accuracy of subsequent processing.
[0014] Further, the determining, according to a preset height threshold, a plurality of first candidate point clouds of the first part and a plurality of target point clouds to be screened of the second part from the regional target point cloud comprises:
[0015] Determine a point cloud in the regional target point cloud that is greater than the preset height threshold as the first candidate point cloud;
[0016] Determine the point cloud with a height smaller than the preset height threshold in the regional target point cloud as the initial point cloud to be screened;
[0017] Determine a plurality of key points from the initial point cloud to be screened;
[0018] Based on each of the key points, a neighboring point search is performed to determine the target point cloud to be screened corresponding to each of the key points; the number of points included in each of the target point clouds to be screened is greater than a preset number threshold.
[0019] In the above implementation process, through the determination of key points and the search for neighboring points, point clouds with specific structural features can be more effectively extracted from complex point cloud data, and the second part of potential target objects can be identified and segmented. Secondly, key point detection and neighboring point search allow the algorithm to focus on key areas in the point cloud instead of processing the entire point cloud, which helps to reduce the consumption of computing resources and processing time, and reduce computational complexity.
[0020] Further, before determining a plurality of second candidate point clouds of the second part from a plurality of target point clouds to be screened based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened, the method further includes:
[0021] For each of the target point clouds to be screened, based on the coordinates of each point in the target point cloud to be screened in each direction dimension, the point cloud is decentralized, and the covariance matrix of the decentralized point cloud is calculated;
[0022] Based on the covariance matrix, determining the principal vector of each point;
[0023] A local plane is constructed for each point, and a normal vector of the local plane is determined to be a normal vector of the corresponding point.
[0024] In the above implementation process, the main vector of the point cloud can be determined more accurately through decentralized processing and covariance matrix calculation, which helps to identify the main structural direction in the point cloud; the construction of the local plane and the determination of the normal vector can improve the calculation accuracy of the normal vector of each point in the point cloud. The accurate main vector and normal vector information make the point cloud segmentation based on the vector angle more accurate, which can effectively distinguish the second part of the target object from other parts or background point clouds.
[0025] Further, the determining of a plurality of second candidate point clouds of the second part from a plurality of target point clouds to be screened based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened comprises:
[0026] For each of the target point clouds to be screened, determining whether the target point cloud to be screened includes target points greater than or equal to a preset ratio; wherein the target points are points whose angles are within a preset angle range;
[0027] If so, determine that the target point cloud to be screened is the second candidate point cloud.
[0028] In the above implementation process, the number of target points in each target point cloud to be screened is counted to determine whether it reaches or exceeds a preset number threshold. This threshold is set to ensure that the screened point cloud fragments do contain sufficient vertical structural features, rather than small-scale aggregations caused by chance or noise.
[0029] Furthermore, based on the position relationship, merging each of the second candidate point clouds with the first candidate point cloud corresponding to the position to obtain the point cloud of the target object includes:
[0030] Based on the positional relationship between the first candidate point cloud and the second candidate point cloud in the vertical direction, each of the second candidate point clouds is merged with the first candidate point cloud corresponding to the position by using clustering to obtain the point cloud of the target object.
[0031] In the above implementation process, through clustering and matching based on positional relationships, the point clouds of different parts of the target object can be accurately reassembled together to construct a complete point cloud of the target object. Even when the point cloud data is dense or there is occlusion, the point cloud merging based on positional relationships can effectively identify and merge different parts of the target object.
[0032] Furthermore, the step of merging each of the second candidate point clouds with the first candidate point cloud corresponding to a position by clustering to obtain the point cloud of the target object includes:
[0033] Merging each of the second candidate point clouds with the first candidate point cloud corresponding to a position by using clustering to obtain a merged point cloud;
[0034] The merged point cloud is input into a trained point cloud classification model to obtain a point cloud of the target object.
[0035] In the above implementation process, the second candidate point cloud is merged with the first candidate point cloud using a clustering algorithm, and the target object point cloud is further optimized and confirmed through the trained point cloud classification model.
[0036] A second aspect of an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.
[0037] According to a third aspect of the present application, an electronic device is provided, the electronic device comprising:
[0038] processor;
[0039] a memory for storing processor-executable instructions;
[0040] Wherein, when the processor calls the executable instruction, any method described in the first aspect is implemented.
[0041] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any of the methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A schematic diagram of a flow chart of a method for extracting a point cloud of a target object provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a flow chart of another method for extracting a point cloud of a target object provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of a flow chart of another method for extracting a point cloud of a target object provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of the difference in angles between different objects provided in an embodiment of the present application;
[0047] Figure 5 A street lamp point cloud extraction flow chart provided in an embodiment of the present application;
[0048] Figure 6 A schematic diagram of ISS key points provided in an embodiment of the present application;
[0049] Figure 7 A schematic diagram of a street light point cloud processing process provided in an embodiment of the present application;
[0050] Figure 8 A hardware structure diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0052] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0053] In the related art, the methods for extracting target object point cloud data are mainly divided into the following categories: (1) Methods based on geometric features: Based on the spatial distribution of the target object, accurate mathematical models are used for feature description and identification. The extraction effect is good in relatively independent and regular target object point clouds, but dense noise and occlusions in the point cloud may lead to false detection or missed detection; (2) Methods based on deep learning: Automatically identify and extract target object point clouds by training neural network models. This type of method has certain stability against noise and occlusion, but requires a large amount of labeled data for training, and has poor generalization ability in different application scenarios; (3) Methods based on template matching: Predefine the template of the target object and search for similar structures in the point cloud through the matching algorithm. This method is intuitive and easy to understand and implement, but it is highly dependent on the template and has poor extraction effect on target object point clouds with variable or irregular shapes. In addition, methods based on clustering and voxels have also been widely developed, but they are not robust in complex environments and have poor extraction effect on different types of target object point clouds. In summary, the target object point cloud extraction method in related technologies has problems such as low accuracy and lack of universality.
[0054] In response to any of the above-mentioned problems, the present application provides a method for extracting a point cloud of a target object. Figure 1 , Figure 1 A schematic flow chart of a method for extracting a point cloud of a target object provided in an embodiment of the present application.
[0055] In this embodiment, the target object includes a first part and a second part, and the point cloud of the second part is arranged in a vertical direction; the method includes:
[0056] Step S10: Acquire a regional point cloud, wherein the regional point cloud includes a point cloud of the target object;
[0057] The execution subject of this embodiment can be a host computer (such as a desktop computer or workstation), or it can be an embedded system, a mobile device, a cloud computing platform, dedicated point cloud processing hardware, a three-dimensional point cloud acquisition device, a robot and an autonomous driving vehicle, an Internet of Things device, and other devices with point cloud data analysis and processing capabilities. This embodiment and the following embodiments will be described using the host computer as an example.
[0058] It should be noted that the target object is a land feature with height, such as a single-head street lamp, a double-head street lamp, other forms of street lamps, different types of trees, different traffic signs, buildings of different appearances, etc. The first part and the second part of the target object are obviously different in shape. For example, the first part is an irregular shape, and the second part is a regular shape along the vertical direction, such as a column. Taking the target object as a street lamp as an example, the lamp head of the street lamp is the first part. Since the lamp head can be designed in a variety of shapes, different street lamps have different first parts. The lamp pole of the street lamp is the second part. In street lamps of different designs, the lamp pole is usually a vertical pole, so different street lamps have the same or similar second parts.
[0059] The first part may refer to a part of the target object that is not dependent on the vertical arrangement, such as the lamp head of a street lamp or the crown of a tree. The point cloud of the second part is arranged in the vertical direction, which means that in three-dimensional space, the point cloud data of the second part has an obvious distribution trend on the Z axis. "Vertical direction" or Z axis refers to the direction perpendicular to the surface of the earth, that is, the direction of gravity, that is, the second part of the target object has a height. The first part is located above the second part, and the first part is located in the positive direction of the Z axis of the second part in three-dimensional space, where the Z axis represents the height direction.
[0060] The regional point cloud may be a point cloud of the surrounding environment including the target object, and the size of the region is set according to actual needs. Taking the target object as a street lamp as an example, the region may be a street including the street lamp, or a city including the street lamp.
[0061] Exemplarily, a three-dimensional scanning device (such as a laser radar LiDAR, a structured light scanner, a depth camera, etc.) is used to scan the entire area to obtain regional point cloud data.
[0062] Step S20: determining a plurality of first candidate point clouds of the first part and a plurality of target point clouds to be screened of the second part from the regional target point cloud according to a preset height threshold;
[0063] It should be noted that one or more height thresholds are set according to the characteristics of the target object. These thresholds are used to distinguish different parts in the point cloud. For example, if the target object is a street lamp 10m above the ground, where the lamp pole is 8m high, the lamp head is 2m high, and the lamp head is above the lamp pole, a height threshold of 8m above the ground can be set. In this way, multiple first candidate point clouds of the first part (i.e., the point clouds above 8m above the ground) and multiple target point clouds to be screened of the second part (i.e., the point clouds below 8m below the ground) are determined from the regional target point cloud.
[0064] The two parts of point clouds in the area where the point cloud distribution is obviously the same object are divided into multiple first candidate point clouds and multiple target point clouds to be screened. Specifically, the distribution pattern of the two parts of point clouds of the same object includes that the X and Y coordinates are roughly the same, and the Z coordinates are quite different. Based on the height information on the Z axis, the multiple point clouds are divided into two parts.
[0065] Optionally, multiple first candidate point clouds corresponding to the first part can also be directly determined based on the point cloud features of the first part of the target object. Exemplarily, taking the first part of the target object as a tree crown as an example, the shape of the crown is often complex, consisting of numerous branches and leaves, presenting an irregular and complex geometric structure, the point cloud of the crown part usually has a high point density, and the point cloud of the crown part has large changes in spatial crown width and height, and the point cloud of the trunk part usually presents a relatively regular cylindrical or conical shape, with a low point cloud density and obvious height features. Based on the above features, multiple first candidate point clouds of the first part can be directly determined from the regional point cloud.
[0066] Step S30: determining a plurality of second candidate point clouds of the second part from a plurality of the target point clouds to be screened based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened;
[0067] It should be noted that the principal vector: In point cloud data, each point can estimate the main direction of its local neighborhood. This direction is usually called the principal vector of the point. The principal vector reflects the extension direction of the point cloud near the point. The principal vector in the point cloud refers to the vector along the main direction or trend of the point cloud. It can be the maximum extension direction of the point cloud or the most significant direction. The principal vector is usually used to describe the directional characteristics of the surface of an object, such as aspect ratio, shape, etc., and is often used to analyze the morphological characteristics of an object, such as identifying the aspect ratio, shape and other information of the object.
[0068] Normal vector: For each point in the point cloud, the normal vector is the direction perpendicular to the local surface of the point, pointing away from the observer. The normal vector can be used to describe the local characteristics of the surface, such as curvature, convexity, roughness, etc.
[0069] In this embodiment and the following embodiments, the target point cloud to be screened represents the second part of the target object arranged in the vertical direction. Therefore, the principal vector of each point in the target point cloud to be screened is generally consistent, and the principal vectors are mostly vertically upward or vertically downward, while the normal vector of each point may be the same or different, and there may even be large differences. The normal vector of each point may point to any direction, such as horizontal direction, vertical direction, etc. Based on this, the direction consistency can be verified according to the angle between the principal vector and the normal vector of each point, so as to quickly and effectively separate non-target object point clouds, cluttered discrete points, etc., thereby determining the second candidate point cloud.
[0070] Calculating the principal vector of each point in the target point cloud to be screened can be achieved by fitting a plane, principal component analysis (PCA), or using functions in a point cloud processing library (such as PCL). This embodiment does not limit the method for calculating the principal vector and the normal vector.
[0071] To calculate the angle between the normal vector and the principal vector at each point, you can use the dot product formula, where the dot product of vectors is equal to the product of the vector lengths multiplied by the cosine of the angle between the two vectors.
[0072] In a specific implementation, multiple second candidate point clouds of the second part are determined by the angle between the two vectors, so that point clouds with specific directional characteristics, such as lamp poles, tree trunks or other structures arranged in a vertical direction, can be screened out from complex point cloud data.
[0073] Step S40: Based on the position relationship, each of the second candidate point clouds is merged with the first candidate point cloud corresponding to the position to obtain the point cloud of the target object.
[0074] It should be noted that the X and Y coordinates of the point clouds of the first part and the second part of the target object are roughly the same, and the Z coordinates are quite different. Correspondingly, the X and Y coordinates of the first candidate point cloud and the second candidate point cloud are also roughly the same, and the Z coordinates are quite different. Based on the height information of the first candidate point cloud and the second candidate point cloud on the Z axis, the first candidate point cloud and the second candidate point cloud are merged to restore the complete point cloud of the target object.
[0075] In the specific implementation, first, ensure that the first candidate point cloud and the second candidate point cloud are in the same coordinate system. If the position of the original point cloud of the target object is changed or rotated during the previous segmentation of the first and second part point clouds of the target object, it is necessary to restore it to its original position first; then, merge the data structures of the first candidate point cloud and the second candidate point cloud together, which is usually a simple array concatenation operation, that is, merging the data arrays of the two point clouds into a larger array, which represents the point cloud of the target object.
[0076] For example, in Python, a library such as numpy or open3d can be used to process point cloud data. For example, numpy is used to merge the first candidate point cloud and the second candidate point cloud to restore the complete point cloud of the target object.
[0077] In this embodiment, a method for extracting and reconstructing a point cloud of a specific target object (having a clear first part and a second part arranged in a vertical direction) from a larger regional point cloud is described. First, regional point cloud data is obtained, and the regional point cloud data contains information of all visible objects including the target object; according to a preset height threshold, the point cloud is divided into two groups, one group represents the first part of the target object (non-vertical feature part), including multiple first candidate point clouds, and the other group represents the second part of the target object (the part with vertical features), including multiple target point clouds to be screened; for the second part of the target point cloud to be screened, based on the angle between the main vector and the normal vector of each point, those point clouds with significant vertical features are screened out to form multiple second candidate point clouds, which more accurately represent the second part of the target object; finally, based on the position relationship, each second candidate point cloud is merged with the first candidate point cloud corresponding to the position to obtain point cloud data representing the complete target object. Through height threshold and vector angle analysis, it is possible to accurately segment various parts of the target object from a complex environment, and maintain high precision even in scenes with dense and cluttered point cloud data. This embodiment is not only suitable for objects with obvious vertical features such as street lights and traffic sign poles, but also for trees, buildings and other objects with identifiable structural features, providing new possibilities for three-dimensional data processing in multiple fields and having high universality.
[0078] On the basis of any of the above embodiments, before acquiring the regional target point cloud, the method further includes:
[0079] Acquire the initial point cloud of the region, and perform a culling process on the initial point cloud of the region to obtain a culled point cloud; the culling process includes: culling the perigee cloud according to the terrain undulation information carried by the initial point cloud of the region, and / or culling the point cloud that does not meet the preset geometric features based on the grid projection density of the initial point cloud of the region;
[0080] It is understandable that by analyzing the height information in the point cloud data, point clouds that are close to the ground or below a certain height threshold are identified and removed. These points are usually related to the ground or low terrain features rather than the target of interest.
[0081] It should be noted that the point cloud data is grid-projected on a two-dimensional plane, and the number of points in each grid (i.e., point cloud density) is calculated. Based on preset geometric features, such as point cloud density distribution, point clouds that may represent noise or do not meet expected characteristics, such as overly dense or sparse areas, are removed.
[0082] The preset geometric features are set according to the geometric features of the target object.
[0083] Specifically, the ground objects in the area are complex and the ground point cloud volume is huge. The Cloth Simulation Filtering (CSF) method can be used to remove ground points first to reduce the computational complexity and improve processing efficiency. At the same time, the ground points can provide extremely accurate terrain elevation information, and the near-ground clouds such as low grass can be quickly removed based on the terrain elevation information. For objects with vertical height but whose geometric features do not meet the preset geometric features, such as buildings, their facade point clouds are identified and removed through grid projection density constraints.
[0084] In addition, in order to minimize the occlusion effect of dynamic and static objects such as moving vehicles and pedestrians on the road, an elevation threshold can be set to remove the point cloud of objects whose height conditions are too different from the target object. For example, if the height of the target object is 8m, an elevation threshold of 1.8m from the ground is set, and all point clouds below the threshold are removed as basic processing units, thereby improving the accuracy of subsequent point cloud extraction of the target object.
[0085] The eliminated point cloud is downsampled and filtered to obtain the regional target point cloud.
[0086] Optionally, the eliminated point cloud is processed using a voxel downsampling method and a radius filtering method to quickly simplify the point cloud volume and eliminate discrete noise points.
[0087] In this embodiment, according to the terrain information carried in the point cloud data, point clouds located near the ground or in low-lying terrain are eliminated to reduce the impact of the ground or non-target objects; by projecting the point cloud onto a two-dimensional grid, analyzing the point cloud density in each grid, and eliminating those point clouds with abnormally high or low point cloud density that do not meet the preset geometric features, noise and outliers are removed; by downsampling, the number of points in the point cloud is reduced to reduce the amount of data, while keeping the geometric features of the point cloud as unchanged as possible to improve the efficiency of subsequent processing, and applying a filtering algorithm to remove noise in the point cloud, smooth the surface of the point cloud, and improve the quality of the point cloud data. Through the elimination process, non-target point clouds such as the ground, vegetation, and moving objects can be removed, noise points can be reduced, and the purity and applicability of the point cloud data can be improved. At the same time, downsampling reduces the total amount of point cloud data, reduces the computational complexity and memory requirements of subsequent processing, and improves the processing speed. The filtering process can smooth the point cloud and remove abnormal points, so that subsequent feature extraction, classification and other algorithms can run more stably and accurately.
[0088] Based on any of the above embodiments, the method of determining a plurality of first candidate point clouds of the first part and a plurality of target point clouds to be screened of the second part from the regional target point cloud according to a preset height threshold comprises: Figure 2 Steps S21 to S24 shown:
[0089] Step S21: determining the point cloud in the regional target point cloud that is greater than the preset height threshold as the first candidate point cloud;
[0090] Specifically, the entire area target point cloud is traversed, and the Z coordinate (height information) of each point is checked. For each point, if its height is greater than the preset height threshold, it is marked as part of the first candidate point cloud. All points with heights greater than the preset threshold are collected and used as a separate data set, namely the first candidate point cloud. The first candidate point cloud now contains all point cloud data above the preset height threshold, which may represent the top structure of the target object, such as the lamp head of a street lamp, the crown of a tree, etc.
[0091] Step S22: determining the point cloud in the target point cloud in the region that is smaller than the preset height threshold as the initial point cloud to be screened;
[0092] Specifically, the entire area target point cloud is traversed, and the Z coordinate (height information) of each point is checked. For each point, if its height is less than the preset height threshold, it is regarded as a point that may belong to the second part of the target object and added to the initial point cloud to be screened. All points whose height is less than the preset threshold are collected and treated as a separate data set, namely the initial point cloud to be screened. This point cloud data set may contain the second part of the target object, but may also contain other low objects.
[0093] Step S23: determining a plurality of key points from the initial point cloud to be screened;
[0094] It should be noted that the selection of key points is usually based on the significant features in the point cloud data, which can be high curvature points, sharp edges, vertices, or any visually or geometrically prominent points. The methods for determining key points include but are not limited to:
[0095] ISS (Intrinsic Shape Signatures, ISS) key point extraction: Calculate geometric features in the local area of the point cloud, and select points with significant geometric changes in the local range as key points; By analyzing the geometric features at different scales, select those points that are stable at different scales as key points.
[0096] Harris Corner Detector: It is suitable for 2D images, but can find similar high curvature areas in 3D point clouds.
[0097] Shi-Tomasi corner detector: Also used for 2D images, but the principle can be extended to key point detection in 3D point clouds.
[0098] SIFT (Scale-Invariant Feature Transform) or SURF (Speeded Up Robust Features): These feature descriptors are very effective in two-dimensional images, and there are also corresponding three-dimensional versions such as SHOT (Signature of Histograms of Orientations) or FPFH (Fast Point Feature Histograms).
[0099] Neighborhood statistics-based method: Calculate the distribution of points in the neighborhood of each point and select points with high contrast or high curvature as key points.
[0100] Step S24: performing a neighboring point search based on each of the key points to determine the target point cloud to be screened corresponding to each of the key points; the number of points included in each of the target point clouds to be screened is greater than a preset number threshold.
[0101] Exemplarily, a search radius or a neighbor number threshold is defined; the search radius refers to searching for neighboring points in a spherical area centered on the key point in space; the neighbor number threshold specifies the number of nearest neighbor points to be found around the key point; for each key point in the point cloud, a neighbor point search is performed, which usually involves calculating the distance between each point in the point cloud and the key point, and selecting those points whose distance is less than a preset search radius or whose ranking is within a preset neighbor number threshold; through the neighbor point search, the set of points around each key point forms a target point cloud to be screened, wherein the number of points in each formed target point cloud to be screened is greater than the preset number threshold, thereby ensuring that each target point cloud to be screened has enough points to represent the local geometric features around the key point, thereby avoiding inaccurate feature description due to the point cloud being too sparse.
[0102] It should be noted that for sparse or medium-density point clouds, the number threshold can be set between 5 and 20 points to ensure that there are at least enough points around each key point for feature analysis; for very dense point clouds, the number threshold can be set between 30 and 100 points, or even higher, to ensure sufficient local feature description. The preset number threshold is flexibly set based on the specific situation of the point cloud and application requirements, and this embodiment does not limit this.
[0103] In the specific implementation, the dimension of the initial point cloud to be screened is first reduced, and a spatial neighborhood is established with each key point as the center. The neighboring points are quickly searched through the kd tree algorithm, and the number of points in the neighborhood is counted. The preset number threshold is set according to the laser scanning point frequency and the size of the target object, and the cylindrical neighborhood range with point density that meets the preset number threshold is reversely projected to obtain three-dimensional point cloud data.
[0104] It should be understood that the size of the spatial neighborhood can be a sphere or cylindrical area with a fixed radius, or a set containing a certain number of nearest neighbor points.
[0105] In this embodiment, from the regional target point cloud, according to the preset height threshold, all point clouds with heights greater than the threshold are screened out. These point clouds may represent the first part of the target object. At the same time, from the regional target point cloud, all point clouds with heights less than the preset height threshold are screened out. These point clouds may contain the second part of the target object and are defined as the initial point cloud to be screened. In the initial point cloud to be screened, a key point detection algorithm (such as Harris corner detection, SIFT, SURF, ISS, etc.) is used to determine multiple key points. For each detected key point, a neighboring point search is performed to determine the point cloud within a certain range around it (such as a fixed radius or a fixed number of nearest neighbor points). These point clouds are defined as target point clouds to be screened. The number of points included in each target point cloud to be screened is greater than the preset number threshold, which helps to ensure that there are enough points around the key point to describe the local geometric features and avoid feature description distortion caused by too few points. The combination of key point detection and neighboring point search makes the algorithm more robust to density changes, noise and occlusion of the point cloud.
[0106] Based on any of the above embodiments, before step S30, the following is also included: Figure 3 Steps S31 to S33 shown:
[0107] Step S31: for each of the target point clouds to be screened, based on the coordinates of each point in the target point cloud to be screened in each direction dimension, the point cloud is decentralized, and the covariance matrix of the decentralized point cloud is calculated;
[0108] Exemplarily, first, calculate the centroid of the target point cloud to be screened. The centroid is the average of all point coordinates in the point cloud, which can be regarded as the geometric center of the point cloud. For each point in the point cloud, subtract the centroid coordinates from its coordinates to obtain the decentralized point coordinates. On the one hand, this can eliminate the average value of the coordinates of each point in the point cloud, making subsequent processing (such as rotation, scaling or PCA) more stable and accurate; on the other hand, it can better retain the relative position distribution information of the point cloud data, reduce the impact of redundant information on the calculation of the principal component, and make the principal component extraction more accurate. After decentralization, the covariance matrix of the point cloud can be calculated, which describes the correlation of each point in the point cloud in various directional dimensions, and can be used to analyze the shape and directional characteristics of the point cloud.
[0109] Step S32: determining the principal vector of each point based on the covariance matrix;
[0110] In a specific implementation, for each of the target point clouds to be screened, the principal vector is extracted by the principal component analysis method, and the steps are as follows:
[0111] First, the point cloud is decentralized, that is, the coordinates of each dimension are subtracted from the mean of the coordinates of that dimension, and then the covariance matrix of the decentralized point cloud is calculated:
[0112]
[0113] In formula (1), C is the covariance matrix of the point cloud, n is the total number of points in the target point cloud to be screened, and x i is the i-th point in the target point cloud to be screened, is the coordinate mean of all points in the target point cloud to be screened, and T is the transpose of the matrix.
[0114] Perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues λ1, λ2, λ3 (λ1>λ2>λ3) and corresponding eigenvectors V1, V2, V3. The eigenvector corresponding to the maximum eigenvalue represents the main direction of the target point cloud to be screened, that is, the principal vector. In this embodiment, the principal vector of each point in the target point cloud to be screened is represented by the principal vector of the target point cloud to be screened.
[0115] Step S33: construct a local plane for each point respectively, and determine the normal vector of the local plane as the normal vector of the corresponding point.
[0116] In a specific implementation, for each point, a neighborhood range with a fixed radius is defined and K nearest neighboring points are searched. This embodiment does not limit K. An example is given with K=10. The local plane P is constructed using the least squares method, and the normal vector of the point is represented by the normal vector of P. The normal vector of P is calculated using the following formula (2):
[0117]
[0118] In formula (2), is the normal vector of plane P, d is the distance from P to the origin of the coordinate system, n is the total number of points in the target point cloud to be screened, x i is the i-th point in the target point cloud to be screened, where the normal vector of P is the eigenvector corresponding to the minimum eigenvalue.
[0119] In this embodiment, for each target point cloud to be screened, a decentralized point cloud is determined, and the covariance matrix of the decentralized point cloud is calculated. The matrix describes the correlation of points in the point cloud in various directional dimensions. The eigenvalues and eigenvectors of the covariance matrix provide the main directional information of the point cloud; according to the eigenvalues and eigenvectors of the covariance matrix, the maximum eigenvector corresponding to the maximum eigenvalue is found as the principal vector; for each point, based on its K nearest neighbor points, a local plane is constructed using the least squares method, and the normal vector on the local plane is determined as the normal vector of the corresponding point. The normal vector describes the surface orientation of the point cloud at this point. The principal vector and normal vector provide local features of the point cloud, which are helpful for subsequent feature description and recognition.
[0120] On the basis of any of the above embodiments, the step of determining a plurality of second candidate point clouds of the second part from a plurality of target point clouds to be screened based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened comprises:
[0121] For each of the target point clouds to be screened, determining whether the target point cloud to be screened includes target points greater than or equal to a preset ratio; wherein the target points are points whose angles are within a preset angle range;
[0122] It should be noted that the preset ratio can be set according to actual needs. The target point cloud to be screened includes target points greater than or equal to the preset ratio, which means that the point cloud contains enough points that meet the angle conditions, and is more likely to be the point cloud of the second part of the target object, which is worthy of further analysis. If the target point is less than the preset ratio, it means that the object represented by the point cloud is similar to the second part of the target object in some aspect. The preset angle interval is set according to the actual situation of the target object. For example, if the target object is a street lamp, the angle between the main vector and the normal vector of each point in the target point cloud to be screened of the second part of the street lamp (i.e., the street lamp pole) should be around 90 degrees. The preset angle interval can be set to 88 degrees-92 degrees, and the preset ratio is 90%. There are point clouds representing street lamp poles, point clouds representing traffic sign poles, and point clouds representing trees in the target point cloud to be screened. By judging how many of the angles between the main vector and the normal vector of each point in the target point cloud to be screened are in the range of 88 degrees-92 degrees, it can be determined whether the corresponding target point cloud to be screened is likely to be the point cloud of the second part of the target object street lamp (street lamp pole). By the following Figure 4It can be seen that the angles between the main vector and the normal vector of the traffic sign pole and the second part of the target object, that is, the street lamp pole, are similar. The street lamp pole and the traffic sign pole cannot be significantly distinguished by the preset proportion of target points. However, due to the side branches extending from the inside to the outside, the trees show a chaotic distribution feature in the cylindrical neighborhood, and the distribution is discrete, which is significantly different from the street lamp pole and the traffic sign pole. The target points included in the target point cloud to be screened of the trees should be less than the preset proportion. The target point cloud to be screened of the trees can be eliminated according to the preset proportion of target points. Figure 4 As shown, Figure 4 A schematic diagram of the difference in angles between different objects provided in an embodiment of the present application, Figure 4 The figure shows the distribution diagrams of the principal vectors and normal vectors of three objects from left to right. Figure a is the distribution diagram of the principal vectors and normal vectors of a street lamp pole, Figure b is the distribution diagram of the principal vectors and normal vectors of a traffic sign pole, and Figure c is the distribution diagram of the principal vectors and normal vectors of a tree. In Figure a, Figure b, and Figure c, the vertical direction represents the direction of the principal vector, and the horizontal direction represents the direction of the normal vector. It is obvious that the angles between the principal vectors and the normal vectors of these three different objects are quite different.
[0123] If so, determine that the target point cloud to be screened is the second candidate point cloud.
[0124] It is understandable that the target point cloud to be screened whose target points are less than a preset ratio is eliminated, and the point cloud that may be the second part of the target object is further screened out, thereby improving the accuracy of the point cloud data.
[0125] In this embodiment, angle interval screening and target point quantity ratio check are performed for each target point cloud to be screened, aiming to further filter non-target point cloud data, reduce redundant data, and improve the efficiency of subsequent processing. Through angle interval screening, the features of specific directions in the point cloud can be highlighted, which is beneficial to subsequent feature extraction and analysis.
[0126] On the basis of any of the above embodiments, the step of merging each of the second candidate point clouds with the first candidate point cloud corresponding to the position based on the position relationship to obtain the point cloud of the target object includes:
[0127] Based on the positional relationship between the first candidate point cloud and the second candidate point cloud in the vertical direction, each of the second candidate point clouds is merged with the first candidate point cloud corresponding to the position by using clustering to obtain the point cloud of the target object.
[0128] It should be noted that the clustering method may adopt hierarchical clustering, K-means clustering, Euclidean clustering or other appropriate clustering algorithms.
[0129] In the specific implementation, the height difference between the first candidate point cloud and the second candidate point cloud is calculated. According to the height difference, the first candidate point cloud and the second candidate point cloud are classified into the same category through a clustering algorithm. For each cluster, the first candidate point cloud and the second candidate point cloud belonging to the same category are merged to obtain the point cloud of the target object.
[0130] In this embodiment, point cloud data from different parts can be integrated and restored into a complete object point cloud through clustering and merging, and the clustering process helps to remove inconsistent or abnormal point cloud data. The final target object point cloud is more accurate and comprehensive, which improves the quality and consistency of the point cloud.
[0131] On the basis of any of the foregoing embodiments, the step of merging each of the second candidate point clouds with the first candidate point cloud corresponding to a position by clustering to obtain the point cloud of the target object includes:
[0132] Merging each of the second candidate point clouds with the first candidate point cloud corresponding to a position by using clustering to obtain a merged point cloud;
[0133] It is understandable that in this embodiment, determining which point clouds should be clustered together based on the positional relationship of the point clouds in the vertical direction involves comparing the points in the point clouds in terms of the Z coordinates. Merging point cloud data into a unified point cloud means merging point cloud data sets, and in addition, duplicate point removal or smoothing can also be performed.
[0134] The merged point cloud is input into a trained point cloud classification model to obtain a point cloud of the target object.
[0135] It should be noted that the trained point cloud classification model can be any one or combination of a variety of machine learning models such as support vector machine (SVM), neural network (such as convolutional neural network CNN, recurrent neural network RNN, etc.), K nearest neighbor (KNN) algorithm, decision tree model, ensemble learning model (such as Adaboost, Bagging, etc.), etc., and can also be any one or combination of models specially used to process 3D point cloud data such as PointNet, PointNet++, DGCNN, etc. This embodiment takes the random forest model as an example to illustrate the trained point cloud classification model.
[0136] Before using the random forest model, it is first trained to better predict the point cloud of the target object. Taking the target object as a street lamp as an example, the training process of the random forest model is as follows:
[0137] (1) Sample set preparation: Prior samples are established for the three-dimensional point cloud within a certain area. In order to obtain the most accurate training data, the characteristic information of the street lamps is marked using manual annotation methods to form training data. Among them, feature information is extracted through point-by-point neighborhoods, and a spherical neighborhood with a fixed radius distance is established with the query point as the center. Eight features are extracted from the neighborhood by the eigenvalues of the normalized covariance matrix to describe whether the point belongs to a street lamp. Table 1 below summarizes these features, among which linearity, flatness, and sphericity are used to identify the spatial distribution attributes of the rod, elevation information is used to filter out discrete points with too large or too small height information, and intensity is used to eliminate objects with too large a difference in reflectivity from the street lamp echo. In addition, the street lamp sample set can be independently expanded according to the actual application scenario to meet the needs of different engineering projects.
[0138] Table 1 Local feature table extracted by point-by-point neighborhood
[0139]
[0140] In the table, λ1, λ2, and λ3 are the three eigenvalues obtained by eigenvalue decomposition of the covariance matrix, where λ1>λ2>λ3, L λ is the linearity, P λ is the flatness, S λ is sphericity, C λ is the curvature change, Z value is the elevation, Z dif is the elevation difference, Z i_max is the highest point of the target object, Z i_min is the lowest point of the target object, A λ is anisotropic, Ref value is the reflection intensity.
[0141] Linearity, flatness, sphericity, curvature change and anisotropy can all be calculated through the eigenvalues of the covariance matrix. Elevation and elevation difference can be directly obtained from the point cloud information. Reflection intensity is an attribute information of the laser echo reflectivity. Linearity characterizes the linear distribution of a point in the point cloud. For example, a street light pole is vertical to the ground, long and straight, and its outer contour shows a significant linear distribution feature. Its linearity value is relatively high, for example, 0.99, but other objects such as tree crowns are scattered and have lower linearity, for example, 0.4. Similarly, flatness characterizes the possibility that the point cloud distribution presents a planar distribution. For example, a street light pole has a large linearity and a small flatness, but if it is a building, the flatness may be large and the linearity may be small. Sphericity: When data points are evenly distributed on a spherical or nearly spherical mass, they show a high sphericity. Curvature change: Curvature change describes the curvature change in the point cloud data. Anisotropy: Anisotropy describes the difference in data distribution in different directions. Data with high anisotropy indicates different properties or distributions in different directions. Elevation and elevation difference, that is, the spatial distribution characteristics of the height of street lights above the ground. These eight features are used to describe the spatial geometric characteristics of the target object (such as a street lamp), and the random forest algorithm is used to learn what kind of point cloud meets these features, thereby extracting the point cloud of the target object. Of course, the random forest model includes but is not limited to these eight features, and can also be 10 features, etc.
[0142] (2) Model training: The extracted features and the marked street lamp point cloud are combined into a training data set, and the category labels are assigned respectively (for example: double-head street lamp-0, single-head street lamp-1, non-street lamp-2, ...). The test set is used to evaluate the model performance, calculate the recall rate and precision rate indicators, and use the confusion matrix to analyze the classification of the model in different categories and perform model scoring to seek the optimal model performance. The test set is used (following the approximately optimal model construction rule, the ratio of the training set to the test set is divided into 6:4 in this embodiment) to verify the classification accuracy. After iterative training, the trained point cloud classification model is finally constructed.
[0143] In this embodiment, the model is used to achieve fine classification of object point clouds, and can distinguish target objects, various forms of target objects of various forms (for example, the target objects are various street lamps of different forms: single-head street lamps, double-head street lamps, etc., and the model can distinguish which form of street lamp each point cloud belongs to), non-target objects, etc., thereby improving the accuracy and efficiency of target object point cloud extraction.
[0144] In addition, this application also provides a point cloud extraction method for street lamps, such as Figure 5 As shown, Figure 5 A street light point cloud extraction flow chart is provided in the embodiment of the present application. The specific implementation process of the street light point cloud extraction method is as follows:
[0145] The first step, such as Figure 5 As shown in the flowchart, the data preprocessing further specifically includes: the urban scene objects are complex and the ground point cloud volume is huge. First, the cloth simulation filtering (CSF) method is used to extract ground points to reduce the calculation complexity and improve the processing efficiency. At the same time, the ground points can provide extremely accurate terrain elevation information, which is helpful for the rapid elimination of near-ground clouds such as low grass. For the building facade point cloud, it is identified and eliminated through the grid projection density constraint. In addition, the voxel downsampling method is used to quickly simplify the point cloud volume, and the radius filtering method is used to eliminate discrete noise points.
[0146] Taking into account the distribution characteristics of street lights, which are usually located on the edges of both sides of the road or in the middle green dividing belt, in order to minimize the occlusion effect of dynamic and static objects such as moving vehicles and pedestrians on the road, a segmentation threshold of 1.8m from the ground can be set, and the point cloud below the segmentation threshold is eliminated as the basic processing unit to improve the accuracy of subsequent street light point cloud extraction.
[0147] According to the height information of the street lamp to be tested, a ground elevation threshold is set, and the street lamp is divided into a potential lamp pole layer and a potential lamp head layer according to this threshold.
[0148] In the second step, the rough extraction of street light point cloud further includes: According to the relevant specifications for road lighting, the overall height of urban street lights is usually higher than the roadside trees and traffic signs on the same side. In addition, the street lights are regularly distributed vertically upward from the ground, with significant pole-shaped characteristics. Therefore, the projection density of the street light point cloud along the elevation direction is significantly higher than that of the adjacent objects. Based on this, in order to quickly identify potential street light pole point clouds from scene point clouds with complex backgrounds, a cylindrical neighborhood search method based on ISS key points is designed. ISS key point extraction: In order to quickly obtain the point cloud position of pole-shaped objects such as street lights, so as to avoid a global search of the entire scene, which is time-consuming and labor-intensive, the ISS algorithm is used to generate representative key points to quickly locate the area where the poles are located. Figure 6 As shown, Figure 6Schematic diagram of ISS key points provided for the embodiment of the present application, in which the red marks are key points. The ISS algorithm can effectively capture the complex details of the three-dimensional geometry of the objects, and the extracted key points are evenly distributed on the rod-shaped parts of various objects, providing a good position basis for the local neighborhood search of the initial rod-shaped point set. By reducing the dimensionality of the point cloud data, a spatial neighborhood is established with each key point as the center, and the neighboring points are quickly searched through the kd tree algorithm to count the number of points in the neighborhood. The spatial neighborhood point count threshold is pre-set according to the laser scanning point frequency and the size of conventional street lamps, and the cylindrical neighborhood range that meets the spatial neighborhood point count threshold is reversely projected to obtain its corresponding three-dimensional point cloud data. After deduplication, multiple key points of the same object are iteratively merged to obtain all potential rod-shaped point sets containing the street lamp pole point cloud, effectively eliminating the interference of other objects.
[0149] The third step is to extract street light point clouds, including: removing invalid point clouds such as street trees and discrete points: the pole-shaped point set obtained only by spatial neighborhood contains a large number of non-target objects such as traffic sign poles and street trees. Street light poles and traffic sign poles are usually man-made objects with relatively regular outer contours, but the point cloud of naturally grown street trees shows the special characteristics of vertical trunks at the bottom and clustered crowns at the top. In order to quickly filter out the influence of street trees, the pole-shaped point set is verified based on the angle between the main vector and the normal vector:
[0150] ① For each set of potential rod-shaped points, the principal vector is extracted by principal component analysis. The algorithm steps are as follows:
[0151] First, the point cloud is decentralized, that is, the coordinates of each dimension are subtracted from the mean value of the coordinates of that dimension. Refer to the above formula (1). The covariance matrix of the decentralized point cloud is calculated by the above formula (1):
[0152]
[0153] In formula (1), C is the covariance matrix of the point cloud, n is the total number of points in the rod point set, and x i is the i-th point in the rod-shaped point set, is the coordinate mean of all points in the rod-shaped point set, and T is the transpose of the matrix.
[0154] Perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues λ1, λ2, λ3 (λ1>λ2>λ3) and corresponding eigenvectors V1, V2, V3. The eigenvector corresponding to the maximum eigenvalue represents the main direction of the data set, that is, the principal vector.
[0155] ② For each point in the rod-shaped point set, define a neighborhood range with a fixed radius and search for K nearest points. Use the least squares method to construct a local plane P, and use the normal vector of P to represent the normal vector of each point in the rod-shaped point set. Refer to the above formula (2). The normal vector of P is calculated by the above formula (2):
[0156]
[0157] In formula (2), is the normal vector of plane P, d is the distance from P to the origin of the coordinate system, n is the total number of points in the rod-shaped point set, x i is the i-th point in the rod-shaped point set, where the normal vector of P is the eigenvector corresponding to the minimum eigenvalue.
[0158] ③See Figure 4 , as mentioned above Figure 4 As shown in the figure, the side branches extending from the inside to the outside along the main trunk of the roadside trees show a chaotic distribution feature in the cylindrical neighborhood, which is significantly different from regular man-made objects (such as street lights and traffic poles). Specifically, the main vector direction of the rod-shaped point set is mainly in the elevation direction (upward or downward vertically to the ground), among which the normal vector direction of the street light point cloud is mainly perpendicular to the local surface of the lamp pole (approaching 90°); but the normal vector distribution of the street tree point cloud is discrete in non-trunk positions. Based on this, according to the difference in spatial angles between the main vectors and normal vectors of different objects, the direction consistency of the rod-shaped point set is verified to quickly and effectively separate non-target point sets such as roadside trees and discrete points, laying a good foundation for accurate classification of the random forest algorithm model. The calculation formula is as follows:
[0159]
[0160] In formula (3), v and are the principal vector and normal vector of each point respectively, and θ is the angle between the principal vector and the normal vector.
[0161] The fourth step, random forest precise classification further includes: there are many types of street lights in urban scenes, and they have different morphological structures, but within a certain area, the types of street lights are basically unified, evenly distributed and highly repeatable. And unlike other landforms, artificial street lights present unique contour detail features such as extension, curvature, height, etc., which help to achieve accurate discrimination of street light point clouds. Random forest is one of the best supervised learning classification algorithms. It learns from the classification label data set, integrates multiple attribute features into a high-precision model detector, and uses the random forest algorithm to accurately extract street lights. By integrating multiple decision trees independently trained on the pre-classified samples of the training set into an instantiated model, the potential street light point set is verified in the prediction to obtain more accurate street light classification results. The specific steps are as follows:
[0162] (1) Sample set preparation: A priori samples are established for the three-dimensional point cloud in a certain area. In order to obtain the most accurate training data, the characteristic information of the street lamp is marked using the manual labeling method to form the training data. Among them, the characteristic information is extracted by point-by-point neighborhood, and a spherical neighborhood with a fixed radius distance is established with the query point as the center. Eight features are extracted from the neighborhood by the eigenvalue of the normalized covariance matrix to describe whether the point belongs to a street lamp. See Table 1 above, which summarizes these features.
[0163] (2) Model training: The extracted features and the labeled street lamp point cloud are combined into a training dataset, and the category labels are assigned respectively (for example: double-head street lamp-0, single-head street lamp-1, non-street lamp-2, ...). The test set is used to evaluate the model performance, calculate the recall rate and precision rate indicators, and use the confusion matrix to analyze the classification of the model in different categories and perform model scoring to seek the optimal model performance. The test set is used (following the approximately optimal model construction rule, the ratio of the training set to the test set is divided into 6:4) to verify the classification accuracy. After iterative training, the random forest model is finally constructed.
[0164] (3) Model classification: The candidate pole point cloud is merged with the lamp head layer point cloud through the Euclidean clustering method to restore the complete information of the potential street lamp point cloud, and the trained random forest model is used for fine classification.
[0165] like Figure 7 As shown, Figure 7 A schematic diagram of a street lamp point cloud processing process provided in an embodiment of the present application, in which (a) is an original point cloud of an area including street lamps; (b) is a point cloud processed using cloth simulation filtering (Cloth (cd) show the results of ground filtering using the ISS key point extraction and cylindrical neighborhood search process and results. It can be seen that the pole-shaped street lamp poles in the pole-shaped point set have been effectively preliminarily identified, among which (c) is the result of straight-through filtering based on the ground elevation, which effectively retains the pole-shaped part of the ground object and eliminates the interference of complex ground objects such as vehicles, pedestrians and isolation barriers; (e) is the result of the angle constraint between the principal vector and the normal vector, and the irregular street tree and other discrete point sets are accurately eliminated; (f) is the clustering result of the potential street lamp pole layer and lamp head layer; (gh) shows the process and results of the accurate classification of the random forest model. It can be seen that the street lamp point cloud is accurately extracted, among which (g) shows the result of the accurate classification of the random forest model, and (h) shows the extraction result of the street lamp, which is marked in red.
[0166] The street lamp point cloud extraction method provided in this embodiment establishes a cylindrical space neighborhood through ISS key points, uses density threshold discrimination and reverse projection to obtain a potential rod-shaped object point set; then, non-target rod-shaped objects such as roadside trees are quickly eliminated through PCA principal vector and normal vector direction and angle constraints to obtain a candidate street lamp point set; finally, based on the spatial geometric characteristics of the street lamp point cloud, a high-fit classification criterion is established through a random forest model, and the rod-shaped point set is matched and selected with the model to further eliminate similar objects such as traffic sign poles. This method can quickly and effectively realize the precise extraction of street lamps, and has good universality for different types of street lamp point clouds.
[0167] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0168] Based on the method described in any of the above embodiments, the present application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0169] Based on the method described in any of the above embodiments, the present application also provides Figure 8 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 8 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the method described in any of the above embodiments.
[0170] The present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the method described in any of the above embodiments.
[0171] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0172] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0173] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0174] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0176] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A point cloud extraction method for a target object, characterized in that: The target object includes a first part and a second part, and the point cloud of the second part is arranged in a vertical direction; the method includes: Acquire a regional target point cloud, wherein the regional target point cloud includes a point cloud of the target object; According to a preset height threshold, determining a plurality of first candidate point clouds of the first part and a plurality of target point clouds to be screened of the second part from the regional target point cloud; Determine a plurality of second candidate point clouds of the second part from a plurality of the target point clouds to be screened based on an angle between a principal vector and a normal vector of each point in the target point cloud to be screened; Based on the position relationship, each of the second candidate point clouds is merged with the first candidate point cloud corresponding to the position to obtain the point cloud of the target object.
2. The method according to claim 1, characterized in that Before obtaining the regional target point cloud, the method further includes: Acquire the initial point cloud of the region, and perform a culling process on the initial point cloud of the region to obtain a culled point cloud; the culling process includes: culling the perigee cloud according to the terrain undulation information carried by the initial point cloud of the region, and / or culling the point cloud that does not meet the preset geometric features based on the grid projection density of the initial point cloud of the region; The eliminated point cloud is downsampled and filtered to obtain the regional target point cloud.
3. The method according to claim 1, characterized in that The step of determining a plurality of first candidate point clouds of the first part and a plurality of target point clouds to be screened of the second part from the regional target point cloud according to a preset height threshold comprises: Determine a point cloud in the regional target point cloud that is greater than the preset height threshold as the first candidate point cloud; Determine the point cloud with a height smaller than the preset height threshold in the regional target point cloud as the initial point cloud to be screened; Determine a plurality of key points from the initial point cloud to be screened; Based on each of the key points, a neighboring point search is performed to determine the target point cloud to be screened corresponding to each of the key points; the number of points included in each of the target point clouds to be screened is greater than a preset number threshold.
4. The method according to claim 1, characterized in that Before determining a plurality of second candidate point clouds of the second part from a plurality of target point clouds to be screened based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened, the method further includes: For each of the target point clouds to be screened, based on the coordinates of each point in the target point cloud to be screened in each direction dimension, the point cloud is decentralized, and the covariance matrix of the decentralized point cloud is calculated; Based on the covariance matrix, determining the principal vector of each point; A local plane is constructed for each point, and a normal vector of the local plane is determined to be a normal vector of the corresponding point.
5. The method according to claim 1, characterized in that The step of determining a plurality of second candidate point clouds of the second part from a plurality of target point clouds to be screened based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened comprises: For each of the target point clouds to be screened, determining whether the target point cloud to be screened includes target points greater than or equal to a preset ratio; wherein the target points are points whose angles are within a preset angle range; If so, determine that the target point cloud to be screened is the second candidate point cloud.
6. The method according to claim 1, characterized in that The step of merging each of the second candidate point clouds with the first candidate point cloud corresponding to the position based on the position relationship to obtain the point cloud of the target object includes: Based on the positional relationship between the first candidate point cloud and the second candidate point cloud in the vertical direction, each of the second candidate point clouds is merged with the first candidate point cloud corresponding to the position by using clustering to obtain the point cloud of the target object.
7. The method according to claim 6, characterized in that The step of merging each of the second candidate point clouds with the first candidate point cloud corresponding to a position by clustering to obtain the point cloud of the target object includes: Merging each of the second candidate point clouds with the first candidate point cloud corresponding to a position by using clustering to obtain a merged point cloud; The merged point cloud is input into a trained point cloud classification model to obtain a point cloud of the target object.
8. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instructions, the operation of any method described in claims 1-7 is implemented.
10. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of any method described in claims 1-7 are implemented.
Citation Information
Patent Citations
Tree trunk point cloud extraction method based on tangent plane segmentation
CN107063114A
Automatic calculation method of tree breast diameter based on voxel growth and ground laser point cloud
CN109002418A
Fractal dimension supervised learning-based foundation LiDAR branch and leaf point cloud separation method
CN111507194A
Point cloud single tree segmentation method and device, equipment and computer readable medium
CN111598915A
Single tree parameter extraction method and system under complex forest stand, medium and equipment
CN111814666A
Cited By
Method and system for simulating line flight based on radar laser point cloud distance measurement
CN120469455A
Map dynamic construction method and system fused with laser vision
CN120506938A
Method, system and device for automatically extracting point cloud feature line and medium
CN120526160A
Continuous automatic cutting processing method for long-strip-shaped point cloud data section
CN120823353A
Video and laser point cloud fusion processing method
CN121169708A
