A point cloud extraction method of a target object, a computer program product and an electronic device

By setting a height threshold and filtering the angle between the principal vectors, and combining point clouds with positional relationships, the problem of low accuracy and insufficient universality of 3D laser point cloud data extraction in existing technologies is solved, and high-precision segmentation and recognition of target objects are achieved.

CN118982652BActive Publication Date: 2026-01-06CAPITAL NORMAL UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410975952.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2026-01-06
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

In existing technologies, target object extraction methods for 3D laser point cloud data suffer from low accuracy and lack of universality. In particular, it is difficult to accurately extract objects with vertical features, such as streetlights, trees, and buildings, in complex environments.

Method used

By setting a height threshold and filtering based on the angle between the principal vector and the normal vector, and combining point clouds with positional relationships, a clustering algorithm and a point cloud classification model are used to extract the point cloud of the target object.

Benefits of technology

It improves the accuracy and versatility of point cloud extraction for target objects, can accurately segment objects with vertical features in complex environments, is applicable to a variety of target objects, and reduces computational complexity and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982652B_ABST
    Figure CN118982652B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a point cloud extraction method of a target object, a computer program product and an electronic device. The method comprises: obtaining a region target point cloud, the region target point cloud comprising a point cloud of the target object; determining, according to a preset height threshold, a plurality of first candidate point clouds of the first part and a plurality of to-be-screened target point clouds of the second part from the region target point cloud; determining, from the plurality of to-be-screened target point clouds, a plurality of second candidate point clouds of the second part based on an included angle between a principal vector and a normal vector of each point in the to-be-screened target point cloud; and merging each second candidate point cloud with a first candidate point cloud corresponding in position to obtain a point cloud of the target object. Through the screening of the height threshold, the vector included angle and the classification model, the accuracy and the universality of the target object point cloud extraction are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of point cloud data processing, in particular to a point cloud extraction method of a target object, a computer program product and an electronic device. BACKGROUND

[0002] At present, with the continuous maturity and popularity of mobile laser scanning (MLS) technology, three-dimensional laser point cloud provides a good data basis for accurately extracting the position of the target ground object due to its high precision and high density. Compared with traditional two-dimensional image data, three-dimensional point cloud has more abundant geometric and spatial information, which can accurately reflect the three-dimensional form and external contour of the ground object. Accurately extracting the position of the target ground object using laser point cloud data has become one of the current research hotspots. However, due to the complexity of laser point cloud data itself and the existence of various different ground objects in the environment containing the target ground object, and factors such as mobile vehicle shielding, dense noise interference, scanning field angle limitation and the like will affect the extraction of the target ground object point cloud data, and the target ground object point cloud extraction method still has problems such as low precision and lack of universality. SUMMARY

[0003] The purpose of the embodiments of the present application is to provide a point cloud extraction method of a target object, a computer program product and an electronic device, so as to realize the technical effect of improving the precision and universality of target ground object point cloud extraction.

[0004] The first aspect of the embodiments of the present application provides a point cloud extraction method of a target object, the target object comprising a first part and a second part, and the point cloud of the second part is arranged along the vertical direction; the method comprises:

[0005] Obtaining a regional target point cloud, the regional target point cloud comprising the point cloud of the target object;

[0006] According to a preset height threshold, a plurality of first candidate point clouds of the first part and a plurality of to-be-screened target point clouds of the second part are determined from the regional target point cloud;

[0007] Based on the included angle between the principal vector and the normal vector of each point in the to-be-screened target point cloud, a plurality of second candidate point clouds of the second part are determined from the plurality of to-be-screened target point clouds;

[0008] Based on the position relationship, each second candidate point cloud is merged with the first candidate point cloud corresponding in 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 large-scale point cloud dataset, especially for cases where the target object consists of two parts, with the second part's point cloud arranged vertically. By employing dual filtering based on height thresholds and vector angles, the point cloud of the target object can be extracted more accurately from complex environments, avoiding interference from non-target point clouds and improving extraction precision. Furthermore, this method is not only applicable to objects with obvious vertical features, such as streetlights and traffic signs, but can also be applied to various objects with specific structural features, such as trees and buildings, broadening the application scope of point cloud data processing and demonstrating high versatility.

[0010] Furthermore, prior to acquiring the target point cloud of the region, the method further includes:

[0011] The initial point cloud of the region is obtained, and the initial point cloud of the region is culled to obtain the culled point cloud; the culling process includes: culling near-point clouds based on the terrain undulation information carried by the initial point cloud of the region, and / or culling point clouds that do not conform to the preset geometric features based on the grid projection density of the initial point cloud of the region.

[0012] The removed point cloud is downsampled and filtered to obtain the target point cloud of the region.

[0013] In the above implementation process, irrelevant point clouds in the point cloud data are initially removed, the quality of the point cloud data is optimized, and the effectiveness and accuracy of subsequent processing are ensured.

[0014] Further, determining, according to a preset height threshold, multiple first candidate point clouds of the first part and multiple target point clouds of the second part from the target point cloud of the region includes:

[0015] The point cloud in the target point cloud of the region that is greater than the preset height threshold is identified as the first candidate point cloud;

[0016] The point clouds in the target point cloud of the region that are smaller than the preset height threshold are identified as the initial point clouds to be screened.

[0017] Multiple key points are identified from the initial point cloud to be screened;

[0018] Based on each key point, a neighbor search is performed to determine the target point cloud to be filtered corresponding to each key point; the number of points included in each target point cloud to be filtered is greater than a preset number threshold.

[0019] In the above implementation process, by determining key points and searching for neighboring points, point clouds with specific structural features can be extracted more effectively 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 regions in the point cloud rather than processing the entire point cloud, which helps to reduce the consumption of computing resources and processing time, and reduce computational complexity.

[0020] Furthermore, before determining the second portion of multiple second candidate point clouds from multiple target point clouds 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, the point cloud is decentralized based on the coordinates of each point in each directional dimension, and the covariance matrix of the decentralized point cloud is calculated.

[0022] Based on the covariance matrix, determine the principal vector of each point;

[0023] For each point, a local plane is constructed, and the normal vector of the local plane is determined to be the normal vector of the corresponding point.

[0024] In the above implementation process, the principal vector of the point cloud can be determined more accurately through decentralization and covariance matrix calculation, which helps to identify the main structural orientation in the point cloud. The construction of local planes and the determination of normal vectors can improve the calculation accuracy of the normal vector of each point in the point cloud. Accurate principal vector and normal vector information makes point cloud segmentation based on vector angle more precise and can effectively distinguish the second part of the target object from other parts or background point clouds.

