A method for noise identification and filtering of lidar, a terminal device and a storage medium

By performing line segment clustering and centripetal line judgment on LiDAR point cloud data, noise points of LiDAR can be quickly identified and removed, solving the problem of low noise identification efficiency in existing technologies and achieving efficient and real-time noise filtering effect.

CN117368883BActive Publication Date: 2026-05-26CHANGSHA XINGSHEN INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGSHA XINGSHEN INTELLIGENT TECH CO LTD
Filing Date
2022-07-01
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify and remove noise in lidar point cloud data, especially point and line noise. Furthermore, traditional methods are computationally inefficient or require large amounts of sample data, making them unsuitable for real-time vehicle navigation.

Method used

By performing line segment clustering on LiDAR point cloud data, marking suspected noise line segments, and judging based on distance similarity and threshold, point and line noise can be quickly identified and filtered. By using line segment clustering and centripetal line judgment algorithms, efficient identification and removal of noise can be achieved.

Benefits of technology

It effectively identifies and filters noise within 5-10ms, is compatible with multi-line mechanical rotating lidar, has strong generalization ability, low false detection rate and false detection rate, and preserves the true target point cloud.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117368883B_ABST
    Figure CN117368883B_ABST
Patent Text Reader

Abstract

This invention discloses a method, terminal device, and storage medium for noise identification and filtering in lidar, comprising: clustering line segments according to distance similarity in the scanning order for each scan line, marking suspected noise line segments in each scan line to obtain a set of suspected noise line segments; performing rapid clustering on each suspected noise line segment in the set to obtain multiple targets, and deleting point noise corresponding to targets containing fewer than a threshold line segments from the point cloud; calculating the linear representation of the suspected noise line segments and determining whether it is a centripetal line, and deleting the linear noise corresponding to the centripetal line from the point cloud. This invention is applied to the field of lidar, solving the problem of identifying and filtering point and linear noise in lidar, with low time consumption, compatibility with any multi-line mechanical rotating lidar, strong generalization ability, and the ability to retain real target point clouds with similar noise while filtering noise, resulting in extremely low false detection and false detection rates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lidar technology, specifically a lidar noise identification and filtering method, terminal device, and storage medium. Background Technology

[0002] LiDAR (LiDAR) is a general term for active laser detection sensor devices, and its working principle is roughly as follows: The LiDAR transmitter emits a laser beam. After encountering an object, the laser beam undergoes diffuse reflection and returns to the laser receiver. The distance is calculated based on different ranging principles (triangulation, pulse method, coherence method). Depending on the number of laser beams, there are typically single-line LiDAR, 4-line LiDAR, 8 / 16 / 32 / 64-line LiDAR, etc. One or more laser beams are emitted vertically at different angles and scanned horizontally to detect the three-dimensional contour of the target area. Multiple measurement channels (lines) are equivalent to multiple scanning planes with different tilt angles. Therefore, the more laser beams in the vertical field of view, the higher the vertical angular resolution and the greater the density of the laser point cloud.

[0003] In the field of autonomous driving, LiDAR sensors are the primary devices used in autonomous driving systems to acquire information about the external environment. The point cloud data collected by LiDAR is a crucial source of sensor data for these systems. Noise in LiDAR data originates from several sources: first, dust, raindrops, and water mist in the air can reflect laser pulses, creating noise; second, strong sunlight and laser beams emitted by other LiDAR systems can also generate noise; and third, due to the size of the laser pulse spot, ghosting noise can easily occur when the spot illuminates the edge of a target. This noise can interfere with the system's environmental detection, leading to false detections, false alarms, or shape estimation errors, thus affecting driving safety. Therefore, it is essential to preprocess the acquired point cloud data to remove noise and improve its quality.

[0004] Existing 3D point cloud noise removal algorithms typically eliminate noise points caused by rain, snow, and dust based on spatial proximity or statistical distribution characteristics. This technique identifies radar points with a small number of neighboring points within a certain range as noise points, such as Statistical Outlier Filtering (SOR) and Radius Outlier Filtering (ROR). While simple and easy to implement, this method is prone to misidentifying small targets at medium to long distances as noise points due to the dense-to-sparse nature of lidar point clouds. Furthermore, this method employs a 3D spatial neighborhood search, resulting in low computational efficiency. In addition, snowflakes in point clouds do not necessarily exist as single points; they often exist as multiple cluttered points in the near to medium range, significantly reducing the applicability of this spatial proximity-based filtering method.

[0005] Another point cloud denoising method is to use deep learning to identify noise by building a neural network model, labeling the training set, and training the neural network. However, this method requires collecting a large amount of diverse real-world sample data and its generalization is difficult to guarantee. The most fatal problem is that this method is time-consuming and difficult to apply to real-time inference on the vehicle side. Summary of the Invention

[0006] To address the shortcomings of the existing technologies, this invention provides a method, terminal device, and storage medium for identifying and filtering noise in lidar, which solves the problem of identifying and filtering point noise and line noise in lidar. It not only eliminates the need for a large amount of diverse sample data from real-world scenarios, but also consumes very little time (5-10ms), making it effectively applicable to real-time navigation inference on vehicle-side devices.

[0007] To achieve the above objectives, the present invention provides a method for noise identification and filtering of lidar, comprising the following steps:

