Rainy-day noise-robust detection of a laser-radar vehicle compartment boundary
By employing 3D orthogonal projection dimensionality reduction and robust fitting algorithms, the problem of poor robustness in lidar vehicle boundary detection under high dynamic precipitation environments was solved, achieving high-precision, real-time robust detection of vehicle boundaries.
Patent Information
- Application Number
- CN202610754693.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-25
AI Technical Summary
In highly dynamic precipitation environments, lidar detection of vehicle boundaries is not robust, and existing technologies struggle to effectively distinguish between the actual vehicle boundary and rain/fog noise, leading to vehicle boundary positioning drift or detection failure.
The system employs a technical architecture that combines three-dimensional orthogonal projection dimensionality reduction, one-dimensional sliding window density extremum search, and robust fitting. By acquiring the raw point cloud data of the lidar under rainy conditions, it performs noise-resistant preprocessing, orthogonal projection dimensionality reduction, density statistics, and boundary fitting to determine the candidate regions for the left and right boundaries of the carriage and output the centerline of the carriage.
Robust, real-time, and high-precision detection of carriage boundaries under highly dynamic precipitation conditions has been achieved, reducing computational complexity, suppressing noise interference, and improving the reliability and accuracy of detection.
Smart Images

Figure CN122632278A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lidar sensing technology, and in particular to a lidar robust detection method and system for vehicle boundary that is resistant to noise interference in rainy weather. Background Technology
[0002] In intelligent transportation and autonomous driving scenarios, LiDAR, as a core perception sensor, is widely used in tasks such as vehicle boundary detection. Existing technologies typically rely on geometric feature extraction from 3D point clouds or deep learning models for vehicle contour recognition. However, in highly dynamic precipitation environments, raindrop scattering and absorption of the laser beam lead to significant random outlier noise and intensity attenuation in the point cloud data. Simultaneously, specular reflection from slippery surfaces introduces multipath artifacts, making it difficult for traditional detection algorithms based on geometric continuity or fixed thresholds to effectively distinguish the real vehicle boundary from rain and fog noise, resulting in vehicle boundary drift or even detection failure. Therefore, a method is urgently needed to address the poor robustness of existing technologies for vehicle boundary detection in highly dynamic precipitation environments. Summary of the Invention
[0003] This application provides a robust method and system for detecting carriage boundaries using lidar in response to noise interference during rainy weather, which solves the technical problem of poor robustness of existing technologies in carriage boundary detection under high dynamic precipitation environments.
[0004] To achieve the above objectives, this application adopts the following technical solution: Firstly, a robust detection method for the boundary of a vehicle using lidar to resist noise interference in rainy weather is provided, comprising: acquiring raw point cloud data collected by lidar under rainy conditions; wherein the raw point cloud data includes vehicle point cloud, ground point cloud, raindrop noise point cloud, and multipath reflection noise point cloud; performing noise reduction preprocessing on the raw point cloud data to obtain purified point cloud data; performing orthogonal projection dimensionality reduction processing on the purified point cloud data to obtain a two-dimensional projection point set; and performing density statistics on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence; wherein the sliding window is along the width of the vehicle. The system moves in a direction and counts the number of point cloud clusters in each sliding window; it performs density extremum search on the one-dimensional density distribution sequence to determine candidate regions for the left and right boundaries of the carriage; the candidate regions for the left and right boundaries of the carriage are the left and right main peak regions in the density distribution sequence, respectively; based on a robust fitting algorithm, it performs boundary line fitting on the candidate regions for the left and right boundaries of the carriage to obtain the left boundary line and the right boundary line of the carriage; based on the left boundary line and the right boundary line of the carriage, it determines the center line of the carriage and outputs the carriage boundary detection results.
[0005] In conjunction with the first aspect mentioned above, in one possible implementation, noise-reducing preprocessing is performed on the original point cloud data to obtain purified point cloud data. This includes: filtering the original point cloud data based on a preset reflection intensity threshold to remove low-reflection noise points with reflection intensities below the preset threshold, thus obtaining an initial filtered point cloud; calculating the corresponding local distance statistical features based on the spatial neighborhood distribution of each point in the initial filtered point cloud, and removing outliers that deviate from the average spatial distribution based on the local distance statistical features, thus obtaining point cloud data after outlier removal; performing ground plane fitting on the point cloud data after outlier removal using a random sampling consensus algorithm to obtain a corresponding ground plane model; identifying and stripping the ground point cloud based on the ground plane model, retaining the target point cloud data located above the ground plane, thus obtaining purified point cloud data.
[0006] In conjunction with the first aspect mentioned above, in one possible implementation, the purified point cloud data is subjected to orthogonal projection dimensionality reduction processing to obtain a two-dimensional projection point set, including: obtaining the spatial coordinate information corresponding to each point in the purified point cloud data; using the horizontal plane as the target projection plane, orthogonally projecting the purified point cloud data along the elevation direction to eliminate the elevation coordinate information of each point while retaining the horizontal coordinate information, thereby obtaining the corresponding two-dimensional projection points; and performing planar mapping and coordinate reconstruction on all two-dimensional projection points to form the corresponding two-dimensional projection point set.
[0007] In conjunction with the first aspect mentioned above, in one possible implementation, the point cloud on the side wall of the carriage, which is part of the two-dimensional projection point set, forms a linear high-density distribution region, while random raindrop noise points form a discrete low-density distribution region.
[0008] In conjunction with the first aspect mentioned above, in one possible implementation, density statistics are performed on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence. This includes: determining the carriage width direction in the two-dimensional projection point set and establishing a sliding window along the carriage width direction; setting the window width and movement step size of the sliding window and controlling the sliding window to move sequentially along the carriage width direction; during each movement of the sliding window, counting the number of two-dimensional projection points contained in the current sliding window to obtain the corresponding position density value; arranging the position density values according to the movement order of the sliding window to generate the corresponding one-dimensional density distribution sequence; wherein, the one-dimensional density distribution sequence is used to characterize the point cloud aggregation distribution of the two-dimensional projection point set in the carriage width direction.
[0009] In conjunction with the first aspect mentioned above, in one possible implementation, a density extremum search is performed on the one-dimensional density distribution sequence to determine candidate regions for the left and right boundaries of the carriage. This includes: performing extremum detection on the density values at each location in the one-dimensional density distribution sequence to determine the corresponding local density peak regions; selecting the main peak regions located on the left and right sides of the carriage as candidate regions for the left and right boundaries of the carriage based on the window positions corresponding to each local density peak region; calculating the center position or inner edge position corresponding to each candidate region for the left and right boundaries of the carriage to obtain the corresponding candidate points for the left and right boundaries; and determining the spatial range of the candidate regions for the left and right boundaries of the carriage based on the candidate points for the left and right boundaries.
[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the spatial range of the candidate regions for the left and right boundaries of the carriage is determined based on the candidate points for the left and right boundaries, including: using the candidate points for the left and right boundaries as the center points of the regions respectively; extracting the corresponding neighborhood point set from the two-dimensional projection point set according to the preset boundary search range; and generating the corresponding candidate regions for the left and right boundaries of the carriage based on the distribution range of the neighborhood point set along the length of the carriage.
[0011] In conjunction with the first aspect mentioned above, in one possible implementation, a robust fitting algorithm is used to fit boundary lines to the candidate regions of the left and right boundaries of the carriage, respectively, to obtain the left boundary line and the right boundary line of the carriage. This includes: obtaining two-dimensional projection points in the candidate regions of the left and right boundaries respectively; using a random sampling consensus algorithm to iteratively fit the two-dimensional projection points in the candidate regions of the left and right boundaries respectively to the two-dimensional projection points in the candidate regions of the left and right boundaries respectively; in each iterative fitting process, determining the corresponding set of interior points according to a preset distance threshold and counting the number of interior points; determining the line model with the number of interior points satisfying the preset condition as the target boundary line model of the corresponding region; and outputting the corresponding left boundary line and right boundary line of the carriage according to the target boundary line model.
[0012] In conjunction with the first aspect mentioned above, in one possible implementation, the centerline of the carriage is determined based on the straight lines of the left and right boundaries of the carriage, and the carriage boundary detection results are output. This includes: calculating the carriage centerline based on the equidistant center positions between the straight lines of the left and right boundaries of the carriage; constructing a carriage boundary model based on the spatial position parameters corresponding to the straight lines of the left and right boundaries of the carriage and the carriage centerline; and outputting the carriage boundary detection results corresponding to the carriage boundary model.
[0013] Secondly, a robust lidar-based vehicle boundary detection system resistant to rain noise interference is provided. The system includes: a data acquisition module, a noise reduction preprocessing module, a projection dimensionality reduction module, a density statistics module, a boundary search module, a boundary fitting module, and a boundary output module. The data acquisition module acquires raw point cloud data collected by lidar under rainy conditions. This raw point cloud data includes vehicle point clouds, ground point clouds, raindrop noise point clouds, and multipath reflection noise point clouds. The noise reduction preprocessing module performs noise reduction preprocessing on the raw point cloud data to obtain purified point cloud data. The projection dimensionality reduction module further refines the purified point cloud data. The system performs orthogonal projection dimensionality reduction to obtain a two-dimensional projection point set; a density statistics module performs density statistics on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence; a boundary search module performs density extremum search on the one-dimensional density distribution sequence to determine candidate regions for the left and right boundaries of the carriage; a boundary fitting module performs boundary line fitting on the candidate regions for the left and right boundaries of the carriage based on a robust fitting algorithm to obtain the left boundary line and the right boundary line of the carriage; and a boundary output module determines the center line of the carriage based on the left boundary line and the right boundary line of the carriage and outputs the carriage boundary detection results.
[0014] This application provides a robust lidar method and system for detecting vehicle boundaries in rainy weather, employing a technical architecture of 3D orthogonal projection dimensionality reduction, one-dimensional sliding window density extremum search, and robust fitting. This transforms the complex 3D vehicle boundary detection problem into an efficient one-dimensional signal processing problem. On one hand, orthogonal projection preserves the lateral geometric contour features of the vehicle sidewalls while compressing the 3D search space into a 2D plane, reducing computational complexity. On the other hand, the point cloud density statistics within the sliding window naturally constitute a low-pass filter for sparse random noise in rainy weather. Raindrop noise exhibits a discrete low-density distribution on the projection surface, while the vehicle sidewalls, due to their vertical structure, present linear high-density clusters; the two are separable in the density domain. Based on this, the RANSAC robust fitting algorithm is used to estimate the linear model of the candidate boundary region, effectively suppressing the perturbation of model parameters by residual outliers and avoiding the fitting divergence of the traditional least squares method under low signal-to-noise ratio conditions. Robust, real-time, and high-precision detection of vehicle boundaries under highly dynamic precipitation environments is achieved without relying on additional sensors or large-scale training data.
[0015] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0016] Figure 1 A system architecture diagram of a robust lidar vehicle boundary detection system resistant to rain noise interference provided in this application embodiment; Figure 2 A flowchart illustrating a robust lidar method for detecting vehicle boundaries against noise interference in rainy weather, provided in an embodiment of this application; Figure 3 A flowchart illustrating another robust lidar-based vehicle boundary detection method for resisting rain noise interference provided in an embodiment of this application; Figure 4 A flowchart illustrating another robust lidar-based vehicle boundary detection method for resisting rain noise interference provided in an embodiment of this application; Figure 5 A flowchart illustrating another robust lidar-based vehicle boundary detection method for resisting rain noise interference provided in an embodiment of this application; Figure 6 A flowchart illustrating another robust lidar-based vehicle boundary detection method for resisting rain noise interference provided in an embodiment of this application; Figure 7 A flowchart illustrating another robust lidar-based vehicle boundary detection method for resisting rain noise interference provided in an embodiment of this application; Figure 8 The original point cloud image of the carriage collected by lidar in a rainy environment is provided in the embodiments of this application; Figure 9 This is a two-dimensional projection result image provided by an embodiment of this application after noise reduction preprocessing and orthogonal projection dimensionality reduction; Figure 10 The image shows the results of the carriage boundary detection after sliding window density statistics, density extreme value search, and robust fitting, as provided in the embodiments of this application. Detailed Implementation
[0017] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0018] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0019] The robust lidar detection method for vehicle boundary against rain noise interference provided in this application embodiment can be applied to, for example... Figure 1 The illustrated robust lidar detection system for vehicle boundaries, resistant to rain and noise interference, is as follows: Figure 1 As shown, the system includes: a data acquisition module 101, a noise reduction preprocessing module 102, a projection dimensionality reduction module 103, a density statistics module 104, a boundary search module 105, a boundary fitting module 106, and a boundary output module 107. The system includes the following modules: a data acquisition module 101, which acquires raw point cloud data collected by lidar in rainy conditions; the raw point cloud data includes carriage point cloud, ground point cloud, raindrop noise point cloud, and multipath reflection noise point cloud; an anti-noise preprocessing module 102, which performs anti-noise preprocessing on the raw point cloud data to obtain purified point cloud data; a projection dimensionality reduction module 103, which performs orthogonal projection dimensionality reduction on the purified point cloud data to obtain a two-dimensional projection point set; a density statistics module 104, which performs density statistics on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence; a boundary search module 105, which performs density extreme value search on the one-dimensional density distribution sequence to determine the candidate regions for the left and right boundaries of the carriage; a boundary fitting module 106, which performs boundary line fitting on the candidate regions for the left and right boundaries of the carriage based on a robust fitting algorithm to obtain the left boundary line and the right boundary line of the carriage; and a boundary output module 107, which determines the center line of the carriage based on the left boundary line and the right boundary line of the carriage and outputs the carriage boundary detection results.
[0020] To address the technical problem of poor robustness of existing technologies for detecting carriage boundaries under high-dynamic precipitation environments, this application provides a robust lidar method for detecting carriage boundaries resistant to noise interference in rainy weather. Figure 2 This is a flowchart illustrating the robust detection method for lidar vehicle boundary against rain noise interference provided in the embodiments of this application, as shown below. Figure 2 As shown, the method includes: S201. Acquire raw point cloud data collected by lidar in rainy weather.
[0021] The raw point cloud data refers to the set of three-dimensional discrete points generated by the lidar sensor scanning the target scene under precipitation weather conditions. It not only contains useful signals characterizing the physical structure of the vehicle body, but also includes unstructured interference signals introduced by factors such as raindrop scattering and specular reflection from the wet road surface. The raw point cloud data includes vehicle body point cloud, ground point cloud, raindrop noise point cloud, and multipath reflection noise point cloud.
[0022] In this embodiment, the system can collect environmental data in real time using vehicle-mounted or roadside-installed mechanical rotating, semi-solid-state, or pure solid-state LiDAR devices. The collection frequency can be flexibly configured according to the application scenario requirements. Considering the special characteristics of rainy weather, the acquired raw point cloud data usually exhibits a dynamic change in signal-to-noise ratio. That is, the point cloud inside the vehicle may experience local missing parts or intensity attenuation due to rain obstruction. At the same time, randomly distributed raindrop noise points and ground multipath reflection artifacts intertwine with the real target in three-dimensional space, forming a complex mixed data field. In addition, the data acquisition process can also simultaneously record multi-dimensional attribute information such as reflection intensity and echo count, providing data support for subsequent differentiated processing.
[0023] S202. Perform noise reduction preprocessing on the original point cloud data to obtain purified point cloud data.
[0024] Among them, noise reduction preprocessing refers to the data cleaning process that uses multi-level cascaded or adaptive strategies to remove invalid interference components and retain the geometric features of the carriage, taking into account the unique noise physical properties of rainy point clouds.
[0025] In this embodiment, the system can design a multi-level purification pipeline based on the differences between raindrops and targets in the vehicle compartment in terms of reflectivity, spatial continuity, and geometric shape. For example, it can first use the differences in physical properties to eliminate abnormal points that are obviously not solid targets, then identify and remove outlier noise points based on local spatial statistical laws, and finally combine prior knowledge of scene geometry to separate ground and non-ground targets.
[0026] It should be noted that the core of this step lies in purification rather than simple deletion. Under the low signal-to-noise ratio conditions of rainy weather, overly aggressive filtering may lead to the accidental deletion of already sparse edge points of the carriage. Therefore, the noise-reducing preprocessing must seek a dynamic balance between noise reduction intensity and feature preservation, and its performance directly determines the upper limit of subsequent boundary detection.
[0027] Based on the above steps, targeted noise reduction preprocessing reduces the data redundancy and interference level of subsequent calculations, making the geometric structure of the carriage, which was originally submerged in noise, visible, and providing a reliable data foundation for high-precision boundary extraction.
[0028] S203. Perform orthogonal projection dimensionality reduction processing on the purified point cloud data to obtain a two-dimensional projection point set.
[0029] Orthogonal projection dimensionality reduction refers to the geometric transformation operation that maps the coordinates of point clouds in three-dimensional space to a two-dimensional plane along a specific axis. Its purpose is to eliminate redundant information in the elevation dimension and transform the three-dimensional spatial problem into a planar analysis problem.
[0030] In this embodiment, the system typically selects a horizontal plane as the projection reference plane and projects the purified 3D point cloud vertically along the gravity direction or the Z-axis direction, so that the elevation coordinates of all points are ignored or normalized, and only the position information in the (X, Y) plane is retained. After projection, the 2D points can be rasterized or the coordinates resampled to optimize the subsequent data structure.
[0031] It should be noted that orthogonal projection is suitable for carriage boundary detection because the carriage sidewalls are physically approximately perpendicular to the ground, and their projections on the horizontal plane naturally converge into high-density lines. In contrast, raindrop noise is randomly distributed in three-dimensional space and remains discrete and sparse after projection. This difference in geometric characteristics is amplified rather than lost during dimensionality reduction, which is the physical foundation for this scheme to utilize density differences for noise reduction.
[0032] Based on the above steps, this step transforms the three-dimensional geometric detection problem into a two-dimensional pattern recognition problem, which greatly reduces the computational complexity and memory consumption of the algorithm. At the same time, it uses projection transformation to enhance the separability of the target and noise, achieving a dual improvement in computational efficiency and feature saliency.
[0033] S204. Perform density statistics on the two-dimensional projection point set based on the sliding window to obtain the corresponding one-dimensional density distribution sequence.
[0034] The sliding window is a local observation area that moves along a specified direction at a preset step size, while density statistics is an operator that quantifies the number of point clouds within that area. The combination of these two methods compresses the two-dimensional spatial distribution into a one-dimensional signal sequence. The sliding window moves along the width of the carriage, and the number of point cloud clusters within each sliding window is counted.
[0035] In this embodiment, the system first determines the width direction of the carriage as the scanning axis, and then sets the width, height, and movement step size parameters of the window. During the scanning process, the window sequentially covers different lateral positions on the two-dimensional projection plane, and calculates the number of points or weighted density values falling into the window in real time. These density values arranged in positional order constitute a one-dimensional density distribution sequence.
[0036] It should be noted that the sliding window mechanism itself constitutes a low-pass filter in the spatial domain. Since the sidewalls of the carriage have a certain physical width on the projected surface, their corresponding density peaks have a certain bandwidth, while the density fluctuations caused by raindrop noise are typically high-frequency and narrow-band. By appropriately setting the window width, the main peaks of the carriage can be preserved while smoothing out the spikes caused by random noise. This is the key noise reduction mechanism by which this solution further transforms the 2D problem into 1D signal processing.
[0037] Based on the above steps, by using sliding window density statistics, the complex two-dimensional spatial search problem is successfully simplified into a one-dimensional signal peak detection problem. This not only improves the processing speed, but also utilizes the integral effect to naturally suppress the interference of sparse random noise, thereby enhancing the robustness of boundary localization.
[0038] S205. Perform density extremum search on the one-dimensional density distribution sequence to determine candidate regions for the left and right boundaries of the carriage.
[0039] Density extremum search refers to the algorithmic process of identifying local or global maximum values and their neighborhood ranges in a one-dimensional sequence. Boundary candidate regions are regions of interest that are mapped back from the signal domain to the spatial domain. The left and right boundary candidate regions of the carriage are the left and right main peak regions in the density distribution sequence, respectively.
[0040] In this embodiment, the system can locate significant peaks in the density sequence using various methods such as derivative zero-crossing detection, threshold truncation, non-maximum suppression, or waveform matching. After determining the peak position, instead of using a single point as the boundary, a continuous interval containing the main body of the peak is defined as a candidate region based on the peak width, gradient change, or a preset extension range. This region spatially corresponds to the potential location range of the carriage sidewall. The search strategy can be a global search or a local tracking search based on historical frame prediction to adapt to positional changes caused by the relative motion of the vehicle.
[0041] It's important to note that selecting candidate regions rather than single boundary points as output is to provide sufficient sample support for subsequent fitting steps. Under rainy conditions with noise interference, the center of density peaks may shift slightly due to noise superposition; relying solely on a single point can easily introduce errors. By extracting regions containing the complete peak shape, the statistical characteristics of all points within the region can be used to correct this shift, improving the accuracy of the final boundary.
[0042] Based on the above steps, through density extremum search and region expansion, a precise association from abstract one-dimensional signal features to specific two-dimensional spatial entities is achieved. This ensures the speed of boundary positioning and absorbs positioning jitter caused by noise through regionalization strategy, thereby improving the system's fault tolerance.
[0043] S206. Based on the robust fitting algorithm, the candidate regions of the left and right boundaries of the carriage are fitted with boundary lines to obtain the left boundary line and the right boundary line of the carriage.
[0044] Among them, robust fitting algorithm refers to a robust regression method that can automatically identify and reduce the weight of outliers during the model parameter estimation process. Its goal is to obtain a geometric model that is not dominated by residual noise.
[0045] In this embodiment, the system employs an iterative robust estimation algorithm to solve the linear model for the two-dimensional projection points within the candidate regions of the left and right boundaries. The core idea of the algorithm is to find the linear parameters that can explain the most data points or minimize the weighted residuals through random sampling or weighted iteration. In addition to the classic random sample consensus algorithm, methods such as least squares, M-estimation, or asymptotic sample consensus can also be used. Prior knowledge such as direction constraints or length constraints can also be introduced during the fitting process to further improve the model's convergence speed and stability.
[0046] It should be noted that in rainy conditions, even after the aforementioned multiple processing steps, a small amount of high-intensity rain noise or multipath artifacts may still be mixed in within the candidate region. Traditional least squares methods treat all points equally, making them highly susceptible to being skewed by these outliers. In contrast, robust fitting algorithms, through an interior point screening mechanism, essentially construct a model-level outlier filter, ensuring that the final output straight line equation is determined only by interior points representing the actual carriage walls.
[0047] Based on the above steps, by introducing a robust fitting mechanism, the destructive effect of residual noise on geometric modeling is effectively overcome, enabling the output of high-confidence carriage boundary straight lines even under adverse weather conditions.
[0048] S207. Determine the center line of the carriage based on the straight lines of the left and right boundaries of the carriage, and output the carriage boundary detection results.
[0049] Among them, the center line of the carriage is a virtual reference line derived from the geometric symmetry relationship of the straight lines on both sides, and the carriage boundary detection result is a structured output data containing the complete carriage topology.
[0050] In this embodiment, after obtaining the equations of the left and right boundary lines, the system first calculates the equidistant center positions between the two lines to generate the car centerline. The angle bisectors of two parallel or approximately parallel lines can be directly solved using analytical geometric formulas, or the centerline can be obtained by refitting after calculating the midpoints at multiple discrete points. The system integrates the spatial position parameters of the left and right boundary lines and the car centerline to construct a complete car boundary model. This model not only includes the equation coefficients of the three key lines but also derives advanced semantic information such as car width and heading angle. Finally, this model is output as a standardized detection result. It should be understood that the calculation method for the centerline is not limited to strict mathematical equidism; in cases of car deformation or asymmetry, it can also be a weighted center or geometric principal axis.
[0051] It's important to note that introducing the centerline of the carriage is not only for navigation reference but also a means of verifying geometric consistency. Ideally, the centerline should coincide with the longitudinal axis of the carriage and be parallel to both side boundaries. If the calculated centerline shows abnormal distortion or is not parallel to the boundaries, it indicates a potential error in boundary fitting, allowing the system to trigger a re-check or alarm mechanism. This self-verification capability based on geometric constraints provides a system-level safety guarantee that simply outputting two side lines lacks.
[0052] Based on the above steps, the centerline is generated and a complete boundary model is constructed by using bilateral boundary symmetry constraints. This not only provides rich structured output information, but also enhances the reliability and verifiability of the detection results by utilizing geometric intrinsic consistency, thus achieving a technological leap from simple boundary perception to complete carriage topology reconstruction.
[0053] This application embodiment decomposes the complex 3D perception problem of rainy carriage boundary detection into standardized sub-tasks such as data purification, dimensional compression, signal extraction, robust modeling and geometric verification. Each step is designed with a special defense mechanism for rainy noise characteristics, thereby achieving all-weather, highly robust and accurate carriage boundary perception without relying on expensive additional sensors.
[0054] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 3 As shown, the above S202 can be specifically implemented through the following S301 to S304, which are explained in detail below: S301. Based on a preset reflection intensity threshold, the original point cloud data is filtered to remove low-reflection noise points with reflection intensity lower than the preset reflection intensity threshold, thus obtaining the initial filtered point cloud.
[0055] The preset reflection intensity threshold is a discrimination threshold set based on the amplitude of the lidar echo signal. Its physical basis is that the scattering and absorption of the laser beam by raindrops causes its echo intensity to be significantly lower than that of solid targets such as car bodies. This difference in physical properties can be used to achieve rapid initial screening of most rain noise.
[0056] In this embodiment, the system can employ a fixed threshold or an adaptive dynamic threshold strategy for intensity screening. For example, the threshold can be dynamically adjusted based on real-time collected ambient background noise levels or feedback from rain intensity sensors to balance the denoising rate and the false rejection rate. In addition to a single global threshold, regional thresholds, distance-based attenuation compensation thresholds, or joint determination of multiple echo intensities can also be used.
[0057] It should be noted that intensity screening is placed first in the preprocessing workflow because it has the lowest computational complexity and can remove the largest proportion of invalid data. If this step is placed later, a large amount of low-intensity rain noise will participate in subsequent complex statistical or geometric calculations, which will not only waste computing power, but may also interfere with the convergence of statistical algorithms or the fitting accuracy of geometric models due to excessive noise density.
[0058] As an example, in a typical moderate rain scenario, the system can set the reflection intensity threshold to between 20 and 30 (the specific value depends on the radar model and calibration parameters), and mark points with intensity below this range as suspected rain noise and remove them.
[0059] S302. Calculate the corresponding local distance statistical features based on the spatial neighborhood distribution of each point in the initial filtered point cloud, and remove outliers that deviate from the average spatial distribution according to the local distance statistical features to obtain the point cloud data after outlier removal.
[0060] Among them, local distance statistical features refer to quantitative indicators that describe the spatial density between a point and its surrounding neighboring points, such as the average distance of k-nearest neighbors, local point density, or eigenvalues of the covariance matrix. Its mathematical meaning is that the real carriage point cloud has spatial continuity, while the residual raindrop noise exhibits a random discrete distribution, and the two have significant differences in local statistical characteristics.
[0061] In this embodiment, the system can employ various algorithms, such as statistical outlier removal, radius-based outlier removal, or voxel-based outlier detection, to implement this step. For example, the average distance and standard deviation of each point within its neighborhood can be calculated, and points exceeding the global mean by several times the standard deviation can be identified as outliers. Alternatively, a fixed radius can be set directly, and isolated points within the sphere with fewer than a threshold number of points can be counted. This strategy does not rely on specific intensity attributes but is purely based on spatial topological relationships, thus effectively eliminating high-intensity but spatially isolated artifact noise caused by specular reflection or multipath effects, compensating for the shortcomings of simple intensity screening.
[0062] Based on the above steps, by introducing spatial statistics methods to analyze the local topology of the point cloud, unstructured outlier noise that intensity screening cannot handle is accurately eliminated, and the spatial continuity characteristics of the target point cloud in the carriage are further purified.
[0063] S303. The random sampling consensus algorithm is used to fit the ground plane of the point cloud data after outlier removal to obtain the corresponding ground plane model.
[0064] Among them, the random sampling consensus algorithm is a robust method for estimating mathematical model parameters by iteratively sampling a subset of random samples. Its core logic is to find the planar model that can be supported by the most data points through repeated assumptions and verifications, thereby automatically ignoring outliers that do not conform to the planar assumptions. It is particularly suitable for scenarios where wet and slippery roads in rainy weather have water reflections or multipath artifacts that cause impure ground point clouds.
[0065] In this embodiment, when performing plane fitting, the system can employ improved variants such as MSAC, MLESAC, or progressive sampling consistency, in addition to the classic RANSAC algorithm, to improve fitting speed or noise tolerance. During the fitting process, vehicle attitude information or historical frame ground parameters are used as prior constraints to reduce the parameter search space.
[0066] It is important to note that ground fitting must be performed after statistical filtering. This is because if a large number of spatial outliers remain in the point cloud, they may be missampled as support points by the RANSAC algorithm, causing the fitted plane to be tilted or shifted. Only after the first two rounds of cleaning and when the overall quality of the point cloud is high can RANSAC quickly converge to the correct ground model, ensuring the accuracy of the stripping operation.
[0067] S304. Identify and peel off the ground point cloud based on the ground plane model, and retain the target point cloud data located above the ground plane to obtain the purified point cloud data.
[0068] Ground stripping refers to using a fitted planar model as a spatial segmentation interface, comparing the distance of all points to the plane with a preset tolerance, classifying points located below or close to the plane as ground points and removing them, and only retaining points above the plane as potential carriages or other obstacle targets.
[0069] In this embodiment, the system can set a safety height margin when performing the stripping operation to avoid accidental deletion of bottom edge points of the carriage due to ground undulations or fitting errors. In addition to simple planar distance determination, a secondary verification can be performed by combining the normal vector direction of the point or the local curvature to ensure that the retained points do indeed belong to vertical or convex structures.
[0070] Based on the above steps, the ground interference and the target in the carriage were completely decoupled through spatial segmentation based on the geometric model, and high-purity purified point cloud data was output. This solved the problem of low noise caused by the multipath effect on wet and slippery roads in rainy weather, and ensured the input quality of subsequent boundary detection algorithms.
[0071] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 4 As shown, the above S203 can be specifically implemented through the following S401 to S403, which are explained in detail below: S401. Obtain the spatial coordinate information corresponding to each point in the purified point cloud data.
[0072] Spatial coordinate information refers to the set of values describing the position of each discrete point in the point cloud in a three-dimensional Cartesian coordinate system. It usually contains three components: X, Y, and Z, which respectively represent the absolute or relative position of the point in the length, width, and elevation directions. It is the original data basis for performing subsequent geometric transformations.
[0073] In this embodiment, the system directly reads the coordinate array of the purified point cloud data in batches from the memory buffer or the output interface of the preprocessing module, or it can extract the coordinates in real time by parsing the position field in the original LiDAR data packet. In addition to the basic three-dimensional position coordinates, the acquired information may also include auxiliary attributes such as point reflection intensity, echo sequence number, and timestamp. Although these attributes do not directly participate in geometric projection, they can be used for weighting or verification in subsequent processing. The coordinate system can be the LiDAR's own sensor coordinate system, or it can be the vehicle body coordinate system or the world coordinate system after calibration transformation; this embodiment does not limit this.
[0074] Based on the above steps, by fully acquiring and verifying the spatial location information of each point, accurate and reliable data input is provided for subsequent geometric transformations, ensuring that the projection results can truly reflect the original distribution of the carriage and noise in three-dimensional space.
[0075] S402. Using the horizontal plane as the target projection plane, orthogonally project the purified point cloud data along the elevation direction, eliminate the elevation coordinate information of each point, retain the horizontal coordinate information, and obtain the corresponding two-dimensional projection points.
[0076] Orthogonal projection is a parallel projection method in which the projection lines are perpendicular to the projection plane. In this step, it specifically refers to compressing the three-dimensional point cloud vertically along the direction of gravity or the Z-axis to the XY horizontal plane, so that the elevation differences of all points are ignored and only their planar positions on the horizontal plane are retained, thereby flattening the three-dimensional spatial structure into a two-dimensional planar pattern.
[0077] In this embodiment, when the system performs orthogonal projection, the most direct approach is to set the Z-coordinates of all points to zero or discard them, retaining only the X and Y coordinates as position parameters of the two-dimensional projection points. If the lidar is installed at an angle or the vehicle itself is on a slope, the system can first calculate the rotation matrix based on attitude sensor data or ground fitting results, transform the point cloud to an intermediate coordinate system parallel to the horizontal plane, and then perform the Z-axis discarding operation to ensure that the projection surface is truly horizontal. Furthermore, the projection process can also be a weighted projection, that is, assigning different weights based on the height or intensity of the points, so that the projected points not only carry positional information but also implicitly contain height confidence. It should be understood that regardless of the specific mathematical transformation used, the core purpose is to map the vertically distributed sidewalls of the vehicle in three-dimensional space into a linear aggregated structure on a two-dimensional plane, while simultaneously mapping the randomly suspended raindrop noise in three-dimensional space into discrete background points on a two-dimensional plane. This morphological difference is the physical basis for the density statistics noise reduction method of this scheme: due to the geometric characteristics of the side wall of the carriage being perpendicular to the ground, all the points of all height layers are superimposed on the same line under orthogonal projection, forming a linear cluster with extremely high density; while raindrop noise is uniformly and randomly distributed in three-dimensional space, and will not be directionally superimposed after projection, and will still maintain a low-density discrete state. The two form a natural separability in the two-dimensional density domain.
[0078] It's important to note that orthographic projection is superior to perspective projection or other nonlinear projections because it strictly preserves the topological structure and dimensional proportions of an object in the horizontal direction. The straight lines of the carriage sidewalls remain straight after orthographic projection, with their lengths unchanged, providing an accurate geometric basis for subsequent line fitting. Simultaneously, eliminating elevation redundancy significantly reduces the data dimensionality, simplifying complex searches that would otherwise require three-dimensional space into two-dimensional plane or even one-dimensional sequence processing, effectively improving the algorithm's real-time performance on embedded platforms.
[0079] Based on the above steps, orthogonal projection was used to realize the feature mapping from high-dimensional space to low-dimensional plane. While preserving the key lateral geometric topology of the carriage, the density difference between the target and noise was amplified by the projection superposition effect, creating ideal feature conditions for subsequent density-based boundary search.
[0080] S403. Perform planar mapping and coordinate reconstruction on all two-dimensional projection points to form the corresponding two-dimensional projection point set.
[0081] Among them, planar mapping and coordinate reconstruction refers to the process of converting the two-dimensional coordinates obtained by projection into a standard data structure suitable for subsequent algorithm processing. Its purpose is to unify the data format, optimize the storage layout, or adapt to the input requirements of specific operators, so that discrete projection points are transformed into an ordered and computable set of two-dimensional projection points.
[0082] In this embodiment, the system directly encapsulates floating-point two-dimensional coordinates into a standard point cloud object list, or discretizes continuous coordinates into raster indices or pixel coordinates according to a preset resolution to construct a sparse matrix or occupy a raster map. Coordinate reconstruction also includes coordinate translation and scaling, such as moving the centroid of the projected point set to the origin to reduce numerical errors, or normalizing the coordinate range to the [0,1] interval to adapt to the input requirements of neural networks or normalized filters. In addition, multiple frames of projection data can be fused for temporal accumulation during the reconstruction process to further enhance the density of static structures and smooth dynamic noise. Regardless of the mapping strategy used, the final two-dimensional projected point set should completely retain the high-density linear distribution characteristics of the carriage sidewall and the discrete low-density distribution characteristics of raindrop noise, ensuring that the aforementioned physical separability is continued at the data level.
[0083] It's important to note that planar mapping is not simply a format conversion, but rather an optimization of data organization. Under rainy conditions and noise interference, the original projected points may still exhibit some positional jitter or holes. Through reasonable coordinate reconstruction (such as raster averaging or neighborhood fusion), micro-noise can be further suppressed without losing macro-geometric structure, improving data regularity. Simultaneously, a standardized data structure facilitates efficient traversal and cache-friendly access for subsequent operators such as sliding windows, avoiding performance degradation caused by irregular data layout.
[0084] This application embodiment fully realizes the transformation from a three-dimensional clean point cloud to a two-dimensional structured projection point set through three steps: obtaining coordinates, orthogonal projection, and planar mapping. By utilizing the geometric superposition characteristics of orthogonal projection, it establishes a significant difference between the high-density linear distribution of the carriage sidewall and the discrete low-density distribution of raindrop noise at the physical level, providing an irreplaceable feature foundation and data support for subsequent robust boundary detection based on one-dimensional density signals.
[0085] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 6 As shown, the above S204 can be specifically implemented through the following S501 to S504, which are explained in detail below: S501. Determine the carriage width direction of the two-dimensional projection point set, and establish a sliding window along the carriage width direction.
[0086] Among them, the width direction of the carriage refers to the lateral dimension of the two-dimensional projection points that are perpendicular to the longitudinal extension axis of the carriage. This direction is the main gradient direction of the density difference between the left and right side walls of the carriage on the projection surface. Establishing a sliding window means defining a local observation area with a specific geometric shape and size on the two-dimensional plane. This area will serve as the basic operator unit for subsequent density sampling.
[0087] In this embodiment, the system can determine the width direction of the carriage in various ways. If the lidar coordinate system and the carriage body coordinate system have been accurately calibrated, the Y-axis or X-axis of the coordinate system can be directly selected as the scanning direction. If there is an installation deviation or the carriage is tilted, the system can first perform principal component analysis on the two-dimensional projection point set and determine the vertical direction of the first principal component as the width direction of the carriage to ensure that the scanning path is strictly perpendicular to the side wall direction. When establishing the sliding window, the geometry of the window is not limited to a rectangle, but can also be a circle, an ellipse, or a fan-shaped area that adapts to the curvature of the side wall. The initial position of the window can be set outside the boundary of the projection point set, or it can be initialized based on the boundary prediction position of historical frames. The key is that the window must be able to cover the entire potential distribution range of the carriage side wall in the width direction, and its extension direction should be consistent with the length direction of the carriage to ensure that the longitudinal structural information of the side wall is not missed during the scanning process.
[0088] It is important to note that accurately determining the width direction of the carriage is a prerequisite for ensuring the effectiveness of density statistics. If there is a large angle between the scanning direction and the sidewall normal, the projection of the sidewall point cloud within the window will be elongated or truncated, causing the density peaks to become flat or fragmented, reducing the signal-to-noise ratio of subsequent extreme value searches. Therefore, in practical deployment, it is recommended to introduce an orientation correction mechanism, using coarse detection results or inertial measurement unit data to correct the scanning axis in real time, ensuring that the sliding window always traverses along the optimal path.
[0089] Based on the above steps, by adaptively determining the scanning direction and constructing a geometrically adapted sliding window, the alignment of the density sampling process with the actual spatial posture of the carriage is ensured, avoiding feature distortion caused by coordinate system mismatch.
[0090] S502. Set the window width and movement step of the sliding window, and control the sliding window to move sequentially along the width direction of the carriage.
[0091] Among them, the window width determines the spatial integration range of a single density sampling, and the movement step size determines the spatial sampling rate of the density sequence. Together with the point cloud resolution, they constitute the core parameter system of the sliding window mechanism. Controlling movement refers to driving the window to perform discrete or continuous displacement traversal on the two-dimensional plane according to preset rules.
[0092] In this embodiment, the window width and movement step size are not fixed but dynamically adjusted based on the real-time quality of the point cloud data. Generally, the window width should be greater than the apparent thickness of the carriage sidewalls on the projection surface to fully encompass the sidewall point cloud, while being smaller than the width of the open area inside the carriage to avoid overlapping of the point clouds from both sidewalls within the same window. The movement step size is typically set to a value smaller than the window width to ensure overlap between adjacent sampling windows, thereby obtaining a smooth and continuous density curve.
[0093] It should be noted that the system can also adaptively adjust parameters based on the average spacing of the point cloud: when the point cloud is sparse, the window width is appropriately increased to enhance the stability of point counting, while the step size is reduced to prevent the omission of narrow features; when the point cloud is dense, the window size can be reduced to improve spatial resolution. Furthermore, the motion control strategy can be a uniform scanning with a constant step size, or a variable-speed scanning based on density gradient changes, automatically increasing the number of sampling points in areas of drastic density changes.
[0094] As an example, for a typical freight train car, the effective thickness of its sidewalls on the projected surface is approximately 0.2 to 0.4 meters. The system can set the sliding window width to 0.8 meters and the movement step size to 0.2 meters. With this parameter configuration, the window can completely cover the sidewall point cloud while maintaining sufficient blank intervals in the interior area of the car. At the same time, the 0.2-meter step size ensures that there are 4 overlapping sampling points within every 0.8 meters, resulting in a density curve that is both smooth and retains detail.
[0095] Based on the above steps, by establishing a dynamic matching mechanism between parameters, the sliding window can adapt to point cloud data of different densities and scales. This ensures complete feature extraction while optimizing the utilization of computing resources and enhancing the algorithm's generalization ability to different vehicle models and operating conditions.
[0096] S503. During each movement of the sliding window, count the number of two-dimensional projection points contained in the current sliding window to obtain the corresponding position density value.
[0097] Among them, the number of two-dimensional projection points refers to the operation of counting or weighted summing of points falling within the geometric range of the current window, while the position density value is a quantitative indicator that is normalized or directly output from the statistical result, used to characterize the degree of point cloud aggregation in the local area.
[0098] In the embodiments of this application, the density value is not limited to simple point counting. To improve robustness to noise, the system can adopt a weighted statistical strategy, such as assigning weights based on the reflection intensity of points, with high-intensity points (more likely real train carriages) receiving higher weights and low-intensity points (possibly residual rain noise) receiving lower weights; alternatively, a kernel density estimation method can be used, with the center of the window as the origin of the kernel function, and each point within the window is weighted by distance decay, so that the density value can better reflect the spatial cohesion center of the point cloud.
[0099] It should be noted that the point counting process within the sliding window itself constitutes a low-pass filter in the spatial domain. Since the sidewalls of the carriage have a certain physical width on the projection plane, their corresponding density signal is a slowly varying signal with a certain bandwidth. Meanwhile, the sparse random noise remaining from rainy days is spatially isolated, and the density fluctuations it causes are high-frequency and narrow-band. When the window width is much larger than the average spacing of the noise points, the contribution of a single or small number of noise points to the total number of points in the window is diluted by a large number of background points or zero-value points, and the high-frequency disturbances they cause are naturally smoothed out during the integration process. This noise-resistant characteristic brought about by geometric integration is the key mechanism by which this scheme can work stably at low signal-to-noise ratios without additional complex filtering algorithms.
[0100] As an example, during a window movement, the window covers a local area of a two-dimensional projection point set, containing 35 high-intensity points belonging to the carriage sidewall and 3 low-intensity points belonging to residual rain noise. Using simple counting, the density value is 38; using intensity weighting (sidewall points weight 1.0, rain noise points weight 0.2), the density value is 35.6. In contrast, in the adjacent pure noise region, there are only 2 rain noise points within the window, with a weighted density value of only 0.4. The density values of the two regions differ significantly, and the small fluctuations caused by rain noise are effectively smoothed between consecutive windows.
[0101] Based on the above steps, through flexible density statistics strategies and window integration effects, not only is the local aggregation degree of point cloud accurately quantified, but the interference of high-frequency random noise is also naturally suppressed during the data acquisition stage, thereby improving the signal-to-noise ratio and stability of the output signal.
[0102] S504. Arrange the density values at each position according to the moving order of the sliding window to generate the corresponding one-dimensional density distribution sequence.
[0103] Among them, the one-dimensional density distribution sequence is used to characterize the point cloud aggregation distribution of the two-dimensional projection point set along the width of the carriage. The one-dimensional density distribution sequence is an array or vector composed of a series of density values arranged in spatial order. It compresses and maps the point cloud aggregation information originally distributed on a two-dimensional plane to a single carriage width dimension, realizing the transformation from high-dimensional spatial data to low-dimensional signal features.
[0104] In this embodiment, the generated one-dimensional density distribution sequence not only contains density amplitude information but also implicitly includes a precise spatial location index. The system can bind and store each density value with its corresponding window center coordinates, forming a sequence of location-density key-value pairs. This allows for direct inverse mapping of the signal domain peaks back to the physical coordinates in the spatial domain during subsequent extreme value searches. The sequence length depends on the ratio of the total width of the scanning range to the moving step size, and its data type can be integer, floating-point, or fixed-point to adapt to the computational characteristics of different embedded platforms. Furthermore, after generating the sequence, lightweight post-processing can be applied, such as moving average smoothing, baseline drift correction, or outlier clamping, to further optimize signal quality. However, these operations should be performed while maintaining the original bimodal structure to avoid over-processing that could blur boundary features.
[0105] It should be noted that transforming two-dimensional point clouds into one-dimensional density sequences is one of the core innovations of this scheme in achieving efficient boundary detection. This transformation not only reduces the computational complexity of subsequent algorithms from... or Reduce to This also changes the nature of the problem: transforming the complex geometric clustering or contour fitting problem that originally needed to be performed in two-dimensional space into a simple peak detection problem on a one-dimensional signal. In the one-dimensional signal domain, the side walls of the carriage appear as two significant main peaks, while rain noise appears as a low-amplitude background base, making the separation of the two extremely intuitive.
[0106] Based on the above steps, a one-dimensional sequence is generated by arranging density values in an ordered manner, which simplifies the complex two-dimensional spatial perception task into a standard one-dimensional signal analysis problem. While significantly reducing the computational load, the accuracy and real-time performance of boundary detection are ensured by utilizing the significant feature differences in the signal domain.
[0107] This application embodiment fully realizes the transformation process from a two-dimensional projection point set to a one-dimensional density signal through four steps: determining the scanning direction, configuring window parameters, performing density statistics, and generating a one-dimensional sequence. Utilizing the geometric integral properties of the sliding window to naturally filter out high-frequency random noise, the carriage boundary detection problem is reduced to an efficient one-dimensional peak search problem, providing a high signal-to-noise ratio and low computational cost data foundation for subsequent robust boundary fitting.
[0108] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 6 As shown, the above S205 can be specifically implemented through the following S601 to S604, which are explained in detail below: S601. Perform extreme value detection on the density values at each location in the one-dimensional density distribution sequence to determine the corresponding local density peak region.
[0109] Extreme value detection refers to the signal processing operation that identifies local maxima that are significantly higher than the background baseline and their adjacent intervals in a one-dimensional numerical sequence. Its physical meaning is to transform the high-density linear clustering features of the carriage sidewall on the two-dimensional projection surface into quantifiable peaks in the one-dimensional signal domain, thereby using signal processing technology to efficiently locate the target.
[0110] In this embodiment, the system employs various signal analysis strategies to achieve extreme value detection. For example, the first or second derivative of the density sequence can be calculated, and the position where the derivative crosses zero and the second derivative is negative can be identified as the peak center; or, by setting an adaptive dynamic threshold, connected intervals that continuously exceed the threshold can be marked as peak regions; or, methods such as template matching or wavelet transform can be used to extract waveform segments similar to the preset density profile of the carriage sidewall. Regardless of the detection operator used, the output result should include information such as the start index, end index, and peak intensity of the peak, so that subsequent steps can be used for filtering and positioning.
[0111] It should be noted that the object of extremum detection is the one-dimensional density sequence smoothed by sliding window integration, rather than the original point cloud data. This processing method naturally makes the detection process robust to noise, because high-frequency spikes caused by random rain noise are suppressed during integration, while the low-frequency main peaks corresponding to the side walls of the carriage are preserved. Therefore, extremum detection here is essentially feature extraction in the high signal-to-noise ratio signal domain, and its reliability is far higher than that of geometric clustering directly in the sparse point cloud.
[0112] S602. Based on the window position corresponding to each local density peak region, select the main peak regions located on the left and right sides of the carriage as candidate regions for the left and right boundaries of the carriage.
[0113] Among them, screening the main peak region refers to the process of eliminating false interference peaks from all detected local peaks based on prior knowledge of spatial location or amplitude characteristics, and retaining the effective peaks that truly correspond to the left and right side walls of the carriage. Its purpose is to ensure that the subsequent fitting object is the correct carriage boundary rather than environmental noise or other objects.
[0114] In this embodiment, the system can perform main peak selection based on multiple criteria. The most direct approach is to utilize the symmetry or relative positional relationship of the carriage structure. For example, given the known installation location of the lidar, the highest peak in the first half of the sequence is determined as the left boundary, and the highest peak in the second half as the right boundary. If multiple candidate peaks exist, their peak intensity, peak width, or area can be further compared to select the peak that best matches the physical characteristics of the carriage sidewall as the main peak. In addition, the system can also introduce temporal consistency verification. If a peak exists stably in multiple consecutive frames and its position changes smoothly, its probability of being the main peak increases significantly; conversely, if a peak only flashes in a single frame or its position changes drastically, it is likely residual rain noise or insect interference and should be eliminated.
[0115] Based on the above steps, by combining spatial location, morphological features and temporal stability into a comprehensive screening mechanism, various false peak interferences in rainy weather are effectively eliminated, ensuring that the candidate regions entering the fitting stage have high confidence and improving the robustness of the algorithm under harsh conditions.
[0116] S603. Calculate the center position or inner edge position of the candidate regions of the left and right boundaries of each carriage to obtain the corresponding candidate points of the left and right boundaries.
[0117] Among them, the left and right boundary candidate points are discrete coordinate points that represent the most representative positions of the carriage sidewall in the width direction. They can be the geometric center or weighted centroid of the peak region, or edge points near the inside of the carriage, serving as reference anchor points for subsequent inverse mapping from the one-dimensional signal domain back to the two-dimensional spatial domain.
[0118] In this embodiment, the method for calculating candidate points can be flexibly selected according to the application scenario requirements. If statistical stability of positioning is desired, the weighted centroid method can be used, that is, the weighted average of the window positions within the peak area is calculated with density value as weight. This method can effectively resist noise jitter at the peak edge. If physical accuracy of geometric boundaries is desired, the edge detection method can be used, selecting the position corresponding to the maximum gradient at the rising or falling edge of the peak as the inner edge point, which is closer to the real physical interface of the carriage wall.
[0119] It should be noted that the selection strategy for candidate points directly affects the fitting accuracy of the final boundary line. When the edge of the point cloud is blurred in rainy weather, simply relying on the density maximum point may result in a shift due to noise superposition, while using weighted centroids or edge gradient extreme points can better reflect the overall distribution trend of the carriage sidewall.
[0120] Based on the above steps, a refined candidate point calculation strategy is used to transform one-dimensional density peaks into two-dimensional spatial anchor points with clear physical meaning. This not only improves the accuracy and stability of boundary positioning, but also provides a reliable geometric reference for subsequent expansion from point signals to surface regions.
[0121] S604. Determine the spatial range of the candidate areas for the left and right boundaries of the carriage based on the candidate points for the left and right boundaries.
[0122] The process of determining the spatial extent involves defining a rectangular or polygonal region within the two-dimensional projection point set, based on candidate points, that contains a sufficient number of effective carriage wall point clouds. This region serves as the input data mask for the subsequent robust fitting algorithm, and its size and shape directly determine the quality and quantity of the fitted samples. Further, this step includes using the left and right boundary candidate points as region center points; extracting the corresponding neighborhood point set from the two-dimensional projection point set according to the preset boundary search range; and generating the corresponding left and right boundary candidate regions of the carriage based on the distribution range of the neighborhood point set along the carriage's length.
[0123] In this embodiment, when determining the spatial range, the system first expands outward along the width direction with a preset search radius, centered on the candidate point, forming a horizontal interval covering the thickness of the sidewall. The key is to extend longitudinally along the length of the carriage. This longitudinal extension can be a fixed-length cutoff or an adaptive cutoff based on the actual distribution of the point cloud, such as by statistically analyzing the variance or span of points in the neighborhood along the length direction to ensure that the extracted area completely covers the visible sidewall segment of the carriage in the current frame. When extracting the neighborhood point set, secondary filtering is performed using attributes such as reflection intensity or normal vector, retaining only points that match the characteristics of the carriage wall into the candidate region.
[0124] It's important to note that the emphasis on expanding the region along its length, rather than using only local point clouds near candidate points, is because straight-line fitting requires sufficient sample support to resist outlier interference. Under low signal-to-noise ratio conditions in rainy weather, point clouds within a single point or a very small neighborhood are easily dominated by noise, causing the fitted line direction to drift randomly. However, by expanding along its length to obtain hundreds or even thousands of points within a long, narrow region, the statistical averaging effect of a large number of interior points can dilute the influence of residual noise, enabling robust algorithms like RANSAC to quickly converge to the correct global model, significantly enhancing the stability and geometric consistency of the fitting results.
[0125] Based on the above steps, by using candidate points as anchor points and expanding the spatial range along the length direction, a boundary candidate region containing sufficient effective samples was successfully constructed. This fundamentally solved the divergence problem caused by insufficient linear fitting samples in sparse noise environments during rainy days, and realized an important transformation from one-dimensional signal localization to two-dimensional robust geometric modeling.
[0126] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 7 As shown, the above S206 can be specifically implemented through the following S701 to S705, which are explained in detail below: S701. Obtain the two-dimensional projection points in the candidate regions of the left and right boundaries respectively.
[0127] Among them, obtaining two-dimensional projection points refers to the process of extracting sample data for model calculation from the spatial range determined in the previous steps. Although the data source has been located and filtered by density extremum search, it is still inevitably mixed with a small amount of high-intensity raindrop noise or multipath reflection artifacts in the rainy environment, and is not an ideal pure dataset.
[0128] In this embodiment, the system can directly read the point cloud array of the corresponding region in memory, or extract points in real time from the global two-dimensional projection point set based on the geometric mask of the candidate region. To further improve fitting efficiency, the system performs lightweight pre-screening after acquiring the points, such as removing outliers with extremely low reflection intensity or whose normal vectors deviate significantly from the vertical direction, or uniformly resampling overly dense point clouds to avoid local overfitting. It should be understood that the acquired data not only contains the coordinate information of the points, but also carries weight attributes to distinguish between high-confidence points and low-confidence points in subsequent fitting.
[0129] It should be noted that the quality of the data obtained in this step directly determines the convergence speed of robust fitting. Although the robust algorithm itself has outlier suppression capabilities, if the noise ratio in the input data exceeds the algorithm's theoretical collapse point (usually 50%), the model estimation will still fail.
[0130] Based on the above steps, by accurately extracting mixed sample data within the candidate boundary region, the necessary computational material is provided for the robust fitting algorithm, which ensures the integrity of the real boundary features and retains the noise background required to verify the robustness of the algorithm.
[0131] S702. The random sampling consensus algorithm is used to perform linear model iterative fitting on the two-dimensional projection points in the left boundary candidate region and the two-dimensional projection points in the right boundary candidate region, respectively.
[0132] Among them, the random sampling consensus algorithm is a robust estimation algorithm that estimates model parameters and verifies their consistency by repeatedly randomly sampling the smallest sample set. Its core idea is to assume that the data consists of inliers (which conform to the model) and outliers (which do not conform to the model), and to find the model that can explain the most data through a probability mechanism, thereby automatically ignoring outlier interference.
[0133] In this embodiment, when the system performs iterative fitting of the linear model, it is not limited to the standard RANSAC algorithm. Improved variants such as MSAC, MLESAC, PROSAC, or progressive sampling consensus can also be used. These variants optimize sampling strategies, scoring functions, or termination conditions to adapt to different noise distribution characteristics. For example, PROSAC prioritizes sampling high-quality points based on prior quality ranking, accelerating convergence; MLESAC uses a likelihood function instead of simple interior point counting, improving tolerance to noise proportions. In each iteration, the system randomly selects two points to determine a linear hypothesis, evaluates the distance of all other points to this line, and counts the number of points that meet the threshold requirement or the cumulative score. This process continues until the preset maximum number of iterations is reached or the model confidence meets the requirements. The final output model parameters are determined solely by the samples identified as interior points, rather than by the average influence of all points.
[0134] It is important to note that the fundamental difference between robust fitting and traditional least squares lies in their approach to outliers. Least squares attempts to minimize the sum of squared residuals across all points, meaning that any point far removed from the main sample will generate significant residual pull, causing the fitted line to deflect towards the noise. In contrast, robust fitting, through sampling and validation mechanisms, essentially constructs a model-level outlier filter. Only points geometrically consistent with the majority of samples have the opportunity to participate in model construction, and outliers are naturally excluded during the iteration process, thus ensuring fitting accuracy even at low signal-to-noise ratios.
[0135] Based on the above steps, by introducing an iterative fitting mechanism based on random sampling and consistency testing, the shortcomings of traditional regression methods in being sensitive to outliers are fundamentally overcome, enabling the calculation of a high-confidence linear model that reflects the true geometry of the carriage even under residual noise interference in rainy weather.
[0136] S703. In each iteration of the fitting process, the corresponding set of interior points is determined according to the preset distance threshold, and the number of interior points is counted.
[0137] Among them, the preset distance threshold is the geometric tolerance standard for determining whether a data point belongs to the inlier of the current hypothetical model, the inlier set is the set of all points whose straight-line distance to the current point is less than the threshold, and the number of inliers represents the explanatory power of the current model on the observed data.
[0138] In this embodiment, the distance threshold is not fixed but dynamically adjusted based on point cloud resolution, expected noise level, or historical frame fitting residuals. Besides a fixed Euclidean distance threshold, adaptive threshold strategies can be employed, such as scaling based on the distance from the point to the radar center (allowing greater tolerance for distant points) or weighting based on the point's reflection intensity (lower tolerance for high-intensity points). When counting the number of inliers, a soft voting mechanism can be used, where closer points receive higher scores, rather than a simple binary count, thus reflecting model quality more nuancedly.
[0139] It is important to note that the distance threshold is a crucial knob for balancing fitting accuracy and recall. A threshold that is too small will misclassify true edge jitter points as outliers, leading to insufficient inliers and model instability; a threshold that is too large will include nearby rain noise in the inlier set, weakening robustness and even causing the model to be skewed by noise. In practical engineering, this threshold is usually related to the ranging accuracy and calibration error of the LiDAR. It is recommended to set it to 2 to 3 times the average spacing of the point cloud or 1.5 times the nominal accuracy of the LiDAR to ensure that it can accommodate normal measurement fluctuations while effectively isolating significant abnormal interference.
[0140] Based on the above steps, by establishing an interior point discrimination and statistical mechanism based on geometric tolerance, the consistency between each hypothetical model and the observed data was quantified, providing an objective and comparable evaluation basis for the subsequent selection of the optimal model. At the same time, by setting a reasonable threshold, the measurement error and the real noise were effectively distinguished.
[0141] S704. Determine the straight line model whose number of interior points meets the preset conditions as the target boundary straight line model of the corresponding region.
[0142] Among them, the preset conditions are the decision criteria for selecting the optimal model. The purpose is to select the mathematical model that best represents the boundary of the real carriage from the numerous hypotheses generated by hundreds or thousands of iterations, and to complete the transformation from probabilistic search to deterministic results.
[0143] In the embodiments of this application, the specific form of the preset conditions can be varied. The most commonly used is the maximum number of interior points criterion, which selects the model with the most interior points as the target; it can also be the minimum outlier ratio criterion, which is suitable for scenarios where the total number of points changes; or it can be an adaptive convergence criterion, which terminates early and outputs the current optimal solution when the number of interior points no longer increases significantly or reaches the theoretical expected value after several consecutive iterations. In addition, to prevent the occurrence of accidental false high interior point models, this application introduces geometric constraint verification, such as requiring the slope of the target model to be within a reasonable angle range of the carriage sidewall, or requiring its length coverage to reach a certain proportion. Only models that simultaneously satisfy the dual verification of interior point quantity advantage and geometric rationality will be finally confirmed as the target boundary straight line model. This multi-verification mechanism further improves the reliability of the system under extreme and harsh operating conditions.
[0144] Based on the above steps, a multi-dimensional optimal model selection strategy was adopted to ensure that the final output straight line parameters not only have the maximum data support in a statistical sense, but also conform to the physical laws of the carriage structure in a geometric semantic sense, thus completely eliminating the risk of small probability misleading in the random sampling process.
[0145] S705. Output the corresponding left and right boundary lines of the carriage based on the target boundary line model.
[0146] Among them, the output boundary line refers to the process of transforming abstract mathematical model parameters into structured geometric data that can be used by downstream modules. These data accurately describe the spatial position and extension direction of the left and right carriage walls under rainy conditions.
[0147] In the embodiments of this application, the output typically includes the slope, intercept, or normal parameters of the straight line, and may also include model quality indicators such as the number of interior points and confidence level information such as the average residual. In addition to the basic straight line equation, the system can calculate the effective start and end points of the boundary straight line based on the distribution range of the interior point set, forming line segments of finite length rather than infinitely extending straight lines, so as to more accurately represent the actual physical dimensions of the carriage.
[0148] It should be noted that, due to the use of robust fitting, the parameters of the output boundary line are determined only by the inliers, thus making it naturally immune to transient noise from rain. Even if there are a large number of splashes or specular reflection artifacts in the current frame, as long as they are not included in the inlier set, they will not have any impact on the output.
[0149] As an example, in an embodiment of this application, Figure 8 The original point cloud image of the carriage collected by lidar in rainy weather conditions provided in the embodiments of this application is as follows: Figure 8 As shown, due to raindrop scattering noise and ground multipath reflection interference, there are a large number of discrete noise points in the point cloud, resulting in blurred carriage boundaries and local breaks. Figure 9 The two-dimensional projection result image provided in the embodiments of this application after noise reduction preprocessing and orthogonal projection dimensionality reduction is as follows: Figure 9 As shown, by projecting the three-dimensional point cloud along the elevation direction onto the horizontal plane, the point cloud on the side wall of the carriage forms a high-density linear distribution area, while the random raindrop noise presents a discrete low-density distribution. Figure 10 The image showing the carriage boundary detection results after sliding window density statistics, density extreme value search, and robust fitting provided in the embodiments of this application is as follows: Figure 10 As shown, the system performs robust straight-line fitting on the left and right boundaries of the carriage to obtain stable and continuous carriage boundaries, achieving high-precision carriage boundary detection in rainy conditions.
[0150] This application's embodiments construct a robust boundary fitting mechanism for residual noise in rainy weather through five steps: acquiring mixed samples, robust iterative fitting, interior point discrimination statistics, optimal model selection, and structured output. This mechanism utilizes random sample consensus theory to transform the model estimation process from a sensitive dependence on all points to a robust tracking of the dominant interior point set. This fundamentally solves the technical problem of traditional least squares methods easily diverging under low signal-to-noise ratios, ensuring the geometric consistency and numerical reliability of the carriage boundary detection results under all-weather conditions.
[0151] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0152] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A robust method for detecting the boundary of a vehicle using lidar in response to noise interference during rainy weather, characterized in that, include: Acquire raw point cloud data collected by lidar in rainy conditions; wherein, the raw point cloud data includes point cloud of the carriage, point cloud of the ground, point cloud of raindrop noise, and point cloud of multipath reflection noise; The original point cloud data is subjected to noise reduction preprocessing to obtain purified point cloud data; The purified point cloud data is subjected to orthogonal projection dimensionality reduction processing to obtain a two-dimensional projection point set; Density statistics are performed on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence; wherein, the sliding window moves along the width direction of the carriage and the number of point cloud clusters in each sliding window is counted. A density extremum search is performed on the one-dimensional density distribution sequence to determine the candidate regions for the left and right boundaries of the carriage; wherein the candidate regions for the left and right boundaries of the carriage are the left main peak region and the right main peak region in the density distribution sequence, respectively. Based on the robust fitting algorithm, the candidate regions of the left and right boundaries of the carriage are fitted with boundary lines to obtain the left boundary line and the right boundary line of the carriage. The center line of the carriage is determined based on the straight lines of the left and right boundaries of the carriage, and the carriage boundary detection results are output.
2. The method according to claim 1, characterized in that, The step of performing noise reduction preprocessing on the original point cloud data to obtain purified point cloud data includes: The original point cloud data is filtered based on a preset reflection intensity threshold to remove low reflection noise points with a reflection intensity lower than the preset reflection intensity threshold, thus obtaining an initial filtered point cloud. Based on the spatial neighborhood distribution of each point in the initial filtered point cloud, the corresponding local distance statistical features are calculated, and outliers that deviate from the average spatial distribution are removed according to the local distance statistical features to obtain the point cloud data after outlier removal. The random sampling consensus algorithm is used to fit the ground plane of the point cloud data after outlier removal to obtain the corresponding ground plane model. The ground point cloud is identified and stripped based on the ground plane model, while the target point cloud data located above the ground plane is retained to obtain purified point cloud data.
3. The method according to claim 1, characterized in that, The orthogonal projection dimensionality reduction processing of the purified point cloud data to obtain a two-dimensional projection point set includes: Obtain the spatial coordinate information of each point in the purified point cloud data; Using the horizontal plane as the target projection plane, the purified point cloud data is orthogonally projected along the elevation direction to eliminate the elevation coordinate information of each point while retaining the horizontal coordinate information, thus obtaining the corresponding two-dimensional projection points. Plane mapping and coordinate reconstruction are performed on all the two-dimensional projection points to form the corresponding two-dimensional projection point set.
4. The method according to claim 3, characterized in that, The point cloud on the side wall of the carriage, as defined by the two-dimensional projection point set, forms a linear high-density distribution area, while random raindrop noise points form a discrete low-density distribution area.
5. The method according to claim 1, characterized in that, The step of performing density statistics on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence includes: Determine the carriage width direction of the two-dimensional projection point set, and establish a sliding window along the carriage width direction; Set the window width and movement step of the sliding window, and control the sliding window to move sequentially along the width direction of the carriage; During each movement of the sliding window, the number of two-dimensional projection points contained in the current sliding window is counted to obtain the corresponding position density value; The density values at each position are arranged according to the moving order of the sliding window to generate a corresponding one-dimensional density distribution sequence; wherein, the one-dimensional density distribution sequence is used to characterize the point cloud aggregation distribution of the two-dimensional projection point set in the width direction of the carriage.
6. The method according to claim 1, characterized in that, The step of performing a density extremum search on the one-dimensional density distribution sequence to determine candidate regions for the left and right boundaries of the carriage includes: Extremum detection is performed on the density values at each location in the one-dimensional density distribution sequence to determine the corresponding local density peak regions; Based on the window positions corresponding to each local density peak region, the main peak regions located on the left and right sides of the carriage are selected as candidate regions for the left and right boundaries of the carriage. Calculate the center position or inner edge position of the candidate regions for the left and right boundaries of each carriage to obtain the corresponding candidate points for the left and right boundaries. The spatial range of the candidate areas for the left and right boundaries of the carriage is determined based on the candidate points for the left and right boundaries.
7. The method according to claim 6, characterized in that, The step of determining the spatial range of the candidate regions for the left and right boundaries of the carriage based on the candidate points for the left and right boundaries includes: The candidate points on the left and right boundaries are respectively used as the center points of the region; Extract the corresponding neighborhood point set from the two-dimensional projection point set according to the preset boundary search range; Based on the distribution range of the neighborhood point set along the length of the carriage, corresponding candidate regions for the left and right boundaries of the carriage are generated.
8. The method according to claim 1, characterized in that, The robust fitting algorithm is used to fit the boundary lines of the candidate regions on the left and right boundaries of the carriage, respectively, to obtain the left boundary line and the right boundary line of the carriage, including: Two-dimensional projection points in the left boundary candidate region and the right boundary candidate region are obtained respectively; The random sampling consensus algorithm is used to perform linear model iterative fitting on the two-dimensional projection points in the left boundary candidate region and the two-dimensional projection points in the right boundary candidate region, respectively. In each iterative fitting process, the corresponding set of inliers is determined according to a preset distance threshold, and the number of inliers is counted. The straight line model whose number of interior points meets the preset conditions is determined as the target boundary straight line model of the corresponding region. The corresponding left and right boundary lines of the carriage are output based on the target boundary line model.
9. The method according to claim 1, characterized in that, The process of determining the centerline of the carriage based on the straight lines of the left and right boundaries of the carriage and outputting the carriage boundary detection results includes: The centerline of the carriage is calculated based on the equidistant center positions between the straight lines of the left and right boundaries of the carriage. Based on the spatial position parameters corresponding to the left boundary line, the right boundary line, and the center line of the carriage, a carriage boundary model is constructed. Output the carriage boundary detection results corresponding to the carriage boundary model.
10. A robust lidar detection system for vehicle boundary against rain and noise interference, characterized in that, The system includes: a data acquisition module, a noise reduction preprocessing module, a projection dimensionality reduction module, a density statistics module, a boundary search module, a boundary fitting module, and a boundary output module; The data acquisition module is used to acquire raw point cloud data collected by lidar in rainy conditions; the raw point cloud data includes carriage point cloud, ground point cloud, raindrop noise point cloud, and multipath reflection noise point cloud. The noise reduction preprocessing module is used to perform noise reduction preprocessing on the original point cloud data to obtain purified point cloud data. The projection dimensionality reduction module is used to perform orthogonal projection dimensionality reduction processing on the purified point cloud data to obtain a two-dimensional projection point set; The density statistics module is used to perform density statistics on the two-dimensional projection point set based on a sliding window to obtain the corresponding one-dimensional density distribution sequence. The boundary search module is used to perform density extreme value search on the one-dimensional density distribution sequence to determine the candidate regions for the left and right boundaries of the carriage. The boundary fitting module is used to perform boundary line fitting on the candidate regions of the left and right boundaries of the carriage based on the robust fitting algorithm, so as to obtain the left boundary line and the right boundary line of the carriage. The boundary output module is used to determine the center line of the carriage based on the straight line of the left boundary of the carriage and the straight line of the right boundary of the carriage, and output the carriage boundary detection result.