[0025] Further, determining multiple second candidate point clouds of the second part from multiple target point clouds based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened includes:

[0026] For each of the target point clouds to be filtered, determine whether the target point cloud to be filtered includes target points greater than or equal to a preset proportion; wherein, the target point is a point whose included angle is within a preset angle range;

[0027] If so, the target point cloud to be screened is determined as 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 has reached or exceeded a preset threshold. This threshold is set to ensure that the screened point cloud segments do indeed contain sufficient vertical structural features, rather than small-scale clusters caused by chance or noise.

[0029] Further, the step of merging each second candidate point cloud with the first candidate point cloud corresponding to its position based on positional relationship to obtain the point cloud of the target object includes:

[0030] Based on the vertical positional relationship between the first candidate point cloud and the second candidate point cloud, clustering is used to merge each second candidate point cloud with the corresponding first candidate point cloud to obtain the point cloud of the target object.

[0031] In the above implementation process, by clustering and matching based on positional relationships, the point clouds of different parts of the target object can be accurately recombined to construct a complete point cloud of the target object. Even when the point cloud data is dense or there is occlusion, point cloud merging based on positional relationships can effectively identify and merge the different parts of the target object.

[0032] Further, the step of merging each second candidate point cloud with the first candidate point cloud corresponding to its location using clustering to obtain the point cloud of the target object includes:

[0033] Clustering is used to merge each second candidate point cloud with the first candidate point cloud corresponding to the location to obtain the merged point cloud;

[0034] The merged point cloud is input into a trained point cloud classification model to obtain the point cloud of the target object.

[0035] In the above implementation process, a clustering algorithm is used to merge the second candidate point cloud with the first candidate point cloud, and the target object point cloud is further optimized and confirmed by a trained point cloud classification model.

[0036] A second aspect of this application provides a computer program product, the computer program product including a computer program, which, when executed by a processor, implements any of the methods described in the first aspect.

[0037] A third aspect of this application provides an electronic device, the electronic device comprising:

[0038] processor;

[0039] Memory used to store processor-executable instructions;

[0040] Wherein, when the processor invokes the executable instructions, it implements any of the methods described in the first aspect.

[0041] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement any of the methods described in the first aspect. Attached Figure Description

[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating a point cloud extraction method for a target object provided in an embodiment of this application;

[0044] Figure 2 A flowchart illustrating another point cloud extraction method for a target object provided in an embodiment of this application;

[0045] Figure 3 A flowchart illustrating another point cloud extraction method for a target object provided in an embodiment of this application;

[0046] Figure 4 A schematic diagram illustrating the angle differences between different objects provided in an embodiment of this application;

[0047] Figure 5 A flowchart for street light point cloud extraction is provided as an embodiment of this application;

[0048] Figure 6 A schematic diagram of key points of the ISS provided in the embodiments of this application;

[0049] Figure 7 A schematic diagram of a street light point cloud processing process provided in an embodiment of this application;

[0050] Figure 8 This is a hardware structure diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0052] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0053] In related technologies, the methods for extracting target feature point cloud data are mainly divided into the following categories: (1) Geometric feature-based methods: Based on the spatial distribution pattern of the target features, a precise mathematical model is used for feature description and recognition. The extraction effect is good in relatively independent and regular target feature point clouds, but dense noise and occlusion in the point cloud may lead to false detection or missed detection; (2) Deep learning-based methods: By training a neural network model, the target feature point cloud is automatically identified and extracted. This type of method has a certain stability against noise and occlusion, but requires a large amount of labeled data for training, and its generalization ability is not strong in different application scenarios; (3) Template matching-based methods: By predefining the template of the target feature, a matching algorithm is used to search for similar structures in the point cloud. This method is intuitive and easy to implement, but it is highly dependent on the template and has a poor extraction effect for target feature point clouds with varied or irregular shapes. In addition, clustering, voxel and other methods have also been widely developed, but they are not robust to complex environments and have poor extraction effects for different types of target feature point clouds. In summary, the target feature point cloud extraction methods in related technologies suffer from problems such as low accuracy and lack of universality.

[0054] To address any of the problems mentioned above, embodiments of this application provide a method for point cloud extraction of a target object, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a point cloud extraction method for a target object provided in an embodiment of this application.

[0055] In this embodiment, the target object includes a first part and a second part, wherein the point cloud of the second part is arranged along a vertical direction; the method includes:

[0056] Step S10: Obtain the region point cloud, wherein the region point cloud includes the 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, mobile device, cloud computing platform, dedicated point cloud processing hardware, 3D point cloud acquisition device, robot and autonomous vehicle, Internet of Things device, or other device with point cloud data analysis and processing capabilities. This embodiment and the following embodiments will be described using a host computer as an example.

[0058] It should be noted that the target object is a ground feature with height, such as single-headed streetlights, double-headed streetlights, other types of streetlights, different kinds of trees, different traffic signs, buildings with different appearances, etc. The first and second parts of the target object are clearly different in shape. For example, the first part may be an irregular shape, while the second part may be a regular shape along the vertical direction, such as a column. Taking a streetlight as an example, the lamp head is the first part. Since the lamp head can be designed in various shapes, different streetlights will have different shapes for their first parts. The lamp pole is the second part. In different streetlight designs, the lamp pole is usually a vertical pole, so different streetlights will have the same or similar shapes for their second parts.

[0059] The first part can refer to the portion of the target object that is not dependent on the vertical orientation, such as the lamp head of a street lamp or the crown of a tree. The fact that the point cloud of the second part is arranged vertically means that, in three-dimensional space, the point cloud data of the second part has a clear distribution trend along the Z-axis. "Vertical orientation" or the Z-axis refers to the direction perpendicular to the Earth's surface, which is the direction of gravity; that is, the second part of the target object has height. The first part is located above the second part, and in three-dimensional space, the first part lies along the positive Z-axis of the second part, where the Z-axis represents the height direction.

[0060] The region point cloud can be the point cloud of the surrounding environment, including the target object, and the size of the region can be set according to actual needs. Taking a street lamp as an example, the region can be a street including the street lamp, or it can be a city including the street lamp.