[0008] Step 1: Receive a frame of point cloud data acquired by the lidar, wherein the point cloud data has a number of scan lines and each scan line has a number of scan points;

[0009] Step 2: For each scan line, perform line segment clustering based on distance similarity according to the scanning order, and mark the suspected noise line segments in each scan line to obtain a set of suspected noise line segments;

[0010] Step 3: Perform fast clustering on each suspected noise line segment in the suspected noise line segment set to obtain multiple targets, and delete the point noise corresponding to the targets containing fewer than the threshold in the point cloud;

[0011] Step 4: Calculate the straight line representation of the suspected noise line segment and determine whether it is a centripetal line, and delete the linear noise corresponding to the centripetal line in the point cloud.

[0012] In one embodiment, step 2 specifically includes:

[0013] Step 2.1, let i = 1, where i represents the i-th scan line;

[0014] Step 2.2, let j = 1, point_count = 0, invalid_point_count = 0, st = -1, et = -1, where j represents the j-th scan point on the i-th scan line, point_count represents the count of valid points in the current search segment, invalid_point_count represents the count of invalid points in the current search segment, st represents the coordinates of the starting point of the current search segment, and et represents the coordinates of the ending point of the current search segment; let P represents the j-th scan point on the i-th scan line. i,jThe measured distance in the lidar spherical coordinate system, and Time scan point P i,j Invalid point;

[0015] Let L be the number of scan lines in the point cloud, and N be the number of scan points on the i-th scan line;

[0016] Step 2.3, determine whether st < 0 is true:

[0017] If so, proceed to step 2.4;

[0018] Otherwise, proceed to step 2.5;

[0019] Step 2.4, Determine Is it true or false?

[0020] If so, create a new line segment for the current line segment, and set st = j, et = j, point_count = 1, invalid_point_count = 0, then proceed to step 2.12;

[0021] Otherwise, proceed to step 2.12;

[0022] Step 2.5, Determine Is it true or false?

[0023] If so, proceed to step 2.6;

[0024] Otherwise, set invalid_point_count = invalid_point_count + 1, and proceed to step 2.9;

[0025] Step 2.6: Determine whether the current scanned point belongs to the current line segment based on distance similarity.

[0026] If so, add the current point to the current line segment, and set et = j, point_count = point_count + 1, then proceed to step 2.12;

[0027] Otherwise, proceed to step 2.7;

[0028] Step 2.7, determine whether the current line segment is a suspected point-like noise line segment:

[0029] If so, add the current line segment to the set of suspected noisy line segments and proceed to step 2.8;

[0030] Otherwise, determine whether the current line segment is linear noise. If so, delete the s to et scan points in the i-th scan line in the point cloud and proceed to step 2.8; otherwise, proceed directly to step 2.8.

[0031] Step 2.8, Reset the current line segment: Let st = j, et = j, point_count = 1, take the current scan point as the starting point of the new current line segment, and proceed to step 2.12;

[0032] Step 2.9, determine if invalid_point_count is greater than the invalid point threshold:

[0033] If so, proceed to step 2.10;

[0034] Otherwise, proceed to step 2.12;

[0035] Step 2.10, determine whether the current line segment is a suspected point-like noise line segment:

[0036] If so, add the current line segment to the set of suspected noisy line segments and proceed to step 2.11;

[0037] Otherwise, determine whether the current line segment is linear noise. If so, delete the s to et scan points in the i-th scan line in the point cloud and proceed to step 2.11; otherwise, proceed directly to step 2.11.

[0038] Step 2.11, Reset the current line segment: Set st = -1, et = -1, point_count = 0, invalid_point_count = 0, initialize the current line segment, and proceed to step 2.12;

[0039] Step 2.12, let j = j + 1, and determine whether j > N is true:

[0040] If so, proceed to step 2.13;

[0041] Otherwise, return to step 2.3;

[0042] Step 2.13, let i = i + 1, and determine whether i > L is true:

[0043] If so, output the current set of suspected noise line segments;

[0044] Otherwise, return to step 2.2.

[0045] In one embodiment, step 2.6, determining whether the current scanned point belongs to the current line segment based on distance similarity, specifically involves:

[0046] Get the distance ratio_r between the current scan point and the previous valid scan point of the current line segment, and the distance difference value delta_r.

[0047] Let the distance ratio threshold be RR and the distance difference threshold be DR. Determine whether ratio_r < RR || ratio_r > 1 / RR and delta_r > DR are true:

[0048] If true, then the current scan point does not belong to the current line segment;

[0049] If this condition is not met, then the current scan point belongs to the current line segment.

[0050] In one embodiment, in steps 2.7 and 2.10, determining whether the current line segment is a suspected point-like noise line segment specifically involves:

[0051] The threshold for the number of point-like noise points is:

[0052]

[0053] In the formula, PNR represents the threshold for the number of point noise points, and round(·) represents the rounding function. This represents the limit function, where MaxN represents the upper limit and MinN represents the lower limit. Indicates distance At a given location, if the arc length is LD and the horizontal angular resolution of the scan point is Δθ, the number of scan points contained within the arc length range is:

[0054] Determine if point_count < PNR is true:

[0055] If so, the current line segment is a suspected point-like noise line segment;

[0056] Otherwise, the current line segment is not a suspected point noise line segment.

