Laser point cloud denoising method and system
By analyzing information such as reflectivity and density in laser point cloud processing, gradually filtering noise, and updating the background in real time, the false alarm problems caused by extreme weather and aerosol foreign matter are solved, and the noise removal effect and target recognition accuracy are improved.
Patent Information
- Application Number
- CN202510329591.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-20
AI Technical Summary
The prior art has poor laser point cloud denoising effect in extreme weather (such as heavy rain, thick fog, etc.) and in the presence of aerosol foreign matter such as dust and water vapor, resulting in complex false alarms.
By analyzing the reflectivity, density, distribution and other information, the noise points attached to the edge of the object are restored, and the background is updated in real time to improve the denoising effect.
It improves the accuracy of noise removal in extreme weather, enhances the accuracy of target recognition, and ensures the accuracy of invasive point clouds after background difference.
Smart Images

Figure CN119848439A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser radar, and in particular to a laser point cloud denoising method and system. Background Art
[0002] Based on its characteristics of being independent of ambient light, 3D laser point clouds are often used to replace image detectors for target detection in low-light environments. High-precision lasers can be used for perimeter intrusion detection with a higher security level. However, the detection principle of lasers also determines that their detection range will be weakened in rain, snow, fog and other weather conditions, and noise will be generated to cause false alarms. The industry's application of lasers often focuses on autonomous driving. The solution in this scenario only considers non-bad weather such as light rain, snow and fog, and is not suitable for work requirements in extreme weather such as heavy rain and dense fog in security scenarios. At the same time, in other security scenarios, aerosol foreign matter such as dust and water vapor can also cause more complex false alarms. Most of the existing other algorithms only perform simple screening based on distribution or reflectivity characteristics. The screening process depends on environmental characteristics and has poor robustness; or only consider the removal of noise points, and ignore the possibility that the incident angle or object material may also produce similar feature point clouds.
[0003] There is currently no effective solution to the above problems in the prior art. Summary of the invention
[0004] To solve the above problems, the present invention provides a laser point cloud denoising method and system, which determines the noise points round by round by analyzing the reflectivity, density, distribution, etc., and restores the noise points attached to the edge of the object, and updates the background in real time, so as to solve the problems of poor denoising effect and low precision in the prior art.
[0005] To achieve the above-mentioned purpose, the present invention provides a laser point cloud denoising method, comprising: obtaining a frame point cloud of a current frame, and preprocessing the frame point cloud to obtain an initial point cloud; moving points in the initial point cloud whose reflectivity is lower than a first preset reflectivity threshold and whose distance from the origin is less than a preset distance threshold to an initial noise point set to obtain a processed point cloud; taking points in the processed point cloud whose reflectivity is lower than a second preset reflectivity threshold and whose distance from the origin is less than the preset distance threshold as a first set of points to be processed; wherein the second preset reflectivity threshold is greater than the first preset reflectivity threshold; traversing the first set of points to be processed, performing a field search in the processed point cloud according to a preset radius for each point to be processed to obtain surrounding points, judging whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points, and if so, determining the target surrounding points corresponding to the target noise points according to the reflectivity, and adding the target surrounding points to the first set of points to be processed; if not, adding the point to be processed as an attachment A point is moved from a first set of unprocessed points to an attachment point set, and the position and reflectivity of the attachment point in the processed point cloud are updated according to the corresponding surrounding points; a second set of unprocessed points is obtained after traversal; the second set of unprocessed points is clustered to obtain a first clustering result; noise point clusters are determined according to the clustering characteristics of the first clustering result, and the points in the noise point clusters are added to the initial noise point set to obtain the latest noise point set; noise points are marked on the intrusion point cloud according to the latest noise point set; the intrusion point cloud is clustered to obtain a second clustering result, and valid clusters and noise points to be removed are determined according to the clustering characteristics of the second clustering result, and the corresponding noise points to be removed are deleted from the valid clusters to obtain a target cluster; the markings of the remaining noise points in the target cluster are canceled, and the remaining noise points are deleted from the latest noise point set; the current background point cloud is updated according to the processed point cloud and the current background point cloud; wherein the intrusion point cloud is obtained in advance by differentially dividing the processed point cloud and the current background point cloud.
[0006] Further optionally, judging whether the point to be processed is a target noise point based on the distribution characteristics and reflectivity of the surrounding points, and if so, determining the target surrounding points corresponding to the target noise points based on the reflectivity, includes: retrieving surrounding points whose reflectivity is higher than or equal to a second preset reflectivity threshold, recording them as first surrounding points, counting the number and positions of the first surrounding points, and when the number of the first surrounding points is 0, taking the corresponding point to be processed as the target noise point; retrieving surrounding points whose reflectivity is lower than the second preset reflectivity threshold, recording them as second surrounding points, counting the number and positions of the second surrounding points, calculating the distribution density of the second surrounding points based on the number of the second surrounding points, and taking the point to be processed corresponding to the distribution density lower than the first preset density threshold as the target noise point; calculating the first reflectivity mean and the first standard deviation of the reflectivity of all surrounding points corresponding to each point to be processed, and taking the point to be processed corresponding to the first standard deviation lower than the first preset standard deviation threshold as the target noise point; taking the surrounding points whose reflectivity is lower than the first reflectivity mean as the target surrounding points corresponding to the target noise point.
[0007] Further optionally, updating the position and reflectivity of the attachment point in the processed point cloud according to the corresponding surrounding points includes: calculating the second reflectivity average of the first surrounding points corresponding to each attachment point, and using the second reflectivity average as the updated reflectivity of the corresponding attachment point; calculating the quantity ratio of the first surrounding points to the second surrounding points, and calculating the reflectivity ratio of the updated reflectivity to the unupdated reflectivity; calculating the first center position of the first surrounding point and the second center position of the second surrounding point; and calculating the updated position according to the quantity ratio, the reflectivity ratio, the first center position and the second center position.
[0008] Further optionally, the method of determining noise clusters based on the clustering characteristics of the first clustering result includes: calculating the length of each cluster in the first clustering result in depth, calculating the third reflectivity mean and second standard deviation of all points in the cluster; treating clusters whose length is less than a first preset length threshold, whose third reflectivity mean is less than the first preset reflectivity threshold, and whose second standard deviation is less than the second preset standard deviation threshold as noise clusters; treating clusters whose number of points is less than a preset number threshold, or whose point density is less than a second preset density threshold as noise clusters; calculating Gaussian curvature after thinning the clusters, calculating a first quantity ratio of points whose Gaussian curvature is lower than the preset curvature threshold in the cluster to which they belong, and when the first quantity ratio is greater than the first preset ratio threshold, treating the corresponding cluster as a noise cluster.
[0009] Further optionally, the determining of valid clusters and noise points to be removed based on the clustering characteristics of the second clustering result includes: counting the number of noise points and the proportion of the number of noise points in each cluster in the second clustering result; taking a cluster whose number of noise points is lower than a preset noise point number threshold, or a cluster whose proportion of the number of noise points is lower than a preset noise point number proportion threshold as a valid cluster, and taking the noise points in the valid cluster as noise points to be removed; calculating the point distance from each noise point in the cluster to the nearest non-noise point, and calculating the second number proportion of points whose point distance is greater than or equal to a second preset length threshold in the cluster to which it belongs, when the second number proportion is greater than the second preset proportion threshold, taking the corresponding cluster as an invalid cluster, otherwise it is a valid cluster; taking the points in the valid cluster whose point distance is less than the second preset length threshold as points to be updated, calculating the position and reflectivity to be updated based on the corresponding surrounding points of the points to be updated, and judging whether there are points whose distance exceeds the second preset length threshold within the preset radius of the position to be updated, if not, using the position to be updated and reflectivity to be updated to respectively update the position and reflectivity of the point to be updated; and taking the unupdated points to be updated as noise points to be removed.
[0010] Further optionally, updating the current background point cloud according to the processed point cloud and the current background point cloud includes: counting the proportion of noise points in the points in the processed point cloud within a first preset distance threshold range, and when the noise point proportion is greater than a third preset proportion threshold, not updating the current background point cloud; otherwise, constructing a first depth map of the initial point cloud and a second depth map of the current background point cloud, and performing grid division on the first depth map and the second depth map; for each first grid in the first depth map, when there are noise points therein, adding all the points in the second grid corresponding to the first grid in the second depth map to the updated background point set, and adding all the points in the eight grids around the corresponding second grid to the updated background point set; when there are no noise points and object points in the first grid, adding all the points in the first grid to the updated background point set; when there are object points but no noise points in the first grid, adding all the non-object points in the first grid and all the points in the corresponding second grid to the updated background point set to obtain an updated background point cloud.
[0011] On the other hand, the present invention also provides a laser point cloud denoising system, including: a preprocessing module, used to obtain a frame point cloud of the current frame, and obtain an initial point cloud after preprocessing the frame point cloud; an initial denoising module, used to move points whose reflectivity is lower than a first preset reflectivity threshold and whose distance from the origin is less than a preset distance threshold from the initial point cloud to an initial noise point set to obtain a processed point cloud; points whose reflectivity in the processed point cloud is lower than a second preset reflectivity threshold and whose distance from the origin is less than the preset distance threshold are used as a first set of points to be processed; wherein the second preset reflectivity threshold is greater than the first preset reflectivity threshold; a first noise point screening module, used to traverse the first set of points to be processed, and for each point to be processed, perform a field search in the processed point cloud according to a preset radius to obtain surrounding points, and determine whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points. If so, determine the target surrounding points corresponding to the target noise points according to the reflectivity, and add the target surrounding points to the first set of points to be processed; if not, remove the point to be processed as an attachment point from the first set of points to be processed. The processing point set is moved to the attachment point set, and the position and reflectivity of the attachment point in the processing point cloud are updated according to the corresponding surrounding points; after traversal, a second point set to be processed is obtained; a second noise point screening module is used to cluster the second point set to be processed to obtain a first clustering result; the noise point cluster is determined according to the clustering characteristics of the first clustering result, and the points in the noise point cluster are added to the initial noise point set to obtain the latest noise point set; a noise point removal module is used to mark the noise points of the intrusion point cloud according to the latest noise point set; the intrusion point cloud is clustered to obtain a second clustering result, and the effective cluster and the noise points to be removed are determined according to the clustering characteristics of the second clustering result, and the corresponding noise points to be removed are deleted from the effective cluster to obtain the target cluster; the marking of the remaining noise points in the target cluster is canceled, and the remaining noise points are deleted from the latest noise point set, and the target is identified according to the target cluster; the current background point cloud is updated according to the processing point cloud and the current background point cloud; wherein the intrusion point cloud is obtained in advance by differentially dividing the processing point cloud and the current background point cloud.
[0012] Further optionally, the first noise point screening module includes: a first target noise point determination submodule, which is used to retrieve surrounding points whose reflectivity is higher than or equal to a second preset reflectivity threshold, recorded as first surrounding points, count the number and position of the first surrounding points, and when the number of the first surrounding points is 0, use the corresponding points to be processed as target noise points; a second target noise point determination submodule, which is used to retrieve surrounding points whose reflectivity is lower than the second preset reflectivity threshold, recorded as second surrounding points, count the number and position of the second surrounding points, calculate the distribution density of the second surrounding points according to the number of the second surrounding points, and use the points to be processed corresponding to the distribution density lower than the first preset density threshold as target noise points; a third target noise point determination submodule, which is used to calculate the first reflectivity mean and first standard deviation of the reflectivity of all surrounding points corresponding to each point to be processed, and use the points to be processed corresponding to the first standard deviation lower than the first preset standard deviation threshold as target noise points; a target surrounding point determination submodule, which is used to use the surrounding points whose reflectivity is lower than the first reflectivity mean as target surrounding points corresponding to the target noise points.
[0013] Further optionally, the second noise point screening module includes: a calculation submodule, used to calculate the length of each cluster in the first clustering result in depth, and calculate the third reflectivity mean and second standard deviation of all points in the cluster; a first noise point cluster determination submodule, used to treat clusters whose length is less than a first preset length threshold, whose third reflectivity mean is less than the first preset reflectivity threshold, and whose second standard deviation is less than the second preset standard deviation threshold as noise point clusters; a second noise point cluster determination submodule, used to treat clusters whose number of points is less than a preset number threshold, or whose point density is less than a second preset density threshold as noise point clusters; a third noise point cluster determination submodule, used to calculate Gaussian curvature after thinning the clusters, and calculate a first quantity ratio of points whose Gaussian curvature is lower than the preset curvature threshold in the cluster to which they belong; when the first quantity ratio is greater than the first preset ratio threshold, the corresponding cluster is treated as a noise point cluster.
[0014] Further optionally, the noise point removal module includes: a first denoising submodule, used to count the number of noise points and the proportion of noise points in each cluster in the second clustering result; taking the cluster whose number of noise points is lower than the preset noise point number threshold, or taking the cluster whose number of noise points is lower than the preset noise point number proportion threshold as the effective cluster, and taking the noise points in the effective cluster as the noise points to be removed; an effective cluster determination submodule, used to calculate the point distance from each noise point in the cluster to the nearest non-noise point, and calculate the second number proportion of points whose point distance is greater than or equal to the second preset length threshold in the cluster to which they belong, When the proportion of the second number is greater than the second preset proportion threshold, the corresponding cluster is regarded as an invalid cluster, otherwise it is a valid cluster; the second denoising submodule is used to take the points whose midpoint distance in the valid cluster is less than the second preset length threshold as the points to be updated, calculate the position and reflectivity to be updated according to the corresponding surrounding points of the points to be updated, and determine whether there are points within the preset radius of the position to be updated whose distance exceeds the second preset length threshold. If not, the position and reflectivity to be updated are used to update the position and reflectivity of the point to be updated respectively; the points to be updated that have not been updated are regarded as the noise points to be removed.
[0015] The above technical scheme has the following beneficial effects: by analyzing the distribution of points in the initial point cloud, reflectivity and other information, the noise points are gradually filtered out, and possible noise points are processed one by one according to the cause, so as to improve the accuracy of noise removal caused by extreme weather; the noise points on the edge of the object are screened out, and they are restored to the outline of the object itself as attachments, which is convenient for subsequent target recognition and improves the accuracy of subsequent target recognition; the background is selectively updated, and the real background situation is restored according to the screened noise points, thereby ensuring the accuracy of the intrusion point cloud after background difference and improving the accuracy of subsequent target recognition; the traditional algorithm is used to improve the calculation speed and ensure real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 is a flow chart of a laser point cloud denoising method provided by an embodiment of the present invention; Figure 2 is a flow chart of a target noise determination method provided by an embodiment of the present invention; Figure 3 is a flow chart of an attachment point updating method provided by an embodiment of the present invention; Figure 4 is a flow chart of a noise point clustering determination method provided by an embodiment of the present invention; Figure 5 It is a flow chart of an effective clustering and noise point determination method to be removed provided by an embodiment of the present invention; Figure 6 is a flow chart of a background updating method provided by an embodiment of the present invention; Figure 7 is a structural schematic diagram of a laser point cloud denoising system provided by an embodiment of the present invention; Figure 8 is a structural schematic diagram of a first noise point screening module for determining target noise points provided by an embodiment of the present invention; Fig. 9 is a structural diagram of a first noise point screening module for attachment point update provided by an embodiment of the present invention; Fig.10 is a structural schematic diagram of a second noise point screening module provided in an embodiment of the present invention; Fig.11 is a structural schematic diagram of a noise point removal module for denoising provided by an embodiment of the present invention; Fig.12 It is a structural schematic diagram of a noise removal module for background reconstruction provided by an embodiment of the present invention.
[0018] Reference numerals: 100-preprocessing module; 200-initial denoising module; 300-first noise point screening module; 3001-first target noise point determination submodule; 3002-second target noise point determination submodule; 3003-third target noise point determination submodule; 3004-target peripheral point determination submodule; 3005-reflectivity update submodule; 3006-reflectivity ratio calculation submodule; 3007-center position calculation submodule; 3008-position update submodule; 400-second noise point screening module Block; 4001-computing submodule; 4002-first noise clustering determination submodule; 4003-second noise clustering determination submodule; 4004-third noise clustering determination submodule; 500-noise removal module; 5001-first denoising submodule; 5002-valid clustering determination submodule; 5003-second denoising submodule; 5004-update judgment submodule; 5005-first grid processing submodule; 5006-second grid processing submodule; 5007-third grid processing submodule. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] In order to solve the problem that the existing technology has poor effect in removing noise (the noise specifically refers to the noise caused by rain, snow, fog, dust, etc. mentioned in the background technology), Figure 1 is a flow chart of a laser point cloud denoising method provided by an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a laser point cloud denoising method, comprising: S1. Obtain the frame point cloud of the current frame, and obtain the initial point cloud after preprocessing the frame point cloud.
[0021] The original point cloud data of the current frame, namely the frame point cloud, is collected by the laser radar. All points in the frame point cloud are in the same three-dimensional coordinate system with the laser radar as the origin, and each point has a three-dimensional coordinate.
[0022] The frame point cloud is an unprocessed point cloud. In order to speed up the calculation, it can be preprocessed before the noise is marked to obtain the initial point cloud. The preprocessing includes direct filtering the frame point cloud according to the security area, cutting out the effective defense area, and eliminating the data of distant or irrelevant areas; then, the ground fitting result is calculated to remove the point cloud on the ground and below the ground.
[0023] S2. Move points in the initial point cloud whose reflectivity is lower than a first preset reflectivity threshold and whose distance from the origin is less than a preset distance threshold to the initial noise point set to obtain a processed point cloud; take points in the processed point cloud whose reflectivity is lower than a second preset reflectivity threshold and whose distance from the origin is less than the preset distance threshold as the first point set to be processed; wherein the second preset reflectivity threshold is greater than the first preset reflectivity threshold.
[0024] Radar will form noise points with lower reflectivity that are obviously different from physical objects in rain, snow, fog and other environments. However, points with lower reflectivity are not just noise points such as rain, snow, fog, etc. They may also be caused by the incident angle of the laser or the material of the object. Therefore, they cannot be simply judged by the reflectivity value. For example, fog, dust, etc. may also adhere to the object, causing the point cloud of the object to be eroded or generating noise points with slightly higher reflectivity. Based on the above reasons, it is necessary to conduct a detailed analysis and judgment of the noise points.
[0025] Traverse all points in the initial point cloud, record the discrete points whose reflectivity is lower than the first preset reflectivity threshold R1 and whose distance from the origin (lidar) is less than the preset distance threshold D1 as the initial noise point set, and remove these discrete points from the initial point cloud to obtain the processed point cloud. Since severe noise only occurs at locations close to the laser radar, these low reflectivity points close to the origin can be directly identified as noise points. The reflectivity can be directly obtained from the laser radar data.
[0026] Then, the points whose reflectivity is lower than the second preset reflectivity threshold R2 and whose distance from the origin is less than the preset distance threshold D1 are marked, and these points are recorded as the point set to be processed. The points in the point set to be processed need to be further determined whether they are noise points or attachment points. The second preset reflectivity threshold R2 is slightly larger than the first preset reflectivity threshold R1 to obtain all possible noise points.
[0027] The first preset reflectivity threshold, the second preset reflectivity threshold and the preset distance threshold can all be manually set according to actual conditions.
[0028] S3, traverse the first set of points to be processed, perform a field search in the processing point cloud according to a preset radius for each point to be processed to obtain surrounding points, determine whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points, and if so, determine the target surrounding points corresponding to the target noise point according to the reflectivity, and add the target surrounding points to the first set of points to be processed; if not, move the point to be processed from the first set of points to be processed to the attachment point set as an attachment point, and update the position and reflectivity of the attachment point in the processing point cloud according to the corresponding surrounding points; after traversal, obtain the second set of points to be processed.
[0029] For each point to be processed in the first set of points to be processed, use the preset radius D2 to search and check the distribution characteristics and reflectivity of its surrounding points in the processing point cloud, and preliminarily screen the noise points and attachment points according to the distribution characteristics and reflectivity of the surrounding points to obtain the target noise points. If a point to be processed is determined to be a target noise point, then select the surrounding points of the suspected noise points among the surrounding points corresponding to the target noise point according to the reflectivity, that is, the target surrounding points, and add the target surrounding points to the first set of points to be processed; otherwise, the point may be an attachment point, and the point is added to the attachment point set and removed from the first set of points to be processed. Traverse all points in the first set of points to be processed, use the above method to judge the situation of each point to be processed, and obtain the second set of points to be processed and the set of attachment points.
[0030] For each point in the attachment point set, it is necessary to restore it to the shape of the object to which it belongs, update its position and reflectivity through the distribution characteristics and reflectivity of its surrounding points, and update the updated position results and reflectivity results to the processed point cloud.
[0031] Among them, the preset radius is set manually according to the actual clearing.
[0032] S4. Clustering the second to-be-processed point set to obtain a first clustering result; determining the noise point cluster according to the clustering characteristics of the first clustering result, adding the points in the noise point cluster to the initial noise point set, and obtaining the latest noise point set.
[0033] For the second set of points to be processed, a depth map (range image) of the second set of points to be processed is first constructed. If the hardware scanning method is petal-shaped scanning, the angles between the points in the scanning result are fixed, so the depth map can be used to ensure that the intervals between the scanning points are not uneven due to the change in the distance of the object from the sensor. Of course, if the method is line-by-line scanning, the projection map of the YZ plane can also be used.
[0034] Based on the depth map, clustering is performed to obtain the first clustering result, and the clustering features of each cluster in the first clustering result are calculated, such as the distribution of points in the cluster and reflectivity. Based on the clustering features, it can be determined whether each cluster is a noise point cluster. If a cluster is a noise point cluster, the points in the cluster are added to the initial noise point set to obtain the latest noise point set. In the above way, the noise points can be further screened to improve the accuracy of noise point marking.
[0035] S5. Mark the noise points of the intrusion point cloud according to the latest noise point set; cluster the intrusion point cloud to obtain a second clustering result, determine the effective clustering and the noise points to be removed according to the clustering characteristics of the second clustering result, delete the corresponding noise points to be removed from the effective clustering, and obtain the target clustering; cancel the marking of the remaining noise points in the target cluster, and delete the remaining noise points from the latest noise point set, and identify the target according to the target clustering; update the current background point cloud according to the processed point cloud and the current background point cloud; wherein, the intrusion point cloud is obtained in advance by differentially analyzing the processed point cloud and the current background point cloud.
[0036] The intrusion point cloud can be obtained after the processing point cloud is obtained. Specifically, the possible intrusion point cloud is segmented by performing background difference, pre-order difference, etc. between the processing point cloud and the current background point cloud. The noise points in the intrusion point cloud are marked according to the position of the latest noise point concentration point.
[0037] Cluster the intrusion point cloud to obtain the second clustering result. Clustering can use the distance-based Euclidean clustering method. In the clustering process, it should be noted that points marked as noise points can be added to a cluster but are not stacked as the starting point of the next proximity search.
[0038] Traverse each cluster in the second clustering result to determine whether it is a valid cluster and determine the noise points to be removed therein. If it is a valid cluster, delete the noise points to be removed therein to obtain a target cluster without noise points. Unmark the remaining noise points in the target cluster and delete the remaining noise points from the latest noise point set. For the obtained target cluster, a subsequent target recognition process can be performed to obtain a recognition result. The target recognition process can be completed using a recognition model, and the target cluster can be updated after the recognition is completed.
[0039] Furthermore, the background point cloud is needed in the differential process. The accuracy of the background point cloud will also affect the final recognition accuracy. For example, thick fog or dust sometimes causes a certain degree of occlusion of the background, resulting in the background part being exposed again after the fog or dust moves, and being mistakenly identified as an intruding object. Therefore, it is necessary to build a real-time updated background to help with the differential. The processed point cloud is combined with the current background point cloud according to the distribution of noise points in the processed point cloud to obtain an updated background point cloud for application in the differential process of the next frame.
[0040] As an optional implementation, Figure 2 is a flow chart of a method for determining target noise points provided by an embodiment of the present invention. Figure 2 As shown, judging whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points, and if so, determining the target surrounding points corresponding to the target noise point according to the reflectivity, including: S301, searching for peripheral points whose reflectivity is higher than or equal to a second preset reflectivity threshold, recording them as first peripheral points, counting the number and positions of the first peripheral points, and when the number of the first peripheral points is 0, taking the corresponding point to be processed as a target noise point.
[0041] For each point to be processed, count the surrounding points whose reflectivity is greater than or equal to the second preset reflectivity threshold R2 among the corresponding surrounding points, take them as the first surrounding points, and count the number and position of the first surrounding points. If the number of the first surrounding points is 0, or the number of the first surrounding points is lower than a certain threshold, it is considered that the point must be a noise point and is recorded as a target noise point.
[0042] S302, retrieve the peripheral points whose reflectivity is lower than the second preset reflectivity threshold, record them as second peripheral points, count the number and positions of the second peripheral points, calculate the distribution density of the second peripheral points according to the number of the second peripheral points, and take the points to be processed corresponding to the distribution density lower than the first preset density threshold as target noise points.
[0043] For each point to be processed, the surrounding points whose reflectivity is less than the second preset reflectivity threshold R2 among the corresponding surrounding points are counted, and they are taken as the second surrounding points. The number and position of the second surrounding points are counted. The distribution density of low reflectivity points around the point to be processed can be calculated based on the number of second surrounding points. If the distribution density corresponding to the point to be processed is lower than the first preset density threshold T1, it is considered that the point must be a noise point and is recorded as a target noise point.
[0044] S303, calculating the first reflectivity mean and the first standard deviation of the reflectivity of all surrounding points corresponding to each to-be-processed point, and taking the to-be-processed point corresponding to the first standard deviation lower than the first preset standard deviation threshold as the target noise point.
[0045] For each point to be processed, the first reflectivity mean and the standard deviation of the reflectivity of the surrounding points are calculated. If the standard deviation is lower than the first preset standard deviation threshold, the point to be processed is considered to be a noise point and is recorded as a target noise point.
[0046] As an optional implementation, the first preset standard deviation threshold is usually 0.5×R2.
[0047] For a point to be processed, only one of the above three judgment conditions needs to be met to be considered as a target noise point.
[0048] S304: Use peripheral points whose reflectivity is lower than the first reflectivity average as target peripheral points corresponding to the target noise points.
[0049] If a point to be processed is a target noise point, the surrounding points whose reflectivity is less than the first reflectivity mean value among the surrounding points are taken as target surrounding points and added to the first set of points to be processed.
[0050] As an optional implementation, Figure 3 is a flow chart of an attachment point updating method provided by an embodiment of the present invention. Figure 3 As shown, the position and reflectivity of the attachment point in the processed point cloud are updated according to the corresponding surrounding points, including: S305: Calculate the average second reflectivity of the first peripheral points corresponding to each attachment point, and use the average second reflectivity as the updated reflectivity of the corresponding attachment point.
[0051] For each attachment point in the attachment point set, the mean reflectivity of the corresponding first peripheral points, that is, the second mean reflectivity, is calculated as the new reflectivity of the attachment point.
[0052] S306: Calculate the ratio of the number of the first peripheral points to the number of the second peripheral points, and calculate the reflectivity ratio of the updated reflectivity to the non-updated reflectivity.
[0053] For each attachment point, calculate the ratio r of the number of the first surrounding points to the number of the second surrounding points 附着1 , and calculate the reflectivity ratio r of the updated reflectivity to the original reflectivity 附着2 .
[0054] S307, calculating a first center position of the first peripheral point and a second center position of the second peripheral point; Calculate the first center position c of the first peripheral point respectively 附着1 and the second center position c of the second peripheral point 附着1 Since the positions of each first peripheral point and each second peripheral point have been counted before, the corresponding center position can be directly calculated through the position coordinates.
[0055] S308, calculating an updated position according to the quantity ratio, the reflectivity ratio, the first center position and the second center position.
[0056] As an optional implementation, the updated position c is calculated according to the quantity ratio, the reflectivity ratio, the first center position and the second center position. 附着 This is achieved by: c 附着 =c 附着1 +(c 附着2 -c 附着1 )×(r 附着1 ×w1+r 附着2 ×w2). Where w1 and w2 are the specified weights.
[0057] As an optional implementation, Figure 4 is a flow chart of a noise point clustering determination method provided by an embodiment of the present invention. Figure 4 As shown, judging the noise point clustering according to the clustering characteristics of the first clustering result includes: S401, calculating the length of each cluster in the first clustering result in depth, and calculating the third reflectivity mean and second standard deviation of all points in the cluster.
[0058] For each cluster in the first clustering result, its length in depth is calculated, the third reflectivity mean and second standard deviation of its internal points are calculated, the number of points in the cluster is counted, and the point density in the cluster is calculated based on the number.
[0059] S402, taking a cluster whose length is less than a first preset length threshold, whose third reflectivity mean is less than the first preset reflectivity threshold, and whose second standard deviation is less than the second preset standard deviation threshold as a noise cluster; For each cluster, if its corresponding length is less than the first preset length threshold L1, and the third reflectivity mean is less than the first preset reflectivity threshold R1, and the second standard deviation is less than the second preset standard deviation threshold (usually 0.5×R1), then the cluster is considered to be a noise cluster, that is, the points in it must be noise points, and all the points in the cluster are added to the initial noise point set.
[0060] S403, treating clusters whose point quantity is less than a preset quantity threshold, or clusters whose point density is less than a second preset density threshold, as noise clusters; For each cluster, if the number of points in the cluster is less than the preset number threshold, or the point density is less than the second preset density threshold, it is considered that the points in the cluster may be noise points but are relatively discrete and may not affect subsequent detection. The cluster is treated as a noise cluster and the points in the cluster are added to the initial noise point set.
[0061] S404, calculating Gaussian curvature after thinning the clusters, calculating a first quantity ratio of points whose Gaussian curvature is lower than a preset curvature threshold in the corresponding cluster, and when the first quantity ratio is greater than a first preset ratio threshold, treating the corresponding cluster as a noise point cluster.
[0062] The remaining clusters after the above two judgment methods may be noise clusters and need further judgment. First, the points in the cluster are thinned out, the Gaussian curvature of the thinned points is calculated, the number of points whose Gaussian curvature is lower than the preset curvature threshold is counted, and the first number ratio of these points to the number of all points in the cluster to which they belong is calculated. If the ratio is too high (greater than the first preset ratio threshold), the cluster is considered to be a noise cluster and the points in it are added to the initial noise point set; otherwise, the cluster is not a noise cluster.
[0063] As an optional implementation, Figure 5 is a flow chart of an effective clustering and noise point determination method to be removed provided by an embodiment of the present invention. Figure 5 As shown, judging effective clusters and noise points to be removed according to the clustering features of the second clustering result includes: S501. Count the number of noise points and the proportion of noise points in each cluster in the second clustering result; take the clusters whose number of noise points is lower than a preset noise point number threshold, or the clusters whose proportion of noise points is lower than a preset noise point number proportion threshold as valid clusters, and take the noise points in the valid clusters as noise points to be removed.
[0064] For each cluster in the second clustering result, if there is no noise point in the cluster (the number of noise points is lower than the preset noise point number threshold) or the noise point ratio is small (the noise point ratio is lower than the preset noise point ratio threshold), the cluster is considered to be a valid cluster, and all marked noise points in the cluster are noise points to be removed, and these noise points to be removed are removed from the valid cluster.
[0065] S502, calculating the point distance from each noise point to the nearest non-noise point in the cluster, calculating the second quantity ratio of points whose point distance is greater than or equal to the second preset length threshold in the cluster to which they belong, and when the second quantity ratio is greater than the second preset ratio threshold, treating the corresponding cluster as an invalid cluster, otherwise it is a valid cluster.
[0066] For the remaining clusters, calculate the point distance from each noise point to the nearest non-noise point, count the number of point distances greater than or equal to the second preset length threshold D3, and calculate the second number ratio of the second number ratio to the number of all points in the cluster. If the second number ratio is high (the second number ratio is greater than the second preset ratio threshold), the cluster is considered invalid, otherwise it is valid.
[0067] S503, taking the points whose midpoint distance in the valid cluster is less than the second preset length threshold as the points to be updated, calculating the position and reflectivity to be updated according to the surrounding points corresponding to the points to be updated, and judging whether there are points whose distance exceeds the second preset length threshold within the preset radius of the position to be updated, if not, using the position and reflectivity to be updated to update the position and reflectivity of the points to be updated respectively; taking the points to be updated that have not been updated as the noise points to be removed.
[0068] For the effective clusters recognized as valid, the points whose point distance is less than the second preset length threshold D3 are regarded as attachment points (points to be updated). The attachment points need to be updated. The positions to be updated and the reflectivity to be updated are calculated based on the distribution and reflectivity of the surrounding points to be updated. The specific updating method can be the same as the above updating method of the attachment points.
[0069] Determine whether there is a point within the preset radius D2 near the update position whose distance is greater than the second preset length threshold D3. If not, use the position to be updated and the reflectivity to be updated for updating, otherwise do not update. Use the unupdated points to be updated as noise points to be removed, and remove all noise points to be removed in the valid cluster. Cancel the noise point mark of the remaining noise points (updated noise points) in the valid cluster, and delete these points from the latest noise point set.
[0070] As an optional implementation, Figure 6 is a flow chart of a background updating method provided by an embodiment of the present invention. Figure 6 As shown, the current background point cloud is updated according to the processed point cloud and the current background point cloud, including: S504, statistically process the proportion of noise points in the point cloud within the first preset distance threshold range. When the proportion of noise points is greater than the third preset proportion threshold, do not update the current background point cloud; otherwise, construct a first depth map of the initial point cloud and a second depth map of the current background point cloud, and perform grid division on the first depth map and the second depth map.
[0071] Each time when trying to construct the background, the proportion of noise points in the point cloud within the first preset distance threshold is statistically processed. If the proportion is too large (the proportion of noise points is greater than the third preset proportion threshold), the update of the current background point cloud is abandoned, otherwise it is updated.
[0072] When updating, first construct the first depth map Image1 of the processing point cloud, and at the same time construct the second depth map Image0 of the current background point cloud. The first depth map and the second depth map are grid-divided according to the same rule.
[0073] S505. For each first grid in the first depth map, when there are noise points therein, all points in the second grid corresponding to the first grid in the second depth map are added to the updated background point set, and all points in the eight grids surrounding the corresponding second grid are added to the updated background point set.
[0074] For each first grid in the first depth map, when there is a noise point in a first grid, all points in the second grid corresponding to the first grid in the second depth map Image0 are added to the updated background point set P back And it is considered that the eight grids near the second grid are added to the background point set P back middle.
[0075] S506: When there are no noise points or object points in the first grid, all points in the first grid are added to the updated background point set.
[0076] If there is neither noise point nor object point in a first grid, all points in the first grid are added to the background point set P back middle.
[0077] S507 , when there are object points but no noise points in the first grid, the non-object points in the first grid and all points in the corresponding second grid are added to the updated background point set to obtain an updated background point cloud.
[0078] If there are object points but no noise points in a first grid, then all the non-object points in the first grid and the points in the corresponding second grid in the second depth map Image0 are added to the background point set P back .
[0079] The final background point set P back Used to update the current background point cloud and generate a new second depth map.
[0080] The embodiment of the present invention also provides a laser point cloud denoising system. Figure 7 is a schematic diagram of the structure of the laser point cloud denoising system provided by an embodiment of the present invention. Figure 7 As shown, the system includes: The preprocessing module 100 is used to obtain the frame point cloud of the current frame and obtain the initial point cloud after preprocessing the frame point cloud.
[0081] The original point cloud data of the current frame, namely the frame point cloud, is collected by the laser radar. All points in the frame point cloud are in the same three-dimensional coordinate system with the laser radar as the origin, and each point has a three-dimensional coordinate.
[0082] The frame point cloud is an unprocessed point cloud. In order to speed up the calculation, it can be preprocessed before the noise is marked to obtain the initial point cloud. The preprocessing includes direct filtering the frame point cloud according to the security area, cutting out the effective defense area, and eliminating the data of distant or irrelevant areas; then, the ground fitting result is calculated to remove the point cloud on the ground and below the ground.
[0083] The initial denoising module 200 is used to move points whose reflectivity is lower than a first preset reflectivity threshold and whose distance from the origin is less than a preset distance threshold from the initial point cloud to the initial noise point set to obtain a processed point cloud; and to take points in the processed point cloud whose reflectivity is lower than a second preset reflectivity threshold and whose distance from the origin is less than the preset distance threshold as the first point set to be processed; wherein the second preset reflectivity threshold is greater than the first preset reflectivity threshold.
[0084] Radar will form noise points with lower reflectivity that are obviously different from physical objects in rain, snow, fog and other environments. However, points with lower reflectivity are not just noise points such as rain, snow, fog, etc. They may also be caused by the incident angle of the laser or the material of the object. Therefore, they cannot be simply judged by the reflectivity value. For example, fog, dust, etc. may also adhere to the object, causing the point cloud of the object to be eroded or generating noise points with slightly higher reflectivity. Based on the above reasons, it is necessary to conduct a detailed analysis and judgment of the noise points.
[0085] Traverse all points in the initial point cloud, record the discrete points whose reflectivity is lower than the first preset reflectivity threshold R1 and whose distance from the origin (lidar) is less than the preset distance threshold D1 as the initial noise point set, and remove these discrete points from the initial point cloud to obtain the processed point cloud. Since severe noise only occurs at locations close to the laser radar, these low reflectivity points close to the origin can be directly identified as noise points. The reflectivity can be directly obtained from the laser radar data.
[0086] Then, the points whose reflectivity is lower than the second preset reflectivity threshold R2 and whose distance from the origin is less than the preset distance threshold D1 are marked, and these points are recorded as the point set to be processed. The points in the point set to be processed need to be further determined whether they are noise points or attachment points. The second preset reflectivity threshold R2 is slightly larger than the first preset reflectivity threshold R1 to obtain all possible noise points.
[0087] The first preset reflectivity threshold, the second preset reflectivity threshold and the preset distance threshold can all be manually set according to actual conditions.
[0088] The first noise point screening module 300 is used to traverse the first set of points to be processed, perform a field search in the processing point cloud according to a preset radius for each point to be processed to obtain surrounding points, and determine whether the point to be processed is a target noise point based on the distribution characteristics and reflectivity of the surrounding points. If so, determine the target surrounding points corresponding to the target noise point based on the reflectivity, and add the target surrounding points to the first set of points to be processed; if not, move the point to be processed from the first set of points to be processed to the attachment point set as an attachment point, and update the position and reflectivity of the attachment point in the processing point cloud based on the corresponding surrounding points; after traversal, the second set of points to be processed is obtained.
[0089] For each point to be processed in the first set of points to be processed, use the preset radius D2 to search and check the distribution characteristics and reflectivity of its surrounding points in the processing point cloud, and preliminarily screen the noise points and attachment points according to the distribution characteristics and reflectivity of the surrounding points to obtain the target noise points. If a point to be processed is determined to be a target noise point, then select the surrounding points of the suspected noise points among the surrounding points corresponding to the target noise point according to the reflectivity, that is, the target surrounding points, and add the target surrounding points to the first set of points to be processed; otherwise, the point may be an attachment point, and the point is added to the attachment point set and removed from the first set of points to be processed. Traverse all points in the first set of points to be processed, use the above method to judge the situation of each point to be processed, and obtain the second set of points to be processed and the set of attachment points.
[0090] For each point in the attachment point set, it is necessary to restore it to the shape of the object to which it belongs, update its position and reflectivity through the distribution characteristics and reflectivity of its surrounding points, and update the updated position results and reflectivity results to the processed point cloud.
[0091] Among them, the preset radius is set manually according to the actual clearing.
[0092] The second noise point screening module 400 is used to cluster the second point set to be processed to obtain a first clustering result; determine the noise point cluster according to the clustering characteristics of the first clustering result, add the points in the noise point cluster to the initial noise point set, and obtain the latest noise point set.
[0093] For the second set of points to be processed, a depth map (range image) of the second set of points to be processed is first constructed. If the hardware scanning method is petal-shaped scanning, the angles between the points in the scanning result are fixed, so the depth map can be used to ensure that the intervals between the scanning points are not uneven due to the change in the distance of the object from the sensor. Of course, if the method is line-by-line scanning, the projection map of the YZ plane can also be used.
[0094] Based on the depth map, clustering is performed to obtain the first clustering result, and the clustering features of each cluster in the first clustering result are calculated, such as the distribution of points in the cluster and reflectivity. Based on the clustering features, it can be determined whether each cluster is a noise point cluster. If a cluster is a noise point cluster, the points in the cluster are added to the initial noise point set to obtain the latest noise point set. In the above way, the noise points can be further screened to improve the accuracy of noise point marking.
[0095] The noise removal module 500 is used to mark the noise points of the intrusion point cloud according to the latest noise point set; cluster the intrusion point cloud to obtain a second clustering result, determine the effective clustering and the noise points to be removed according to the clustering characteristics of the second clustering result, delete the corresponding noise points to be removed from the effective clustering, and obtain the target clustering; cancel the marking of the remaining noise points in the target cluster, and delete the remaining noise points from the latest noise point set, and identify the target according to the target clustering; update the current background point cloud according to the processed point cloud and the current background point cloud; wherein the intrusion point cloud is obtained in advance by differentially analyzing the processed point cloud and the current background point cloud.
[0096] The intrusion point cloud can be obtained after the processing point cloud is obtained. Specifically, the possible intrusion point cloud is segmented by performing background difference, pre-order difference, etc. between the processing point cloud and the current background point cloud. The noise points in the intrusion point cloud are marked according to the position of the latest noise point concentration point.
[0097] Cluster the intrusion point cloud to obtain the second clustering result. Clustering can use the distance-based Euclidean clustering method. In the clustering process, it should be noted that points marked as noise points can be added to a cluster but are not stacked as the starting point of the next proximity search.
[0098] Traverse each cluster in the second clustering result to determine whether it is a valid cluster and determine the noise points to be removed therein. If it is a valid cluster, delete the noise points to be removed therein to obtain a target cluster without noise points. Unmark the remaining noise points in the target cluster and delete the remaining noise points from the latest noise point set. For the obtained target cluster, a subsequent target recognition process can be performed to obtain a recognition result. The target recognition process can be completed using a recognition model, and the target cluster can be updated after the recognition is completed.
[0099] Furthermore, the background point cloud is needed in the differential process. The accuracy of the background point cloud will also affect the final recognition accuracy. For example, thick fog or dust sometimes causes a certain degree of occlusion of the background, resulting in the background part being exposed again after the fog or dust moves, and being mistakenly identified as an intruding object. Therefore, it is necessary to build a real-time updated background to help with the differential. The processed point cloud is combined with the current background point cloud according to the distribution of noise points in the processed point cloud to obtain an updated background point cloud for application in the differential process of the next frame.
[0100] As an optional implementation, Figure 8 is a schematic diagram of the structure of a first noise point screening module for determining target noise points provided by an embodiment of the present invention, such as Figure 8 As shown, the first noise point screening module 300 includes: The first target noise point determination submodule 3001 is used to retrieve surrounding points whose reflectivity is higher than or equal to the second preset reflectivity threshold, recorded as first surrounding points, and count the number and position of the first surrounding points. When the number of first surrounding points is 0, the corresponding point to be processed is taken as the target noise point.
[0101] For each point to be processed, count the surrounding points whose reflectivity is greater than or equal to the second preset reflectivity threshold R2 among the corresponding surrounding points, take them as the first surrounding points, and count the number and position of the first surrounding points. If the number of the first surrounding points is 0, or the number of the first surrounding points is lower than a certain threshold, it is considered that the point must be a noise point and is recorded as a target noise point.
[0102] The second target noise point determination submodule 3002 is used to retrieve surrounding points whose reflectivity is lower than a second preset reflectivity threshold, record them as second surrounding points, count the number and positions of the second surrounding points, calculate the distribution density of the second surrounding points based on the number of the second surrounding points, and take the points to be processed corresponding to the distribution density lower than the first preset density threshold as target noise points.
[0103] For each point to be processed, the surrounding points whose reflectivity is less than the second preset reflectivity threshold R2 among the corresponding surrounding points are counted, and they are taken as the second surrounding points. The number and position of the second surrounding points are counted. The distribution density of low reflectivity points around the point to be processed can be calculated based on the number of second surrounding points. If the distribution density corresponding to the point to be processed is lower than the first preset density threshold T1, it is considered that the point must be a noise point and is recorded as a target noise point.
[0104] The third target noise point determination submodule 3003 is used to calculate the first reflectivity mean and the first standard deviation of the reflectivity of all surrounding points corresponding to each to-be-processed point, and take the to-be-processed point corresponding to the first standard deviation lower than the first preset standard deviation threshold as the target noise point.
[0105] For each point to be processed, the first reflectivity mean and the first standard deviation of the reflectivity of the surrounding points are calculated. If the first standard deviation is lower than the first preset standard deviation threshold, the point to be processed is considered to be a noise point and is recorded as a target noise point.
[0106] As an optional implementation, the first preset standard deviation threshold is usually 0.5×R2.
[0107] For a point to be processed, only one of the above three judgment conditions needs to be met to be considered as a target noise point.
[0108] The target peripheral point determination submodule 3004 is used to take peripheral points whose reflectivity is lower than the first reflectivity average as target peripheral points corresponding to the target noise points.
[0109] If a point to be processed is a target noise point, the surrounding points whose reflectivity is less than the first reflectivity mean value among the surrounding points are taken as target surrounding points and added to the first set of points to be processed.
[0110] As an optional implementation, Fig. 9 is a structural diagram of a first noise point screening module for updating attachment points provided by an embodiment of the present invention, such as Fig. 9 As shown, the first noise point screening module 300 also includes: The reflectivity updating submodule 3005 is used to calculate the second reflectivity average of the first peripheral points corresponding to each attachment point, and use the second reflectivity average as the updated reflectivity of the corresponding attachment point; For each attachment point in the attachment point set, the mean reflectivity of the corresponding first peripheral points, that is, the second mean reflectivity, is calculated as the new reflectivity of the attachment point.
[0111] The reflectivity ratio calculation submodule 3006 is used to calculate the ratio of the number of the first peripheral points to the number of the second peripheral points, and calculate the reflectivity ratio of the updated reflectivity to the unupdated reflectivity; For each attachment point, calculate the ratio r of the number of the first surrounding points to the number of the second surrounding points 附着1 , and calculate the reflectivity ratio r of the updated reflectivity to the original reflectivity 附着2 .
[0112] The center position calculation submodule 3007 is used to calculate the first center position of the first peripheral point and the second center position of the second peripheral point; Calculate the first center position c of the first peripheral point respectively 附着1 and the second center position c of the second peripheral point 附着1 Since the positions of each first peripheral point and each second peripheral point have been counted before, the corresponding center position can be directly calculated through the position coordinates.
[0113] The position updating submodule 3008 is used to calculate the updated position according to the quantity ratio, the reflectivity ratio, the first center position and the second center position.
[0114] As an optional implementation, the updated position c is calculated according to the quantity ratio, the reflectivity ratio, the first center position and the second center position. 附着 This is achieved by: c 附着 =c 附着1 +(c 附着2 -c 附着1 )×(r附着1 ×w1+r 附着2 ×w2). where w1 and w2 are the specified weights As an optional implementation, Fig.10 is a schematic diagram of the structure of the second noise point screening module provided in an embodiment of the present invention. Fig.10 As shown, the second noise point screening module 400 includes: A calculation submodule 4001 is used to calculate the length of each cluster in the first clustering result in depth, and calculate the third reflectivity mean and second standard deviation of all points in the cluster; For each cluster in the first clustering result, its length in depth is calculated, the third reflectivity mean and second standard deviation of its internal points are calculated, the number of points in the cluster is counted, and the point density in the cluster is calculated based on the number.
[0115] The first noise point cluster determination submodule 4002 is used to select the clusters whose length is less than a first preset length threshold, whose third reflectivity mean is less than the first preset reflectivity threshold, and whose second standard deviation is less than the second preset standard deviation threshold as noise point clusters; For each cluster, if its corresponding length is less than the first preset length threshold L1, and the third reflectivity mean is less than the first preset reflectivity threshold R1, and the second standard deviation is less than the second preset standard deviation threshold (usually 0.5×R1), then the cluster is considered to be a noise cluster, that is, the points in it must be noise points, and all the points in the cluster are added to the initial noise point set.
[0116] The second noise point cluster determination submodule 4003 is used to take a cluster whose number of points is less than a preset number threshold, or a cluster whose point density is less than a second preset density threshold, as a noise point cluster; For each cluster, if the number of points in the cluster is less than the preset number threshold, or the point density is less than the second preset density threshold, it is considered that the points in the cluster may be noise points but are relatively discrete and may not affect subsequent detection. The cluster is treated as a noise cluster and the points in the cluster are added to the initial noise point set.
[0117] The third noise point cluster determination submodule 4004 is used to calculate the Gaussian curvature after thinning the clusters, and calculate the first quantity ratio of points whose Gaussian curvature is lower than the preset curvature threshold in the corresponding cluster. When the first quantity ratio is greater than the first preset ratio threshold, the corresponding cluster is regarded as a noise point cluster.
[0118] The remaining clusters after the above two judgment methods may be noise clusters and need further judgment. First, the points in the cluster are thinned out, the Gaussian curvature of the thinned points is calculated, the number of points whose Gaussian curvature is lower than the preset curvature threshold is counted, and the first number ratio of these points to the number of all points in the cluster to which they belong is calculated. If the ratio is too high (greater than the first preset ratio threshold), the cluster is considered to be a noise cluster and the points in it are added to the initial noise point set; otherwise, the cluster is not a noise cluster.
[0119] As an optional implementation, Fig.11 is a schematic diagram of the structure of a noise removal module for denoising provided by an embodiment of the present invention, such as Fig.11 As shown, the noise removal module 500 includes: The first denoising submodule 5001 is used to count the number of noise points and the proportion of noise points in each cluster in the second clustering result; the clusters whose number of noise points is lower than the preset noise point number threshold, or the clusters whose proportion of noise points is lower than the preset noise point number proportion threshold are regarded as valid clusters, and the noise points in the valid clusters are the noise points to be removed.
[0120] For each cluster in the second clustering result, if there is no noise point in the cluster (the number of noise points is lower than the preset noise point number threshold) or the noise point ratio is small (the noise point ratio is lower than the preset noise point ratio threshold), the cluster is considered to be a valid cluster, and all marked noise points in the cluster are noise points to be removed, and these noise points to be removed are removed from the valid cluster.
[0121] The valid cluster determination submodule 5002 is used to calculate the point distance from each noise point to the nearest non-noise point in the cluster, and calculate the second quantity ratio of points whose point distance is greater than or equal to the second preset length threshold in the corresponding cluster. When the second quantity ratio is greater than the second preset ratio threshold, the corresponding cluster is regarded as an invalid cluster, otherwise it is a valid cluster; For the remaining clusters, calculate the point distance from each noise point to the nearest non-noise point, count the number of point distances greater than or equal to the second preset length threshold D3, and calculate the second number ratio of the second number ratio to the number of all points in the cluster. If the second number ratio is high (the second number ratio is greater than the second preset ratio threshold), the cluster is considered invalid, otherwise it is valid.
[0122] The second denoising submodule 5003 is used to take the points whose midpoint distance in the valid cluster is less than the second preset length threshold as the points to be updated, calculate the position and reflectivity to be updated according to the surrounding points corresponding to the points to be updated, and determine whether there are points within the preset radius of the position to be updated whose distance exceeds the second preset length threshold. If not, the position and reflectivity to be updated are used to update the position and reflectivity of the point to be updated respectively; and the points to be updated that have not been updated are taken as the noise points to be removed.
[0123] For the effective clusters recognized as valid, the points whose point distance is less than the second preset length threshold D3 are regarded as attachment points (points to be updated). The attachment points need to be updated. The positions to be updated and the reflectivity to be updated are calculated based on the distribution and reflectivity of the surrounding points to be updated. The specific updating method can be the same as the above updating method of the attachment points.
[0124] Determine whether there is a point within the preset radius D2 near the update position whose distance is greater than the second preset length threshold D3. If not, use the position to be updated and the reflectivity to be updated for updating, otherwise do not update. Use the unupdated points to be updated as noise points to be removed, and remove all noise points to be removed in the valid cluster. Cancel the noise point mark of the remaining noise points (updated noise points) in the valid cluster, and delete these points from the latest noise point set.
[0125] As an optional implementation, Fig.12 is a schematic diagram of the structure of a noise removal module for background reconstruction provided by an embodiment of the present invention, such as Fig.12 As shown, the noise removal module 500 includes: The update judgment submodule 5004 is used to statistically process the proportion of noise points in the point cloud within the first preset distance threshold range. When the proportion of noise points is greater than the third preset proportion threshold, the current background point cloud is not updated; otherwise, a first depth map of the initial point cloud and a second depth map of the current background point cloud are constructed, and the first depth map and the second depth map are grid-divided.
[0126] Each time when trying to construct the background, the proportion of noise points in the point cloud within the first preset distance threshold is statistically processed. If the proportion is too large (the proportion of noise points is greater than the third preset proportion threshold), the update of the current background point cloud is abandoned, otherwise it is updated.
[0127] When updating, first construct the first depth map Image1 of the processing point cloud, and at the same time construct the second depth map Image0 of the current background point cloud. The first depth map and the second depth map are grid-divided according to the same rule.
[0128] The first grid processing submodule 5005 is used to, for each first grid in the first depth map, when there are noise points therein, add all the points in the second grid corresponding to the first grid in the second depth map to the updated background point set, and add all the points in the eight grids surrounding the corresponding second grid to the updated background point set.
[0129] For each first grid in the first depth map, when there is a noise point in a first grid, all points in the second grid corresponding to the first grid in the second depth map Image0 are added to the updated background point set P back And it is considered that the eight grids near the second grid are added to the background point set P back middle.
[0130] The second grid processing submodule 5006 is used to add all points in the first grid to the updated background point set when there are no noise points and object points in the first grid.
[0131] If there is neither noise point nor object point in a first grid, all points in the first grid are added to the background point set P back middle.
[0132] The third grid processing submodule 5007 is used to add non-object points in the first grid and all points in the corresponding second grid to the updated background point set to obtain an updated background point cloud when there are object points but no noise points in the first grid.
[0133] If there are object points but no noise points in a first grid, then all the non-object points in the first grid and the points in the corresponding second grid in the second depth map Image0 are added to the background point set P back .
[0134] The final background point set P back Used to update the current background point cloud and generate a new second depth map.
[0135] The above technical scheme has the following beneficial effects: by analyzing the distribution of points in the initial point cloud, reflectivity and other information, the noise points are gradually filtered out, and possible noise points are processed one by one according to the cause, so as to improve the accuracy of noise removal caused by extreme weather; the noise points on the edge of the object are screened out, and they are restored to the outline of the object itself as attachments, which is convenient for subsequent target recognition and improves the accuracy of subsequent target recognition; the background is selectively updated, and the real background situation is restored according to the screened noise points, thereby ensuring the accuracy of the intrusion point cloud after background difference and improving the accuracy of subsequent target recognition; the traditional algorithm is used to improve the calculation speed and ensure real-time performance.
[0136] The specific implementation methods of the above invention further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above content is only the specific implementation methods of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A laser point cloud denoising method, characterized in that: include: Obtaining a frame point cloud of the current frame, and obtaining an initial point cloud after preprocessing the frame point cloud; From the initial point cloud, points whose reflectivity is lower than a first preset reflectivity threshold and whose distance from the origin is less than a preset distance threshold are moved to the initial noise point set to obtain a processed point cloud; points in the processed point cloud whose reflectivity is lower than a second preset reflectivity threshold and whose distance from the origin is less than the preset distance threshold are taken as a first point set to be processed; wherein the second preset reflectivity threshold is greater than the first preset reflectivity threshold; Traversing the first set of points to be processed, performing a field search in the processing point cloud according to a preset radius for each point to be processed to obtain surrounding points, judging whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points, and if so, determining the target surrounding points corresponding to the target noise point according to the reflectivity, and adding the target surrounding points to the first set of points to be processed; if not, moving the point to be processed from the first set of points to be processed to the attachment point set as an attachment point, and updating the position and reflectivity of the attachment point in the processing point cloud according to the corresponding surrounding points; after traversing, obtaining the second set of points to be processed; Clustering the second set of points to be processed to obtain a first clustering result; determining a noise point cluster according to the clustering characteristics of the first clustering result, and adding points in the noise point cluster to the initial noise point set to obtain a latest noise point set; The intrusion point cloud is marked with noise points according to the latest noise point set; the intrusion point cloud is clustered to obtain a second clustering result, and effective clusters and noise points to be removed are determined according to the clustering characteristics of the second clustering result, and the corresponding noise points to be removed are deleted from the effective clusters to obtain a target cluster; the marking of the remaining noise points in the target cluster is canceled, and the remaining noise points are deleted from the latest noise point set, and the target is identified according to the target cluster; the current background point cloud is updated according to the processed point cloud and the current background point cloud; wherein the intrusion point cloud is obtained in advance by differentially comparing the processed point cloud with the current background point cloud.
2. The laser point cloud denoising method according to claim 1, characterized in that: The step of judging whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points, and if so, determining the target surrounding points corresponding to the target noise point according to the reflectivity, comprises: Retrieving peripheral points whose reflectivity is higher than or equal to a second preset reflectivity threshold, recording them as first peripheral points, counting the number and positions of the first peripheral points, and when the number of the first peripheral points is 0, taking the corresponding point to be processed as a target noise point; Retrieve surrounding points whose reflectivity is lower than a second preset reflectivity threshold, record them as second surrounding points, count the number and positions of the second surrounding points, calculate the distribution density of the second surrounding points according to the number of the second surrounding points, and take the points to be processed corresponding to the distribution density lower than the first preset density threshold as target noise points; Calculate the first reflectivity mean and the first standard deviation of the reflectivity of all surrounding points corresponding to each to-be-processed point, and take the to-be-processed point corresponding to the first standard deviation lower than the first preset standard deviation threshold as the target noise point; The peripheral points whose reflectivity is lower than the first reflectivity average are used as target peripheral points corresponding to the target noise points.
3. The laser point cloud denoising method according to claim 2, characterized in that: The updating of the position and reflectivity of the attachment point in the processed point cloud according to the corresponding surrounding points includes: Calculate the second reflectivity average of the first peripheral points corresponding to each attachment point, and use the second reflectivity average as the updated reflectivity of the corresponding attachment point; Calculating a ratio of the number of the first peripheral points to the number of the second peripheral points, and calculating a reflectivity ratio of the updated reflectivity to the unupdated reflectivity; Calculate a first center position of a first peripheral point and a second center position of a second peripheral point; An updated position is calculated according to the quantity ratio, the reflectivity ratio, the first center position and the second center position.
4. The laser point cloud denoising method according to claim 1, characterized in that: The determining the noise point clustering according to the clustering feature of the first clustering result includes: Calculate the length of each cluster in the first clustering result in depth, and calculate the third reflectivity mean and second standard deviation of all points in the cluster; The clusters whose length is less than the first preset length threshold, whose third reflectivity mean is less than the first preset reflectivity threshold, and whose second standard deviation is less than the second preset standard deviation threshold are regarded as noise clusters; The clusters whose number of points is less than a preset number threshold, or the clusters whose point density is less than a second preset density threshold, are regarded as noise clusters; After thinning the clusters, the Gaussian curvature is calculated, and the first quantity ratio of points whose Gaussian curvature is lower than the preset curvature threshold in the corresponding cluster is calculated. When the first quantity ratio is greater than the first preset ratio threshold, the corresponding cluster is regarded as a noise cluster.
5. The laser point cloud denoising method according to claim 1, characterized in that: The determining effective clusters and noise points to be removed according to the clustering features of the second clustering result includes: Counting the number of noise points and the proportion of noise points in each cluster in the second clustering result; taking clusters whose number of noise points is lower than a preset noise point number threshold, or taking clusters whose proportion of noise points is lower than a preset noise point number proportion threshold as valid clusters, and taking noise points in the valid clusters as noise points to be removed; Calculate the point distance from each noise point to the nearest non-noise point in the cluster, calculate the second quantity ratio of points whose point distance is greater than or equal to the second preset length threshold in the corresponding cluster, and when the second quantity ratio is greater than the second preset ratio threshold, regard the corresponding cluster as an invalid cluster, otherwise it is a valid cluster; The points whose midpoint distance in the valid cluster is less than the second preset length threshold are taken as the points to be updated, and the position and reflectivity to be updated are calculated according to the surrounding points corresponding to the points to be updated. It is determined whether there are points within the preset radius of the position to be updated whose distance exceeds the second preset length threshold. If not, the position and reflectivity to be updated are used to update the position and reflectivity of the points to be updated respectively; the points to be updated that have not been updated are taken as the noise points to be removed.
6. The laser point cloud denoising method according to claim 1, characterized in that: The updating of the current background point cloud according to the processed point cloud and the current background point cloud comprises: Counting the proportion of noise points in the points in the processed point cloud within the first preset distance threshold range, when the proportion of noise points is greater than a third preset proportion threshold, not updating the current background point cloud; otherwise, constructing a first depth map of the initial point cloud and a second depth map of the current background point cloud, and performing grid division on the first depth map and the second depth map; For each first grid in the first depth map, when there is a noise point therein, all points in the second grid corresponding to the first grid in the second depth map are added to the updated background point set, and all points in the eight grids surrounding the corresponding second grid are added to the updated background point set; When there are no noise points or object points in the first grid, all points in the first grid are added to the updated background point set; When there are object points but no noise points in the first grid, the non-object points in the first grid and all points in the corresponding second grid are added to the updated background point set to obtain an updated background point cloud.
7. A laser point cloud denoising system, characterized in that: include: A preprocessing module is used to obtain a frame point cloud of a current frame, and obtain an initial point cloud after preprocessing the frame point cloud; The initial denoising module is used to move points whose reflectivity is lower than a first preset reflectivity threshold and whose distance from the origin is less than a preset distance threshold from the initial point cloud to the initial noise point set to obtain a processed point cloud; and to take points whose reflectivity is lower than a second preset reflectivity threshold and whose distance from the origin is less than the preset distance threshold in the processed point cloud as a first point set to be processed; wherein the second preset reflectivity threshold is greater than the first preset reflectivity threshold; A first noise point screening module is used to traverse the first set of points to be processed, perform a field search in the processing point cloud according to a preset radius for each point to be processed to obtain surrounding points, determine whether the point to be processed is a target noise point according to the distribution characteristics and reflectivity of the surrounding points, and if so, determine the target surrounding points corresponding to the target noise point according to the reflectivity, and add the target surrounding points to the first set of points to be processed; if not, move the point to be processed from the first set of points to be processed to the attachment point set as an attachment point, and update the position and reflectivity of the attachment point in the processing point cloud according to the corresponding surrounding points; after traversal, a second set of points to be processed is obtained; A second noise point screening module is used to cluster the second to-be-processed point set to obtain a first clustering result; determine the noise point cluster according to the clustering characteristics of the first clustering result, and add the points in the noise point cluster to the initial noise point set to obtain the latest noise point set; A noise removal module is used to mark the noise points of the intrusion point cloud according to the latest noise point set; cluster the intrusion point cloud to obtain a second clustering result, determine the effective clustering and the noise points to be removed according to the clustering characteristics of the second clustering result, delete the corresponding determined noise points from the effective clustering to obtain the target cluster; cancel the marking of the remaining noise points in the target cluster, and delete the remaining noise points from the latest noise point set, and identify the target according to the target cluster; update the current background point cloud according to the processed point cloud and the current background point cloud; wherein the intrusion point cloud is obtained in advance by differentially analyzing the processed point cloud and the current background point cloud.
8. The laser point cloud denoising system according to claim 7, characterized in that: The first noise point screening module includes: A first target noise point determination submodule is used to retrieve surrounding points whose reflectivity is higher than or equal to a second preset reflectivity threshold value, record them as first surrounding points, count the number and positions of the first surrounding points, and when the number of the first surrounding points is 0, take the corresponding point to be processed as a target noise point; The second target noise point determination submodule is used to retrieve surrounding points whose reflectivity is lower than a second preset reflectivity threshold value, record them as second surrounding points, count the number and positions of the second surrounding points, calculate the distribution density of the second surrounding points according to the number of the second surrounding points, and take the to-be-processed points corresponding to the distribution density lower than the first preset density threshold value as target noise points; A third target noise point determination submodule is used to calculate a first reflectivity mean and a first standard deviation of the reflectivity of all surrounding points corresponding to each to-be-processed point, and to take the to-be-processed point corresponding to the first standard deviation lower than a first preset standard deviation threshold as a target noise point; The target peripheral point determination submodule is used to take peripheral points whose reflectivity is lower than the first reflectivity average as target peripheral points corresponding to the target noise points.
9. The laser point cloud denoising system according to claim 7, characterized in that: The second noise point screening module includes: A calculation submodule, used to calculate the length of each cluster in the first clustering result in depth, and calculate the third reflectivity mean and second standard deviation of all points in the cluster; A first noise point cluster determination submodule, configured to take a cluster whose length is less than a first preset length threshold, whose third reflectivity mean is less than the first preset reflectivity threshold, and whose second standard deviation is less than the second preset standard deviation threshold as a noise point cluster; A second noise point cluster determination submodule, used to take a cluster whose number of points is less than a preset number threshold, or a cluster whose point density is less than a second preset density threshold, as a noise point cluster; The third noise point cluster determination submodule is used to calculate the Gaussian curvature after thinning the clusters, and calculate the first quantity ratio of points whose Gaussian curvature is lower than the preset curvature threshold in the corresponding cluster. When the first quantity ratio is greater than the first preset ratio threshold, the corresponding cluster is regarded as a noise point cluster.
10. The laser point cloud denoising system according to claim 7, characterized in that: The noise removal module comprises: A first denoising submodule is used to count the number of noise points and the proportion of the number of noise points in each cluster in the second clustering result; a cluster whose number of noise points is lower than a preset noise point number threshold, or a cluster whose proportion of the number of noise points is lower than a preset noise point number threshold is taken as a valid cluster, and the noise points in the valid cluster are taken as noise points to be removed; The effective cluster determination submodule is used to calculate the point distance from each noise point to the nearest non-noise point in the cluster, and calculate the second quantity ratio of points whose point distance is greater than or equal to the second preset length threshold in the corresponding cluster. When the second quantity ratio is greater than the second preset ratio threshold, the corresponding cluster is regarded as an invalid cluster, otherwise it is a valid cluster; The second denoising submodule is used to take the points whose midpoint distance in the effective cluster is less than the second preset length threshold as the points to be updated, calculate the position and reflectivity to be updated according to the surrounding points corresponding to the points to be updated, and determine whether there are points whose distance exceeds the second preset length threshold within the preset radius of the position to be updated. If not, the position and reflectivity to be updated are used to update the position and reflectivity of the point to be updated respectively; and the points to be updated that have not been updated are taken as the noise points to be removed.
Citation Information
Patent Citations
An Improved Clustering-based Single Photon Point Cloud Data Denoising Method
CN109344812A
Method and apparatus for processing high-precision map data, storage medium and device
US20180253625A1
Cited By
Boundary detection method, device and equipment based on point cloud data and medium
CN121564631A