[0061] For example, a 3D scanning device (such as LiDAR, structured light scanner, depth camera, etc.) is used to scan the entire area to obtain regional point cloud data.

[0062] Step S20: According to a preset height threshold, determine multiple first candidate point clouds of the first part and multiple target point clouds to be screened of the second part from the target point cloud of the region;

[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 of the point cloud. Taking a street lamp 10m above the ground as an example, with the lamp post 8m high and the lamp head 2m high, and the lamp head above the lamp post, a height threshold of 8m above the ground can be set. In this way, multiple first candidate point clouds (i.e., the part of the point cloud above 8m above the ground) and multiple target point clouds to be screened (i.e., the part of the point cloud below 8m above the ground) can be determined from the regional target point cloud.

[0064] The point cloud distribution in the region is clearly divided into two parts of the same object into multiple first candidate point clouds and multiple target point clouds to be screened. Specifically, the distribution pattern of the two parts of the point cloud of the same object includes that the X and Y coordinates are roughly the same, while the Z coordinates are significantly 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 be directly determined based on the point cloud features of the first part of the target object. For example, taking the crown of a tree as the first part of the target object, the shape of the crown is often quite complex, composed of numerous branches and leaves, presenting an irregular and complex geometric structure. The point cloud of the crown usually has a high point density, and the point cloud of the crown will have large variations in spatial crown width and height. The point cloud of the trunk usually presents a relatively regular cylindrical or conical shape, with a lower point density and obvious height features. Based on the above characteristics, multiple first candidate point clouds of the first part can be directly determined from the regional point cloud.

[0066] Step S30: Based on the angle between the principal vector and the normal vector of each point in the target point cloud to be screened, determine a plurality of second candidate point clouds of the second part from the plurality of target point clouds to be screened;

[0067] It's important to note that the principal vector in point cloud data refers to the vector along the main direction or trend of the point cloud. This direction can be estimated for each point in its local neighborhood, and is often called the principal vector. The principal vector reflects the direction of extension of the point cloud in the vicinity of that point. In point cloud data, the principal vector is the vector along the main direction or trend of the point cloud; it can be the maximum extension direction or the most salient direction. Principal vectors are commonly used to describe the directional features of an object's surface, such as aspect ratio and shape, and are frequently used to analyze the morphological features of objects, such as identifying their aspect ratio and shape.

[0068] Normal vector: For each point in a point cloud, the normal vector is the direction perpendicular to the local surface of that point, pointing away from the observer. Normal vectors can be used to describe local surface properties such as curvature, concavity / convexity, and roughness.

[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 vector is mostly vertically upward or vertically downward. However, the normal vector of each point can be the same or different, and there may even be a large difference. The normal vector of each point can point in any direction, such as the horizontal direction, the 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 the non-target object point cloud, the randomly distributed discrete points, etc., and thus determine the second candidate point cloud.

[0070] The principal vector of each point in the target point cloud to be screened can be calculated 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 normal vector.

[0071] To calculate the angle between the normal vector and the principal vector at each point, we can use the dot product formula, where the dot product of vectors equals the product of their lengths multiplied by the cosine of the angle between the two vectors.

[0072] In the specific implementation, multiple second candidate point clouds of the second part are determined by the angle between two vectors, which realizes the filtering of point clouds with specific directional features from complex point cloud data, such as street lamp poles, tree trunks or other structures arranged in the vertical direction.

[0073] Step S40: Based on the positional relationship, merge each second candidate point cloud 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 cloud of the first part and the second part of the target object are roughly the same, while the Z coordinates are significantly different. Correspondingly, the X and Y coordinates of the first candidate point cloud and the second candidate point cloud are also roughly the same, while the Z coordinates are significantly 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, firstly, 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 has been changed or rotated during the previous segmentation of the first and second part of the point cloud, it needs to be restored to the original position first. Then, merge the data structures of the first candidate point cloud and the second candidate point cloud together. This is usually a simple array concatenation operation, that is, merge 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, libraries such as numpy or open3d can be used to process point cloud data. For instance, numpy can be used to merge the first candidate point cloud with the second candidate point cloud to reconstruct the complete point cloud of the target object.

[0077] This embodiment describes a method for extracting and reconstructing point clouds of a specific target object (having a clearly defined first part and a second part arranged vertically) from a large area point cloud. First, area point cloud data is acquired, containing information about all visible objects, including the target object. Based on 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), containing multiple first candidate point clouds; the other group represents the second part of the target object (the part with vertical features), containing multiple target point clouds to be selected. For the second part of the target point clouds to be selected, based on the angle between the principal vector and the normal vector of each point, point clouds with significant vertical features are selected to form multiple second candidate point clouds, which more accurately represent the second part of the target object. Finally, based on positional relationships, each second candidate point cloud is merged with the corresponding first candidate point cloud to obtain point cloud data representing the complete target object. By analyzing height thresholds and vector angles, it is possible to accurately segment various parts of a target object from a complex environment. Even in scenarios with dense and messy point cloud data, it can maintain high accuracy. Moreover, this embodiment is not only applicable to objects with obvious vertical features such as streetlights and traffic sign poles, but also to trees, buildings and other objects with identifiable structural features. It provides new possibilities for 3D data processing in multiple fields and has high versatility.

[0078] Based on any of the above embodiments, before acquiring the regional target point cloud, the method further includes:

[0079] The initial point cloud of the region is obtained, and the initial point cloud of the region is culled to obtain the culled point cloud; the culling process includes: culling near-point clouds based on the terrain undulation information carried by the initial point cloud of the region, and / or culling point clouds that do not conform to the preset geometric features based on the grid projection density of the initial point cloud of the region.

[0080] Understandably, by analyzing the height information in point cloud data, we can identify and remove those point clouds that are close to the ground or below a certain height threshold. These points are usually related to the ground or low terrain features, rather than the target object of interest.

[0081] It should be noted that the point cloud data is projected onto a two-dimensional plane using a grid, and the number of points within 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 conform to expected characteristics, such as overly dense or overly sparse areas, are removed.

[0082] The preset geometric features are set according to the geometric features of the target object.

[0083] Specifically, given the complex terrain features and massive ground point cloud volume in the region, Cloth Simulation Filtering (CSF) can be used to remove ground points first, reducing computational complexity and improving processing efficiency. Simultaneously, ground points provide highly accurate terrain undulation and elevation information, enabling rapid removal of near-field point clouds such as low-lying grasslands. For objects with vertical height but whose geometric features completely contradict preset geometric characteristics, such as buildings, their facade point clouds are identified and removed using grid projection density constraints.

[0084] In addition, to minimize the occlusion caused by moving vehicles, pedestrians, and other static or dynamic objects on the road, an elevation threshold can be set to remove point clouds containing objects whose height differs significantly from the target object. For example, if the target object is 8m high, an elevation threshold of 1.8m above the ground can be set, and point clouds below this threshold can be completely removed as basic processing units, thereby improving the accuracy of subsequent target object point cloud extraction.

[0085] The removed point cloud is downsampled and filtered to obtain the target point cloud of the region.

[0086] Optionally, voxel downsampling and radius filtering methods can be used to process the removed point cloud to quickly reduce the point cloud volume and eliminate discrete noise.

[0087] In this embodiment, based on the terrain information carried in the point cloud data, point clouds located near the ground or in low-lying areas are removed to reduce the influence of the ground or non-target objects. By projecting the point cloud onto a two-dimensional grid, the point cloud density within each grid is analyzed, and point clouds with abnormally high or low density or that do not conform to preset geometric features are removed to eliminate noise and outliers. Downsampling reduces the number of points in the point cloud, decreasing the data volume while preserving the geometric features of the point cloud as much as possible, improving the efficiency of subsequent processing. A filtering algorithm is applied to remove noise from the point cloud, smoothing the point cloud surface and improving the quality of the point cloud data. Through this removal process, non-target point clouds such as the ground, vegetation, and moving objects can be removed, reducing noise points and improving the purity and applicability of the point cloud data. Simultaneously, downsampling reduces the total amount of point cloud data, lowering the computational complexity and memory requirements of subsequent processing, and increasing processing speed. Filtering smooths the point cloud and removes outliers, making subsequent feature extraction, classification, and other algorithms run more stably and accurately.

[0088] Based on any of the above embodiments, the step of determining multiple first candidate point clouds of the first part and multiple target point clouds to be screened of the second part from the regional target point cloud according to a preset height threshold includes, as follows: Figure 2 Steps S21-S24 are shown below:

[0089] Step S21: Determine the point cloud in the target point cloud of the region that has a height greater than the preset height threshold as the first candidate point cloud;

[0090] Specifically, the entire 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 a 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 treated as a single dataset, namely the first candidate point cloud. The first candidate point cloud now contains all point cloud data above the preset height threshold. This point cloud data may represent the top structure of the target object, such as the lamp head of a street lamp or the canopy of a tree.

[0091] Step S22: Determine the point clouds in the target point cloud of the region that are smaller than the preset height threshold as the initial point clouds to be screened;

[0092] Specifically, the entire 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 a preset height threshold, it is considered as a point that may belong to the second part of the target object and added to the initial point cloud to be filtered. All points with heights less than the preset threshold are collected and used as a separate dataset, namely the initial point cloud to be filtered. This point cloud dataset may contain the second part of the target object, but it may also contain other low-lying objects.

[0093] Step S23: Determine multiple key points from the initial point cloud to be screened;

[0094] It should be noted that the selection of keypoints is typically based on salient features in point cloud data. These features can be points with high curvature, sharp edges, vertices, or any points that are visually or geometrically prominent. Methods for determining keypoints include, but are not limited to:

[0095] ISS (Intrinsic Shape Signatures, ISS) key point extraction: Calculate geometric features within a local region of the point cloud and select points with significant geometric changes within the local area as key points; by analyzing geometric features at different scales, select those points that are stable at different scales as key points.

[0096] Harris corner detector: It works for 2D images, but can also find similar high curvature regions 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] The neighborhood statistics-based method calculates the distribution of points in the neighborhood of each point and selects points with high contrast or high curvature as key points.