[0057] In one embodiment, in steps 2.7 and 2.10, determining whether the current line segment is linear noise specifically involves:

[0058] Let LNR be the threshold for the number of linear noise points, and determine whether point_count < LNR is true:

[0059] If so, the current line segment is a suspected linear noise point. The linear noise point recognition algorithm is used to identify the suspected linear noise point and determine whether it is a linear noise point.

[0060] Otherwise, the current line segment is not linear noise.

[0061] In one embodiment, step 3 specifically includes:

[0062] Step 3.1, obtain the set of suspected noisy line segments NL = {s1, s2, ..., s...} m}, where each suspected noise line segment is represented as (i, st, et), where i indicates that the suspected noise line segment belongs to the i-th scan line, st indicates the starting coordinate of the suspected noise line segment on the i-th scan line, and et indicates the ending coordinate of the suspected noise line segment on the i-th scan line.

[0063] Step 3.2, Initialize the core object collection

[0064] Step 3.3 Based on adjacent reachable line segments, filter out the core objects in the suspected noisy line segment set and add the core objects to the core object set;

[0065] Step 3.4, determine the core object set Is it true or false?

[0066] If so, then the process ends;

[0067] Otherwise, proceed to step 3.5;

[0068] Step 3.5: Select a core object o sequentially from the core object set Ω, and initialize the current cluster core object queue Ω. cur ={o}, initialize the current cluster sample set C = {o}, and update the core object set Ω = Ω - {o};

[0069] Step 3.6, determine the current cluster core object queue Ω cur Is it an empty set?

[0070] If so, proceed to step 3.7;

[0071] Otherwise, proceed to step 3.8;

[0072] Step 3.7, let MinPs be the minimum line segment number threshold, and determine whether the number of samples in the current cluster sample set C, |C|≥MinPs, holds true:

[0073] If so, return to step 3.4;

[0074] Otherwise, after deleting the scan point corresponding to the core object o in the point cloud, return to step 3.4;

[0075] Step 3.8, in the current cluster core object queue Ω cur Take a core object o′ from the sample set, and let Δ = Ω∩N(o′) be the set of unvisited remaining adjacent reachable line segments of o′. Then, the current cluster sample set C = C∪Δ, and update Ω. cur =Ω cur After updating Ω=Ω-Δ to ∪Δ-{o′}, return to step 3.6.

[0076] In one embodiment, step 3.3 specifically includes:

[0077] Step 3.3.1, record s j = (i, st, et), For scan point P i,j Horizontal angle in the lidar spherical coordinate system;

[0078] Step 3.3.2, search for line segment s j For line segments on two adjacent scan lines of i-1 and / or i+1, denote one of the line segments. like Then it means and For s j Adjacent reachable line segments;

[0079] Step 3.3.3, based on step 3.3.2, obtain line segment s j The set of adjacent reachable line segments N(s) j ), determine the set N(s) j Is it true that the number of line segments is greater than 0?

[0080] If so, then line segment s j Add to the core object collection, i.e.: Ω = Ω ∪ {s} j};

[0081] Otherwise, determine the line segment s j To remove point-like noise, delete line segment s in the point cloud. j Corresponding scan points;

[0082] Step 3.3.4: Repeat steps 3.3.2-3.3.3 until all suspected noise segments have been traversed.

[0083] In one embodiment, step 4 specifically includes:

[0084] Step 4.1, obtain the set of suspected noisy line segments NL = {s1, s2, ..., s...} m}, where each suspected noise line segment is represented as (i, st, et), where i indicates that the suspected noise line segment belongs to the i-th scan line, st indicates the starting coordinate of the suspected noise line segment on the i-th scan line, and et indicates the ending coordinate of the suspected noise line segment on the i-th scan line; let P represents the j-th scan point on the i-th scan line. i,j The measured distance in the lidar spherical coordinate system, and Time scan point P i,j Invalid point; let These represent the scan points P respectively. i,j Coordinates of the lidar in the Cartesian coordinate system;

[0085] Step 4.2: Traverse all points in the suspected noisy line segment (i, st, et) and compare them. The value of is denoted as the maximum value. The maximum value is indexed as m0, and the minimum value is... The minimum value index is n0;

[0086] Step 4.3: Calculate the projection distance pj_d of the origin (0, 0, 0) onto the spatial lines with indices m0 and n0, and the cosine value cos_v of the angle between the spatial lines with indices m0 and n0 and the spatial line between n0 and the origin.

[0087] Step 4.4, let D0 be the maximum projected distance threshold and V0 be the minimum included angle cosine value, and determine whether pj_d≤D0 and cos_v>V0 hold true:

[0088] If so, after deleting the scan points corresponding to line segments (i, st, et) in the point cloud, proceed to step 4.5;

[0089] Otherwise, proceed to step 4.5;

[0090] Step 4.5, repeat steps 4.2-4.4 until all suspected noise segments have been traversed.

[0091] To achieve the above objectives, the present invention also provides a terminal device, comprising:

[0092] Memory, used to store programs;

[0093] A processor is configured to execute the program stored in the memory. When the program is executed, the processor is configured to perform the lidar noise identification and filtering method as described above.

[0094] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing computer-executable instructions; when executed by a processor, the computer-executable instructions are used to implement the lidar noise identification and filtering method described above.

[0095] Compared with the prior art, the present invention has the following beneficial technical effects:

[0096] 1. It simultaneously solves the problems of identifying and filtering point noise and line noise in LiDAR, with a very short processing time (5-10ms);

[0097] 2. It is compatible with any multi-line mechanical rotating lidar and has strong versatility;

[0098] 3. While filtering noise, it can retain real target point clouds with similar noise (such as horizontal warning strips and vertical thin pillars), with extremely low false detection and false negative rates. Attached Figure Description

[0099] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0100] Figure 1 This is a flowchart of the lidar noise identification and filtering method in an embodiment of the present invention;

[0101] Figure 2 This is a flowchart illustrating the identification process for suspected noisy line segments in an embodiment of the present invention.

[0102] Figure 3 This is a flowchart of point noise identification and filtering in an embodiment of the present invention;

[0103] Figure 4 This is a schematic diagram of point noise in an embodiment of the present invention, wherein the point cloud circled in the diagram represents point noise.

[0104] Figure 5 This is a flowchart of the linear noise identification and filtering process in an embodiment of the present invention.

[0105] Figure 6 This is a schematic diagram of linear noise points in an embodiment of the present invention, wherein the point cloud circled in the diagram represents linear noise points;

[0106] Figure 7 This is a structural block diagram of the terminal device in an embodiment of the present invention.

[0107] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0108] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0109] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0110] In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0111] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0112] like Figure 1 The above describes a method for identifying and filtering noise in a lidar system, which mainly includes the following steps:

[0113] Step 1: Receive a frame of point cloud data acquired by the lidar, wherein the point cloud data has a number of scan lines and each scan line has a number of scan points;

[0114] Step 2: For each scan line, perform line segment clustering based on distance similarity according to the scanning order (i.e., clustering based on the similarity between the measured distances of adjacent scan points), and mark the suspected noise line segments in each scan line to obtain a set of suspected noise line segments;

[0115] Step 3: Perform fast clustering on each suspected noise line segment in the suspected noise line segment set to obtain multiple targets, and delete the point noise corresponding to the targets containing fewer than the threshold in the point cloud;

[0116] Step 4: Calculate the straight line representation of the suspected noise line segment and determine whether it is a centripetal line, and delete the linear noise corresponding to the centripetal line in the point cloud.

[0117] In step 1, the number of scan lines in one frame of data received from the lidar is L, and the number of scan points on any scan line is N (one frame of point cloud data can be understood as an L×N image). For the j-th scan point P in the i-th scan line... i,j , 0 < i ≤ L, 0 < j ≤ N, which includes Six elements. Among them, These represent the scan points P respectively. i,j Coordinates of the lidar in the Cartesian coordinate system Represents scan point P i,j The reflectivity or reflectance intensity Represents scan point P i,j Distance measurement in the lidar spherical coordinate system Represents scan point P i,j The horizontal angle in the lidar spherical coordinate system. In specific implementation, for a certain scanning point P... i,j ,if If the value is 0, then scan point P.i,j This is an invalid point.

[0118] refer to Figure 2 In step 2, the specific implementation method for finding suspected noise segments in each scan line includes the following steps:

[0119] Step 2.1, let i = 1, where i represents the i-th scan line;

[0120] Step 2.2, let j = 1, point_count = 0, invalid_point_count = 0, st = -1, et = -1, where j represents the j-th scan point on the i-th scan line, point_count represents the valid point count of the current search line segment, invalid_point_count represents the invalid point count of the current search line segment, st represents the starting coordinate of the current search line segment, and et is the ending coordinate of the current search line segment;

[0121] Step 2.3, determine whether st < 0 is true:

[0122] If so, proceed to step 2.4;

[0123] Otherwise, proceed to step 2.5;

[0124] Step 2.4, Determine Is it true or false?

[0125] If so, create a new line segment for the current line segment, and set st = j, et = j, point_count = 1, invalid_point_count = 0, then proceed to step 2.12;

[0126] Otherwise, proceed to step 2.12;

[0127] Step 2.5, Determine Is it true or false?

[0128] If so, proceed to step 2.6;

[0129] Otherwise, set invalid_point_count = invalid_point_count + 1, and proceed to step 2.9;

[0130] Step 2.6: Determine whether the current scanned point belongs to the current line segment based on distance similarity.

[0131] If so, add the current point to the current line segment, and set et = j, point_count = point_count + 1, then proceed to step 2.12;

[0132] Otherwise, proceed to step 2.7;

[0133] Step 2.7, determine whether the current line segment is a suspected point-like noise line segment:

[0134] If so, the current line segment is a suspected point noise. The current line segment is represented as (i, st, et) and added to the suspected noise line segment set, and then proceed to step 2.8. Here, i represents the i-th scan line, st represents the starting scan point of the suspected point noise line segment, and et represents the ending scan point of the suspected point noise line segment.

[0135] Otherwise, determine whether the current line segment is linear noise. If the current line segment is linear noise, delete the sth to etth scan points of the i-th scan line in the point cloud (i.e., set all elements of the sth to etth scan points of the i-th scan line in the point cloud to 0) and proceed to step 2.8; if the current line segment is not linear noise, the line segment does not need to be processed and is directly retained, and proceed to step 2.8.