[0100] Step S24: Perform a neighbor search based on each key point to determine the target point cloud to be filtered corresponding to each key point; the number of points included in each target point cloud to be filtered is greater than a preset number threshold.

[0101] For example, a search radius or a neighbor count threshold is defined; the search radius refers to searching for neighboring points within a spherical region centered on the keypoint in space; the neighbor count threshold specifies the number of nearest neighbors to be found around the keypoint; for each keypoint in the point cloud, a neighbor search is performed, which typically involves calculating the distance between each point in the point cloud and the keypoint, and selecting those points whose distance is less than the preset search radius or whose ranking is within the preset neighbor count threshold; through the neighbor search, the set of points around each keypoint forms a target point cloud to be filtered, wherein the number of points in each formed target point cloud to be filtered is greater than the preset count threshold, thereby ensuring that each target point cloud to be filtered has enough points to represent the local geometric features around the keypoint, avoiding inaccurate feature descriptions 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 each key point has at least enough points around it 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 can be flexibly set based on the specific situation of the point cloud and application requirements, and this embodiment does not impose any restrictions on it.

[0103] In the specific implementation, the initial point cloud to be screened is first reduced in dimensionality. A spatial neighborhood is established with each key point as the center. The kd-tree algorithm is used to quickly search for neighboring points and count the number of points in the neighborhood. A preset number threshold is set according to the laser scanning point frequency and the size of the target object. The cylindrical neighborhood range with point density that meets the preset number threshold is back-projected to obtain the 3D point cloud data.

[0104] It should be understood that the size of a spatial neighborhood can be a sphere or cylindrical region with a fixed radius, or it can be a set containing a certain number of nearest neighbor points.

[0105] In this embodiment, from the regional target point cloud, all point clouds with heights greater than a preset height threshold are selected. These point clouds may represent the first part of the target object. Simultaneously, from the regional target point cloud, all point clouds with heights less than the preset height threshold are selected. These point clouds may contain the second part of the target object. This is defined as the initial point cloud to be screened. In the initial point cloud to be screened, multiple keypoints are determined using keypoint detection algorithms (such as Harris corner detection, SIFT, SURF, ISS, etc.). For each detected keypoint, a neighbor search is performed to determine the point cloud within a certain range (such as a fixed radius or a fixed number of nearest neighbors). These point clouds are defined as the target point cloud to be screened. The number of points included in each target point cloud to be screened is greater than a preset threshold, which helps to ensure that there are enough points around the keypoint to describe the local geometric features and avoids feature description distortion due to insufficient points. The combination of keypoint detection and neighbor search makes the algorithm more robust to point cloud density changes, noise, and occlusion.