[0136] Step 2.8, Reset the current line segment: Let st = j, et = j, and point_count = 1, indicating that the current scan point P will be reset. i,j After establishing it as the starting point of the new current line segment, proceed to step 2.12;

[0137] Step 2.9, determine whether invalid_point_count is greater than the invalid point count threshold UNR (in this embodiment, UNR = 3):

[0138] If so, proceed to step 2.10;

[0139] Otherwise, proceed to step 2.12;

[0140] Step 2.10, determine whether the current line segment is a suspected point-like noise line segment:

[0141] If so, the current line segment is a suspected point noise, the current line segment is represented as (i, st, et) and added to the suspected noise line segment set, and then proceed to step 2.11, where i represents the i-th scan line, st represents the starting scan point of the suspected point noise line segment, and et represents the ending scan point of the suspected point noise line segment.

[0142] Otherwise, determine whether the current line segment is linear noise. If the current line segment is linear noise, delete the sth to etth scan points of the i-th scan line in the point cloud (i.e., set all elements of the sth to etth scan points of the i-th scan line in the point cloud to 0) and proceed to step 2.11; if the current line segment is not linear noise, the line segment does not need to be processed and is directly retained, and proceed to step 2.11.

[0143] Step 2.11, Reset the current line segment: After setting st = -1, et = -1, point_count = 0, and invalid_point_count = 0, the current line segment is initialized, and then proceed to step 2.12;

[0144] Step 2.12, let j = j + 1, and determine whether j > N is true:

[0145] If so, proceed to step 2.13;

[0146] Otherwise, return to step 2.3;

[0147] Step 2.13, let i = i + 1, and determine whether i > L is true:

[0148] If so, output the current set of suspected noise line segments;

[0149] Otherwise, return to step 2.2.

[0150] In step 2.6, the process of determining whether the current scanned point belongs to the current line segment based on distance similarity is as follows:

[0151] Get the current scan point P i,j Compared to the previous valid scan point P of the current line segment i,j The distance ratio is Distance difference is

[0152] Let the distance ratio threshold be RR (in this embodiment, RR = 0.97) and the distance difference threshold be DR (in this embodiment, DR = 0.1m). Determine whether ratio_r < RR || ratio_r > 1 / RR and delta_r > DR are true:

[0153] If true, it means that the current scan point does not belong to the current line segment. Then add the current point to the current line segment, and let et = j, point_count = point_count + 1, and then jump to step 2.12.

[0154] If the condition is not met, it means that the current scan point belongs to the current line segment, and then jump directly to step 2.7.

[0155] In steps 2.7 and 2.10, the process of determining whether the current line segment is a suspected point-like noise line segment is as follows:

[0156] First, obtain the threshold for the number of point-like noise points:

[0157]

[0158] In the formula, PNR represents the threshold for the number of point noise points, and round(·) represents the rounding function. The limit function is represented by MaxN, which represents the upper limit (in this embodiment, MaxN = 6), and MinN, which represents the lower limit (in this embodiment, MinN = 2). Indicates distance At this point, if the arc length is LD, the horizontal angular resolution of the scanning point is Δθ, and the number of scanning points contained within the arc length range is, in this embodiment, LD = 0.15m, Δθ = 3.5mrad (0.2 degrees);

[0159] Determine if point_count < PNR is true:

[0160] If so, it indicates that the current line segment is a suspected point-like noise line segment;

[0161] Otherwise, it indicates that the current line segment is not a suspected point noise line segment.

[0162] In steps 2.7 and 2.10, the process of determining whether the current line segment is linear noise is specifically as follows:

[0163] Let LNR be the threshold for the number of linear noise points, and determine whether point_count < LNR (in this embodiment, LNR = 20) is true:

[0164] If so, the current line segment is a suspected linear noise point. The linear noise point recognition algorithm is used to identify the suspected linear noise point and determine whether it is a linear noise point.

[0165] Otherwise, the current line segment is not linear noise.

[0166] In the specific implementation process, the use of a linear noise recognition algorithm to identify the suspected linear noise is a conventional technical method in the field, so it will not be described in detail in this embodiment.

[0167] refer to Figure 3 The specific implementation of step 3 includes the following steps:

[0168] Step 3.1, obtain the set of suspected noise line segments NL = {s1, s2, ..., s} from Step 2. m}, where each suspected noise line segment is represented as (i, st, et);

[0169] Step 3.2, Initialize the core object collection It is an empty set;

[0170] Step 3.3: Based on adjacent reachable line segments, select the core objects from the set of suspected noisy line segments and add the core objects to the core object set Ω. The process is as follows:

[0171] Step 3.3.1, record s j = (i, st, et), For scan point P i,j Horizontal angle in the lidar spherical coordinate system;

[0172] Step 3.3.2, search for line segment s j Among the line segments on two adjacent scan lines of i-1 and / or i+1 (if i=1, the scan line of i-1 is not searched; if i=L, the scan line of i+1 is not searched), denote one of the line segments. like Then it means and For s j Adjacent reachable line segments, where (i′, st', et') represent line segments. Let be the line segment on the i′-th scan line between the starting point coordinates st' and the ending point coordinates et';

[0173] Step 3.3.3, based on step 3.3.2, obtain line segment s j The set of adjacent reachable line segments N(s) j ), determine the set N(s) j Is it true that the number of line segments is greater than 0?