[0106] Based on any of the above embodiments, before step S30, the method further includes, as follows: Figure 3 Steps S31-S33 are shown below:

[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 in each directional dimension, the point cloud is decentralized, and the covariance matrix of the decentralized point cloud is calculated.

[0108] For example, firstly, the centroid of the target point cloud to be screened is calculated. The centroid is the average of the coordinates of all points in the point cloud, and can be regarded as the geometric center of the point cloud. For each point in the point cloud, the centroid coordinates are subtracted from its coordinates to obtain the decentralized point coordinates. On the one hand, this eliminates the average 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 better preserves the relative positional distribution information of the point cloud data, reduces the influence of redundant information on principal component calculation, and makes 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: Based on the covariance matrix, determine the principal vector of each point;

[0110] In the specific implementation, for each target point cloud to be screened, the principal vector is extracted using principal component analysis, as follows:

[0111] First, the point cloud is decentralized by subtracting the mean of the coordinates in each dimension from the coordinates in that dimension. Then, the covariance matrix of the decentralized point cloud is calculated.

[0112]

[0113] In equation (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 Let i be the i-th point in the target point cloud to be filtered. Let T be the mean coordinates of all points in the target point cloud to be screened, and let T be the transpose of the matrix.

[0114] The covariance matrix C is decomposed into eigenvalues ​​λ1, λ2, λ3 (λ1>λ2>λ3) and corresponding eigenvectors V1, V2, V3. The eigenvector corresponding to the largest eigenvalue represents the main direction of the target point cloud to be screened, i.e., the principal vector. In this embodiment, the principal vector of the target point cloud to be screened is used to represent the principal vector of each point in the target point cloud to be screened.

[0115] Step S33: Construct a local plane for each point, and determine the normal vector of the local plane as the normal vector of the corresponding point.

[0116] In the specific implementation, for each point, a neighborhood range with a fixed radius is defined and K nearest neighbors are searched. In this embodiment, K is not limited, and K=10 is used as an example. 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 by the following formula (2):

[0117]

[0118] In equation (2), Let d be the normal vector of plane P, d be the distance from P to the origin, n be the total number of points in the target point cloud to be screened, and x be the distance from P to the origin. i Let P be 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. This matrix describes the correlation of points in the point cloud across various directional dimensions. The eigenvalues ​​and eigenvectors of the covariance matrix provide the main directional information of the point cloud. Based on the eigenvalues ​​and eigenvectors of the covariance matrix, the largest eigenvector corresponding to the largest eigenvalue is identified as the principal vector. For each point, a local plane is constructed using the least squares method based on its K nearest neighbors. 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 that point. The principal vector and normal vector provide local features of the point cloud, which is helpful for subsequent feature description and recognition.

[0120] Based on any of the above embodiments, the step of determining multiple second candidate point clouds of the second part from multiple 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 includes:

[0121] For each of the target point clouds to be filtered, determine whether the target point cloud to be filtered includes target points greater than or equal to a preset proportion; wherein, the target point is a point whose included angle is within a preset angle range;

[0122] It should be noted that the preset ratio can be set according to actual needs. If the target point cloud to be screened includes target points greater than or equal to the preset ratio, it means that the point cloud contains a sufficient number of points that meet the angle conditions, and is more likely to be the point cloud of the second part of the target object, worthy of further analysis. If the target points are less than the preset ratio, it means that the object represented by the point cloud is only similar to the second part of the target object in one aspect of its shape. The preset angle range 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 principal vector and the normal vector of each point in the target point cloud to be screened for the second part of the street lamp (i.e., the street lamp pole) should be around 90 degrees. The preset angle range can be set to 88 degrees-92 degrees, and the preset ratio is 90%. The target point cloud to be screened contains point clouds representing street lamp poles, point clouds representing traffic sign poles, and point clouds representing trees. By judging how many of the angles between the principal vector and the normal vector of each point in the target point cloud to be screened are in the 88-92 degree range, it can be determined whether the corresponding target point cloud to be screened is likely the point cloud of the second part (street lamp pole) of the target object. Figure 4It is known that the traffic sign pole and the second part of the target object, namely the lamppost, have similar angles between their principal vectors and normal vectors. Therefore, the lamppost and traffic sign pole cannot be significantly distinguished by the target points of the preset ratio. However, trees, due to their lateral branches extending from the inside out, exhibit a chaotic and discrete distribution within the cylindrical neighborhood, showing a significant difference from the lamppost and traffic sign pole. The target points included in the tree target point cloud should be smaller than the preset ratio, and the tree target point cloud can be eliminated based on the target points of the preset ratio. Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the angle differences between different objects, provided as an embodiment of this application. Figure 4 The diagrams from left to right show the distribution of principal vectors and normal vectors for three different objects: Figure a shows the distribution of principal vectors and normal vectors for a street lamp pole, Figure b shows the distribution of principal vectors and normal vectors for a traffic sign pole, and Figure c shows the distribution of principal vectors and normal vectors for a tree. In Figures a, b, and 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 angle between the principal vector and normal vector of these three different objects is quite different.

[0123] If so, the target point cloud to be screened is determined as the second candidate point cloud.

[0124] Understandably, removing target point clouds with target points smaller than a preset ratio allows for further filtering to identify point clouds that may be the second part of the target object, thereby improving the accuracy of the point cloud data.

[0125] In this embodiment, angle interval filtering and target point quantity ratio checks are performed for each target point cloud to be screened. This aims to further filter non-target point cloud data, reduce redundant data, and improve the efficiency of subsequent processing. By filtering angle intervals, the features of specific directions in the point cloud can be highlighted, which is beneficial for subsequent feature extraction and analysis.

[0126] Based on any of the above embodiments, the step of merging each second candidate point cloud with the first candidate point cloud corresponding to the position based on positional relationship to obtain the point cloud of the target object includes:

[0127] Based on the vertical positional relationship between the first candidate point cloud and the second candidate point cloud, clustering is used to merge each second candidate point cloud with the corresponding first candidate point cloud to obtain the point cloud of the target object.

[0128] It should be noted that the clustering method can be hierarchical clustering, K-means clustering, Euclidean clustering, or other suitable clustering algorithms.

[0129] In the specific implementation, the height difference between the first candidate point cloud and the second candidate point cloud is calculated. Based on the height difference, the first candidate point cloud and the second candidate point cloud are grouped into the same category by 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, by clustering and merging, point cloud data from different parts can be integrated and restored into a complete object point cloud. The clustering process helps to remove inconsistent or abnormal point cloud data, and the final target object point cloud is more accurate and comprehensive, improving the quality and consistency of the point cloud.

[0131] Based on any of the above embodiments, the step of merging each second candidate point cloud with the first candidate point cloud corresponding to its location using clustering to obtain the point cloud of the target object includes:

[0132] Clustering is used to merge each second candidate point cloud with the first candidate point cloud corresponding to the location to obtain the merged point cloud;

[0133] Understandably, in this embodiment, determining which point clouds should be clustered together is based on their vertical positional relationships, which involves comparing the points in the point cloud along the Z-coordinate. Merging point cloud data into a unified point cloud means merging the point cloud dataset; in addition, duplicate point removal or smoothing processes can also be performed.

[0134] The merged point cloud is input into a trained point cloud classification model to obtain the point cloud of the target object.

[0135] It should be noted that the trained point cloud classification model can be any one or a combination of various machine learning models, such as Support Vector Machine (SVM), Neural Network (e.g., Convolutional Neural Network CNN, Recurrent Neural Network RNN), K Nearest Neighbor (KNN) algorithm, Decision Tree model, Ensemble Learning Model (e.g., Adaboost, Bagging), etc. It can also be any one or a combination of models specifically designed for processing 3D point cloud data, such as PointNet, PointNet++, DGCNN. This embodiment uses the Random Forest model as an example to illustrate the trained point cloud classification model.

[0136] Before using the random forest model, it needs to be trained to better predict the point cloud of the target object. Taking a street lamp as an example, the training process of the random forest model is as follows:

[0137] (1) Sample Set Creation: Prior samples were established for the 3D point cloud within a certain area. To obtain the most accurate training data, the feature information of streetlights was marked using a manual annotation method to form the training data. Specifically, feature information was extracted from the neighborhood of each point. A spherical neighborhood with a fixed radius was established centered on the query point. Eight features were extracted from the neighborhood using the eigenvalues ​​of the normalized covariance matrix to describe whether a point belongs to a streetlight. Table 1 summarizes these features. Features such as linearity, flatness, and sphericity are used to determine the spatial distribution attributes of the rod-shaped structure. Elevation information is used to filter out discrete points with excessively large or small height information, and intensity is used to eliminate ground features with excessively large differences in echo reflectivity compared to streetlights. Furthermore, the streetlight sample set can be independently expanded according to actual application scenarios to meet the needs of different engineering projects.

[0138] Table 1 Local Feature Extraction by Point-by-Point Neighborhood

[0139]

[0140] In the table, λ1, λ2, and λ3 are three eigenvalues ​​obtained by eigenvalue decomposition of the covariance matrix, where λ1 > λ2 > λ3, L λ For linearity, P λ For flatness, S λ For sphericity, C λ For curvature variation, Z value For elevation, Z dif For elevation difference, Z i_max Z represents the highest point of the target object. i_min A is the lowest point of the target object. λ For anisotropy, Ref value The intensity is the reflection intensity.

[0141] Linearity, flatness, sphericity, curvature variation, and anisotropy can all be calculated using the eigenvalues ​​of the covariance matrix. Elevation and elevation difference can be directly obtained from point cloud information. Reflection intensity is an attribute of laser echo reflectivity. Linearity characterizes the linear distribution of a point in a point cloud. For example, a street lamp pole, vertical and straight, exhibits a significant linear distribution and thus a high linearity value (e.g., 0.99). However, other objects, such as tree canopies, have a more irregular distribution and lower linearity (e.g., 0.4). Similarly, flatness characterizes the likelihood of a point cloud distribution exhibiting a planar distribution. A street lamp pole with high linearity will have low flatness, while a building might have high flatness and low linearity. Sphericity: When data points are uniformly distributed on a spherical or near-spherical mass, they exhibit high sphericity. Curvature variation: Curvature variation describes the curvature changes in point cloud data. Anisotropy: Anisotropy describes the differences in data distribution across different directions. Data with high anisotropy indicates different properties or distributions in different directions. Elevation and elevation difference represent the spatial distribution characteristics of the street lamp's height above the ground. These eight features describe the spatial geometric characteristics of the target ground object (such as a street lamp), allowing the random forest algorithm to learn what point clouds conform to 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; it can also use ten features, etc.

[0142] (2) Model Training: The extracted features and labeled streetlight point clouds are merged into a training dataset, and each dataset is assigned a category label (e.g., dual-headed streetlight - 0, single-headed streetlight - 1, non-streetlight - 2, ...). The model performance is evaluated using the test set, and recall and precision metrics are calculated. A confusion matrix is ​​used to analyze the model's classification performance across different categories and to score the model in order to find the optimal model performance. The classification accuracy is verified using the test set (following the near-optimal model building rules; in this embodiment, the ratio of training set to test set is 6:4). After iterative training, the trained point cloud classification model is finally constructed.

[0143] In this embodiment, the model enables fine classification of object point clouds, distinguishing between target objects, various forms of target objects (e.g., target objects are various streetlights of different forms: single-head streetlights, double-head streetlights, etc., and the model can distinguish which form of streetlight each point cloud belongs to), and non-target objects, thereby improving the accuracy and efficiency of target object point cloud extraction.

[0144] In addition, this application also provides a method for point cloud extraction of streetlights, such as... Figure 5 As shown, Figure 5 A flowchart for street light point cloud extraction is provided as an embodiment of this application. The specific implementation process of the street light point cloud extraction method is as follows:

[0145] First step, such as Figure 5 As shown in the flowchart, the data preprocessing further includes: Urban scenes have complex terrain features and massive ground point clouds. First, Cloth Simulation Filtering (CSF) is used to extract ground points, reducing computational complexity and improving processing efficiency. Simultaneously, ground points provide highly accurate terrain undulation and elevation information, facilitating the rapid removal of near-field point clouds such as low-lying grass. For building facade point clouds, grid projection density constraints are used for identification and removal. Furthermore, voxel downsampling is used to quickly reduce the point cloud volume, and radius filtering is used to eliminate discrete noise points.

[0146] Considering that streetlights are usually located on the edges of roads or in the median strip, in order to minimize the occlusion caused by moving vehicles, pedestrians and other moving or static objects, a segmentation threshold of 1.8m above the ground can be set. Point clouds below the segmentation threshold are used as basic processing units for removal, thereby improving the accuracy of subsequent streetlight point cloud extraction.

[0147] Based on the height information of the streetlights to be tested, a threshold for the elevation above the ground is set, and the streetlights are divided into potential pole layers and potential head layers according to this threshold.

[0148] The second step, coarse extraction of streetlight point clouds, further includes: According to relevant road lighting regulations, the overall height of urban streetlights is usually higher than that of roadside trees and traffic signs on the same side. Furthermore, streetlights are regularly distributed vertically upwards, exhibiting significant pole-like characteristics; therefore, the projection density of streetlight point clouds along the elevation direction is significantly higher than that of adjacent features. Based on this, to quickly identify potential streetlight pole point clouds from scene point clouds with complex backgrounds, a cylindrical neighborhood search method based on ISS keypoints is designed. ISS keypoint extraction: To quickly obtain the location of pole-like features such as streetlights, avoiding a time-consuming and labor-intensive global search of the entire scene, the ISS algorithm is used to generate representative keypoints to quickly locate the areas where pole-like features are located. For example... Figure 6 As shown, Figure 6This is a schematic diagram of key points in the ISS (Integrated Site Search) provided in an embodiment of this application. Key points are marked in red. The ISS algorithm effectively captures the complex details of the three-dimensional geometry of ground features. The extracted key points are evenly distributed across the rod-shaped portions of various ground features, providing a good positional 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 centered on each key point. A kd-tree algorithm is used to quickly search for neighboring points and count the number of points within the neighborhood. A threshold for the number of points in the spatial neighborhood is pre-set based on the laser scanning point frequency and the size of a standard streetlight. The corresponding three-dimensional point cloud data is obtained by back-projecting the cylindrical neighborhood range that meets the threshold. Multiple key points of the same ground feature are deduplicated and iteratively merged to obtain all potential rod-shaped point sets containing the streetlight pole point cloud, effectively eliminating interference from other ground features.

[0149] The third step, refined extraction of streetlight point clouds, further includes: removing invalid point clouds such as roadside trees and discrete points: the pole-shaped point set obtained solely based on spatial neighborhood contains a large number of non-target objects such as traffic sign poles and roadside trees. Streetlight poles and traffic sign poles are usually man-made objects with relatively regular outlines, but naturally growing roadside tree point clouds exhibit the unique characteristics of a lower layer of vertical trunks and an upper layer of clustered canopies. To quickly filter out the influence of roadside trees, the pole-shaped point set is validated based on the angle between the principal vector and the normal vector:

[0150] ① For each potential set of rod-shaped points, the principal vector is extracted using principal component analysis. The algorithm steps are as follows:

[0151] First, the point cloud is decentered by subtracting the mean of the coordinates in each dimension from the coordinates in that dimension, as shown in equation (1) above. The covariance matrix of the decentered point cloud is then calculated using equation (1):

[0152]

[0153] In equation (1), C is the covariance matrix of the point cloud, n is the total number of points in the rod-shaped point set, and x i Let i be the i-th point in the set of rod-shaped points. Let T be the mean coordinates of all points in the rod-shaped point set, and let T be the transpose of the matrix.

[0154] Eigenvalue decomposition is performed 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 largest eigenvalue represents the main direction of the dataset, i.e., 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 neighbors. Construct a local plane P using the least squares method, and characterize the normal vector of each point in the rod-shaped point set with the normal vector of P. Refer to equation (2) above. Calculate the normal vector of P using equation (2) above:

[0156]

[0157] In equation (2), Let be the normal vector of plane P, d be the distance from P to the origin, n be the total number of points in the rod-shaped point set, and x be the distance from P to the origin. i Let P be the i-th point in the set of bar points, 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, the lateral branches extending from the trunk of roadside trees exhibit a chaotic distribution within the cylindrical neighborhood, significantly different from regular man-made features (such as streetlights and traffic signs). Specifically, the principal vectors of the tree-like point sets are primarily oriented towards the elevation direction (vertically upwards or downwards), with the normal vectors of streetlight point clouds mainly perpendicular to the local curved surface of the lamppost (approaching 90°); however, the normal vectors of roadside tree point clouds are discretely distributed in non-trunk locations. Based on this, the directional consistency of the tree-like point sets is verified according to the spatial angle differences between the principal and normal vectors of different features, in order to quickly and effectively separate non-target point sets such as roadside trees and discrete points, laying a good foundation for accurate classification by the random forest algorithm model. The calculation formula is as follows:

[0159]

[0160] In equation (3), v and Let θ be the principal vector and normal vector of each point, respectively, and let θ be the angle between the principal vector and the normal vector.

[0161] The fourth step, precise classification using random forest, further includes: Urban streetlights are diverse in type and have different morphological structures, but within a certain area, the streetlight types are basically uniform, evenly distributed, and highly repetitive. Furthermore, unlike other land features, man-made streetlights exhibit unique external contour details such as extension, curvature, and height, which helps in the accurate identification of streetlight point clouds. Random forest is one of the best supervised learning classification algorithms. It learns from a classification label dataset, fusing multi-class attribute features into a high-precision model detector. The random forest algorithm is used for precise streetlight extraction. By integrating multiple decision trees independently trained on pre-classified samples in the training set into an instantiated model, the model is validated on potential streetlight point sets during prediction to obtain more accurate streetlight classification results. The specific steps are as follows:

[0162] (1) Sample Set Creation: Prior samples were created for the 3D point cloud within a certain area. To obtain the most accurate training data, the feature information of the streetlights was marked using a manual annotation method to form the training data. Specifically, feature information was extracted from the neighborhood of each point. A spherical neighborhood with a fixed radius was established with the query point as the center. Eight features were extracted from the neighborhood using the eigenvalues ​​of the normalized covariance matrix to describe whether the point belongs to a streetlight. See Table 1 above, which summarizes these features.

[0163] (2) Model Training: The extracted features and labeled streetlight point clouds are merged into a training dataset, and each dataset is assigned a category label (e.g., dual-headed streetlight - 0, single-headed streetlight - 1, non-streetlight - 2, ...). The model performance is evaluated using the test set, and recall and precision metrics are calculated. A confusion matrix is ​​used to analyze the model's classification performance across different categories and to score the model in order to find the optimal model performance. The classification accuracy is verified using the test set (following the near-optimal model building rules, the training set and test set are divided in a 6:4 ratio). After iterative training, a random forest model is finally constructed.

[0164] (3) Model classification: The candidate rod point cloud and the lamp head layer point cloud are merged by Euclidean clustering 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 This application provides a schematic diagram of a street light point cloud processing process, in which (a) is the original point cloud including the street light area; and (b) is the point cloud processed using cloth simulation filtering (Cloth). The results of ground filtering using the Simulation Filtering (CSF) algorithm show that ground points are effectively separated, significantly reducing the point cloud volume. (cd) shows the ISS key point extraction and cylindrical neighborhood search process and results, showing that pole-shaped streetlights are effectively identified in the pole-shaped point set. (c) shows the result of direct filtering based on ground elevation, effectively preserving the pole-shaped parts of ground features and eliminating interference from complex ground features such as vehicles, pedestrians, and guardrails. (e) shows the result of the constraint between the principal vector and the normal vector, accurately removing irregular roadside trees and other discrete point sets. (f) shows the clustering results of the potential streetlight pole layer and lamp head layer. (gh) shows the process and results of accurate classification using the random forest model, showing that the streetlight point cloud is accurately extracted. (g) shows the result of accurate classification using the random forest model, and (h) shows the extraction result of streetlights, which are marked in red.

[0166] The street light point cloud extraction method provided in this embodiment establishes a cylindrical spatial neighborhood through ISS key points, uses density thresholding to identify and back-project potential pole-shaped object point sets, and then quickly eliminates non-target pole-shaped objects such as roadside trees by constraining the principal vector and normal vector directions and angles to obtain candidate street light point sets. Finally, based on the spatial geometric characteristics of the street light point cloud, a high-fit classification criterion is established through a random forest model to match and select the pole-shaped point sets with the model to further eliminate similar ground features such as traffic sign poles. This method can quickly and effectively achieve accurate extraction of street lights and has good universality for different types of street light point clouds.

[0167] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0168] Based on the methods described in any of the above embodiments, this application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. When executed by a processor, the computer program implements the methods described in any of the above embodiments.

[0169] Based on the methods described in any of the above embodiments, this application also provides, as follows: Figure 8 The diagram shows the structure of an electronic device. Figure 8 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the methods described in any of the above embodiments.

[0170] This application also provides a computer storage medium storing a computer program, which, when executed by a processor, can be used to perform the methods described in any of the above embodiments.

[0171] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0172] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0173] If the aforementioned functions are implemented as software functional 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 this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0174] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0175] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0176] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for extracting a point cloud of a target object, characterized by, The target object includes a first part and a second part, and points in the second part are arranged along a vertical direction; the method includes: obtaining a region target point cloud, the region target point cloud including a point cloud of the target object; determining, according to a preset height threshold, a plurality of first candidate point clouds of the first part and a plurality of to-be-screened target point clouds of the second part from the region target point cloud; determining, from the plurality of to-be-screened target point clouds, a plurality of second candidate point clouds of the second part based on an included angle between a principal vector and a normal vector of each point in the to-be-screened target point cloud, wherein the principal vector is determined by: for each to-be-screened target point cloud, performing a decentralization processing on the point cloud based on coordinates of each point in the to-be-screened target point cloud in each direction dimension, and calculating a covariance matrix of the decentralized point cloud; and determining the principal vector of each point based on the covariance matrix; and the normal vector is determined by: constructing a local plane for each point respectively, and determining a normal vector of the local plane as the normal vector of the corresponding point; merging each second candidate point cloud with a first candidate point cloud corresponding in position based on a positional relationship to obtain a point cloud of the target object, including: merging each second candidate point cloud with a first candidate point cloud corresponding in position based on the positional relationship in the vertical direction between the first candidate point cloud and the second candidate point cloud by using clustering to obtain the point cloud of the target object; the merging each second candidate point cloud with a first candidate point cloud corresponding in position based on the positional relationship in the vertical direction between the first candidate point cloud and the second candidate point cloud by using clustering to obtain the point cloud of the target object includes: merging each second candidate point cloud with a first candidate point cloud corresponding in position by using clustering to obtain a merged point cloud; and inputting the merged point cloud into a trained point cloud classification model to obtain the point cloud of the target object.