[0174] If so, then line segment s j Add to the core object collection, i.e.: Ω = Ω ∪ {s} j};

[0175] Otherwise, determine the line segment s j To remove point-like noise, delete line segment s in the point cloud. j Corresponding scan points;

[0176] Step 3.3.4, repeat steps 3.3.2-3.3.3 until all suspected noise segments have been traversed;

[0177] Step 3.4, determine the core object set Is it true or false?

[0178] If so, then the process ends;

[0179] Otherwise, proceed to step 3.5;

[0180] Step 3.5: Select a core object o sequentially from the core object set Ω, and initialize the current cluster core object queue Ω. cur ={o}, initialize the current cluster sample set C = {o}, and update the core object set Ω = Ω - {o};

[0181] Step 3.6, determine the current cluster core object queue Ω cur Is it an empty set?

[0182] If so, proceed to step 3.7;

[0183] Otherwise, proceed to step 3.8;

[0184] Step 3.7, Current Cluster Core Object Queue This indicates that the current clustering is complete. Let MinPs be the minimum line segment number threshold. Determine whether the number of samples in the current cluster sample set C, |C|≥MinPs, holds true:

[0185] If so, it means that the point cloud in the line segment within the current cluster sample set C is not... Figure 4 If the indicated dotted noise is found, return to step 3.4;

[0186] Otherwise, it means that the point cloud in the line segment within the current cluster sample set C is Figure 4 For the point-like noise points shown, delete the scan points corresponding to the core object o in the point cloud (that is, set all elements in the s to et scan points of the i-th scan line in the point cloud to 0), and then return to step 3.4;

[0187] Step 3.8, Current Cluster Core Object Queue This indicates that the current clustering is not yet complete, so it is added to the current cluster core object queue Ω. cur Take a core object o' from the sample set, and denote the set of unvisited adjacent reachable line segments of o' as Δ = Ω ∩ N(o') (where N(o') is the set of adjacent reachable line segments of the core object o'). Then, the current cluster sample set C = C ∪ Δ, and update Ω. cur =Ω cur After updating Ω=Ω-Δ, return to step 3.6.

[0188] In step 3.7, the minimum line segment threshold MinPs can be dynamically set according to the different vertical angular resolutions of the LiDAR. For example, when the LiDAR has 16 lines and a vertical angular resolution of 2 degrees, the recommended value for MinPs is 3.

[0189] refer to Figure 5 The specific implementation of step 4 includes the following steps:

[0190] Step 4.1, obtain the set of suspected noisy line segments NL = {s1, s2, ..., s...} m}, where each suspected noise line segment is represented as (i, st, et);

[0191] Step 4.2: Traverse all points in the suspected noisy line segment (i, st, et) and compare them. The value of is denoted as the maximum value. The maximum value is indexed as m0, and the minimum value is... The minimum value index is n0;

[0192] Step 4.3: Calculate the projection distance pj_d of the origin (0, 0, 0) onto the spatial lines at indices m0 and n0, and the cosine value cos_v of the angle between the spatial lines at indices m0 and n0 and the spatial line between n0 and the origin. The process is as follows:

[0193] Calculate the normalized vector equation for the two points with indices m0 and n0:

[0194]

[0195]

[0196]

[0197]

[0198] norm_dx = dx / norm_v

[0199] norm_dy = dy / norm_v

[0200] norm_dy = dy / norm_v

[0201] In the formula, norm_dx is the x-direction projection of the normalized vector at the two points m0 and n0; norm_dy is the y-direction projection of the normalized vector at the two points m0 and n0; and norm_dz is the z-direction projection of the normalized vector at the two points m0 and n0.

[0202] The projection distance pj_d from the origin (0, 0, 0) onto the spatial line between points m0 and n0 is:

[0203]

[0204]

[0205]

[0206]

[0207] In the formula, px, pz are the projected coordinates of the origin (0, 0, 0) on the spatial straight line with subscripts m0 and n0, respectively;

[0208] Calculate the cosine of the angle cos_v between the spatial lines with indices m0 and n0 and the spatial line between n0 and the origin:

[0209]

[0210] Step 4.4: Let D0 be the maximum projection distance threshold and V0 be the minimum cosine of the included angle (in this embodiment, D0 = 0.5m and V0 = 0.9), and determine whether pj_d ≤ D0 and cos_v > V0 are true:

[0211] If so, it means the current line segment is Figure 6 The centripetal linear noise points shown are deleted from the point cloud by deleting the scan points corresponding to the line segments (i, st, et) (i.e., setting all elements of the s to et scan points in the i-th scan line to 0 in the point cloud), and then proceed to step 4.5.

[0212] Otherwise, proceed directly to step 4.5;

[0213] Step 4.5, repeat steps 4.2-4.4 until all suspected noise segments have been traversed.

[0214] refer to Figure 7 This embodiment also provides a terminal device including a transmitter, a receiver, a memory, and a processor. The transmitter is used to send instructions and data, the receiver is used to receive instructions and data, the memory is used to store computer-executed instructions, and the processor is used to execute the computer-executed instructions stored in the memory to implement the various steps performed by the LiDAR noise identification and filtering method in the above embodiment. Its specific implementation process is the same as the aforementioned LiDAR noise identification and filtering method.

[0215] It should be noted that the aforementioned memory can be either standalone or integrated with the processor. When the memory is set up independently, the terminal device also includes a bus for connecting the memory and the processor.

[0216] This embodiment also provides a computer-readable storage medium storing computer-executable instructions. When the processor executes the computer-executable instructions, it implements the lidar noise identification and filtering method executed by the terminal device described above.

[0217] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for noise identification and filtering in lidar, characterized in that, Includes the following steps: Step 1: Receive a frame of point cloud data acquired by the lidar, wherein the point cloud data has a number of scan lines and each scan line has a number of scan points; Step 2: For each scan line, perform line segment clustering based on distance similarity according to the scanning order, and mark the suspected noise line segments in each scan line to obtain a set of suspected noise line segments; Step 3: Cluster each suspected noise line segment in the suspected noise line segment set to obtain multiple targets, and delete the point noise corresponding to the targets containing fewer than the threshold line segments in the point cloud. Step 4: Calculate the straight line representation of the suspected noise line segment and determine whether it is a centripetal line, and delete the linear noise corresponding to the centripetal line in the point cloud.

2. The lidar noise identification and filtering method according to claim 1, characterized in that, Step 2 specifically includes: Step 2.1, let i = 1, where i represents the i-th scan line; Step 2.2, let j = 1, point_count = 0, invalid_point_count = 0, st = -1, et = -1, where j represents the j-th scan point on the i-th scan line, point_count represents the count of valid points in the current search segment, invalid_point_count represents the count of invalid points in the current search segment, st represents the coordinates of the starting point of the current search segment, and et represents the coordinates of the ending point of the current search segment; let P represents the j-th scan point on the i-th scan line. i,j The measured distance in the lidar spherical coordinate system, and Time scan point P i,j This is an invalid point; let L be the number of scan lines in the point cloud, and N be the number of scan points on the i-th scan line; Step 2.3, determine whether st < 0 is true: If so, proceed to step 2.4; Otherwise, proceed to step 2.5; Step 2.4, Determine Is it true or false? If so, create a new line segment for the current line segment, and set st = j, et = j, point_count = 1, invalid_point_count = 0, then proceed to step 2.12; Otherwise, proceed to step 2.12; Step 2.5, Determine Is it true or false? If so, proceed to step 2.6; Otherwise, set invalid_point_count = invalid_point_count + 1, and proceed to step 2.9; Step 2.6: Determine whether the current scanned point belongs to the current line segment based on distance similarity. If so, add the current point to the current line segment, and set et = j, point_count = point_count + 1, then proceed to step 2.12; Otherwise, proceed to step 2.7; Step 2.7, determine whether the current line segment is a suspected point-like noise line segment: If so, add the current line segment to the set of suspected noisy line segments and proceed to step 2.8; Otherwise, determine whether the current line segment is linear noise. If so, delete the s to et scan points in the i-th scan line in the point cloud and proceed to step 2.8; otherwise, proceed directly to step 2.

8. Step 2.8, Reset the current line segment: Let st = j, et = j, point_count = 1, take the current scan point as the starting point of the new current line segment, and proceed to step 2.12; Step 2.9, determine if invalid_point_count is greater than the invalid point threshold: If so, proceed to step 2.10; Otherwise, proceed to step 2.12; Step 2.10, determine whether the current line segment is a suspected point-like noise line segment: If so, add the current line segment to the set of suspected noisy line segments and proceed to step 2.11; Otherwise, determine whether the current line segment is linear noise. If so, delete the s to et scan points in the i-th scan line in the point cloud and proceed to step 2.11; otherwise, proceed directly to step 2.

11. Step 2.11, Reset the current line segment: Set st = -1, et = -1, point_count = 0, invalid_point_count = 0, initialize the current line segment, and proceed to step 2.12; Step 2.12, let j = j + 1, and determine whether j > N holds: If so, proceed to Step 2.13; Otherwise, return to Step 2.3; Step 2.13, let i = i + 1, and determine whether i > L holds: If so, output the current set of suspected noise line segments; Otherwise, return to Step 2.

2.

3. The lidar noise identification and filtering method according to claim 2, characterized in that, In Step 2.6, the specific method of determining whether the current scan point belongs to the current line segment according to the distance similarity is as follows: Obtain the distance ratio ratio_r and the distance difference delta_r between the current scan point and the previous valid scan point of the current line segment; Let the distance ratio threshold be RR and the distance difference threshold be DR, and determine whether ratio_r < RR || ratio_r > 1 / RR and delta_r > DR hold: If it holds, the current scan point does not belong to the current line segment; If it does not hold, the current scan point belongs to the current line segment.

4. The lidar noise identification and filtering method according to claim 2, characterized in that, In Steps 2.7 and 2.10, the specific method of determining whether the current line segment is a suspected punctate noise line segment is as follows: Obtain the threshold for the number of punctate noise points, which is: In the formula, PNR represents the threshold for the number of point noise points, and round(·) represents the rounding function. This represents the limit function, where MaxN represents the upper limit and MinN represents the lower limit. Indicates distance At a given location, if the arc length is LD and the horizontal angular resolution of the scan point is Δθ, the number of scan points contained within the arc length range is: Determine whether point_count < PNR holds: If so, the current line segment is a suspected punctate noise line segment; Otherwise, the current line segment is not a suspected punctate noise line segment.