2. The method of claim 1, wherein, Before the obtaining a region target point cloud, further including: obtaining a region initial point cloud, and performing a removal processing on the region initial point cloud to obtain a removed point cloud; the removal processing includes: removing a near point cloud according to terrain undulation information carried by the region initial point cloud, and / or removing a point cloud not meeting a preset geometric feature based on a grid projection density of the region initial point cloud; performing a down-sampling and filtering processing on the removed point cloud to obtain the region target point cloud.

3. The method of claim 1, wherein, the determining, according to a preset height threshold, a plurality of first candidate point clouds of the first part and a plurality of to-be-screened target point clouds of the second part from the region target point cloud includes: determining a point cloud greater than the preset height threshold in the region target point cloud as the first candidate point cloud; determining a point cloud smaller than the preset height threshold in the region target point cloud as a to-be-screened initial point cloud; determining a plurality of key points from the to-be-screened initial point cloud; performing a neighboring point search based on each key point to determine a to-be-screened target point cloud corresponding to each key point respectively; and a number of points included in each to-be-screened target point cloud is greater than a preset number threshold.

4. The method of claim 1, wherein, The second part of the second candidate point cloud is determined from the plurality of the to-be-screened target point clouds based on an included angle between a principal vector and a normal vector of each point in the to-be-screened target point cloud, and the method comprises: For each to-be-screened target point cloud, it is determined whether the to-be-screened target point cloud comprises a target point greater than or equal to a preset proportion; wherein the target point is a point with the included angle in a preset angle interval; If yes, the to-be-screened target point cloud is determined as the second candidate point cloud.

5. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by a processor to implement the method in any one of claims 1-4.

6. An electronic device, comprising: The electronic device comprises: a processor; a memory for storing processor-executable instructions; wherein the processor invokes the executable instructions to implement the operations of the method in any one of claims 1-4.

7. A computer readable storage medium characterized in that, A computer program product has computer instructions stored thereon, and the computer instructions are executed by a processor to implement the steps of the method in any one of claims 1-4.

Citation Information

Patent Citations

  • Point cloud single tree segmentation method and device, equipment and computer readable medium

    CN111598915A

  • Street tree monomer extraction method and device based on MLS point cloud data

    CN115205690A

  • Target object extraction method and device based on point cloud and electronic equipment

    CN116310576A