5. The lidar noise identification and filtering method according to claim 2, characterized in that, In Steps 2.7 and 2.10, the specific method of determining whether the current line segment is a linear noise is as follows: Let LNR be the threshold for the number of linear noise points, and determine whether point_count < LNR holds: If so, the current line segment is a suspected linear noise. Use the linear noise recognition algorithm to identify this suspected linear noise and determine whether it is a linear noise; Otherwise, the current line segment is not a linear noise.

6. The lidar noise identification and filtering method according to any one of claims 1 to 5, characterized in that, Step 3 specifically includes: Step 3.1, obtaining a set of suspected noise line segments NL = {s1, s2, …, s m}, wherein each suspected noise line segment is represented as (i, st, et), i represents that the suspected noise line segment belongs to the ith scan line, st represents the start point coordinate of the suspected noise line segment on the ith scan line, and et represents the end point coordinate of the suspected noise line segment on the ith scan line; Step 3.2, Initialize the core object collection Step 3.3, based on adjacent reachable line segments, screen out the core objects in the set of suspected noise line segments, and add the core objects to the core object set; Step 3.4, determine the core object set Is it true or false? If so, end; Otherwise, proceed to Step 3.5; Step 3.5: Select a core object o sequentially from the core object set Ω, and initialize the current cluster core object queue Ω. cur ={o}, initialize the current cluster sample set C = {o}, and update the core object set Ω = Ω - {o}; Step 3.6, determine the current cluster core object queue Ω cur Is it an empty set? If so, proceed to Step 3.7; Otherwise, proceed to Step 3.8; Step 3.7, let MinPs be the threshold for the minimum number of line segments, and determine whether the number |C| of the current cluster sample set C ≥ MinPs holds: If so, return to Step 3.4; Otherwise, after deleting the scan points corresponding to the core object o in the point cloud, return to Step 3.4; Step 3.8, in the current cluster core object queue Ω cur Take a core object o′ from the sample set, and let Δ = Ω∩N(o′) be the set of unvisited remaining adjacent reachable line segments of o′. Then, the current cluster sample set C = C∪Δ, and update Ω. cur =Ω cur After updating Ω=Ω-Δ to ∪Δ-{o′}, return to step 3.

6.

7. The lidar noise identification and filtering method according to claim 6, characterized in that, Step 3.3 specifically includes: Step 3.3.1, record s j =(i,st,et), For scan point P i,j Horizontal angle in the lidar spherical coordinate system; Step 3.3.2, search for line segment s j For line segments on two adjacent scan lines of i-1 and / or i+1, denote one of the line segments. like Then it means and For s j Adjacent reachable line segments; Step 3.3.3, based on step 3.3.2, obtain line segment s j The set of adjacent reachable line segments N(s) j ), determine the set N(s) j Is it true that the number of line segments is greater than 0? If so, then line segment s j Add to the core object collection, i.e.: Ω = Ω ∪ {s} j }; Otherwise, determine the line segment s j To remove point-like noise, delete line segment s in the point cloud. j Corresponding scan points; Step 3.3.4, repeat Steps 3.3.2 - 3.3.3 until all suspected noise line segments are traversed.

8. The lidar noise identification and filtering method according to any one of claims 1 to 5, characterized in that, Step 4 specifically includes: Step 4.1, obtain the set of suspected noisy line segments NL = {s1, s2, ..., s m }, where each suspected noise line segment is represented as (i, st, et), where i indicates that the suspected noise line segment belongs to the i-th scan line, st indicates the starting coordinate of the suspected noise line segment on the i-th scan line, and et indicates the ending coordinate of the suspected noise line segment on the i-th scan line; let P represents the j-th scan point on the i-th scan line. i,j The measured distance in the lidar spherical coordinate system, and Time scan point P i,j Invalid point; let These represent the scan points P respectively. i,j Coordinates of the lidar in the Cartesian coordinate system; Step 4.2: Traverse all points in the suspected noisy line segment (i, st, et) and compare them. The value of st≤j≤et is denoted as the maximum value. The maximum value is indexed as m0, and the minimum value is... The minimum value index is n0; Step 4.3, calculate the projection distance pj_d of the origin (0, 0, 0) on the spatial straight line of the two points with subscripts m0 and n0, and the cosine value cos_v of the included angle between the spatial straight line of the two points with subscripts m0 and n0 and the spatial straight line of n0 and the origin; Step 4.4, let D0 be the maximum projection distance threshold and V0 be the minimum cosine value of the included angle, and determine whether pj_d ≤ D0 and cos_v > V0 hold: If so, after deleting the scan points corresponding to the line segment (i, st, et) in the point cloud, proceed to Step 4.5; Otherwise, proceed to Step 4.5; Step 4.5, repeat Steps 4.2 - 4.4 until all suspected noise line segments are traversed.

9. A terminal device, characterized in that, Includes: A memory for storing programs; A processor is configured to execute the program stored in the memory, wherein when the program is executed, the processor is configured to perform the lidar noise identification and filtering method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions; when executed by a processor, the computer-executable instructions are used to implement the lidar noise identification and filtering method as described in any one of claims 1 to 8.