Research on Preprocessing Point Cloud Data of Railway Wagon Steel Castings Based on PCL

In modern heavy-haul railway transportation systems, the coupler is a critical component responsible for connecting wagons and transmitting immense forces. As a core load-bearing part, it is typically manufactured through casting processes, producing complex steel castings. The quality of these steel castings directly impacts the safety and operational stability of the entire train. The post-casting cleaning process, which involves removing gates, risers, flashes, and surface defects, is crucial for the final quality and performance of the coupler. However, these features requiring treatment are randomly distributed and highly variable in morphology. Traditional manual cleaning methods are inefficient, labor-intensive, and produce inconsistent results, heavily reliant on operator skill. Therefore, developing automated, intelligent cleaning systems based on machine vision is an urgent industrial need.

Machine vision offers a promising solution. While 2D vision is susceptible to lighting variations, 3D vision technology using point cloud data provides a more comprehensive and robust geometric description of objects. We utilize a 3D binocular camera to capture the surface geometry of coupler steel castings. However, the raw point clouds acquired in industrial environments are inevitably contaminated by noise. This noise originates from multiple sources: ambient dust and metallic particles (swarf) in the air, surface reflectivity variations on the rough casting, and inherent limitations of the scanning device. These extraneous points, or outliers, severely hinder subsequent processing steps such as segmentation, registration, and precise dimensional measurement of defects. Effective preprocessing to filter this noise while preserving the geometric integrity of the casting is a fundamental prerequisite for any reliable automated inspection or robotic guidance system.

This study focuses on the preprocessing of point cloud data for wagon coupler steel castings. We analyze and experiment with common filtering algorithms available in the Point Cloud Library (PCL). To address the limitations of single-filter approaches and improve denoising flexibility and effectiveness, we propose a novel adaptive joint filtering method. This method intelligently combines statistical filtering and radius filtering. We validate our approach using real point cloud data collected from various sections of coupler steel castings, comparing its performance against standard filters in terms of denoising efficacy and computational efficiency.

Theoretical Background and Common Point Cloud Filtering Algorithms

Point cloud filtering aims to remove outliers and reduce data density without distorting the underlying geometry of the object. PCL provides a suite of filtering algorithms, each with distinct principles and suitable application scenarios. For preprocessing industrial steel castings point clouds, we primarily consider the following filters.

1.1 PassThrough Filter

The PassThrough filter operates on a specified spatial dimension (X, Y, or Z axis). It removes points whose coordinate values lie outside a user-defined interval $[min, max]$. The operation is simple and fast, defined for each point $p_i = (x_i, y_i, z_i)$:

$$ \text{Keep } p_i \quad \text{if } min \leq c_i \leq max $$

where $c_i$ is the coordinate value of point $p_i$ along the chosen axis. While effective for cropping out obvious background regions (e.g., points far from the object), it is a rigid, non-adaptive filter. It cannot distinguish between noise and valid surface points within the specified range, making it unsuitable for removing sparse, intermixed noise typical on steel castings.

1.2 VoxelGrid Downsampling Filter

This filter performs spatial downsampling by aggregating points within a 3D voxel grid. The space encompassing the point cloud is subdivided into small cubic voxels of a defined leaf size $L$. All points falling inside a given voxel are approximated by their centroid. The process reduces the number of points while preserving the overall shape. For a voxel $V_j$ containing points $q_1, q_2, …, q_m$, the representative point $r_j$ is calculated as:

$$ r_j = \frac{1}{m} \sum_{k=1}^{m} q_k $$

Although excellent for creating uniform, manageable point densities for subsequent global processing like registration, the VoxelGrid filter is not designed for outlier removal. It will indiscriminately include noise points within a voxel when computing the centroid, potentially smearing or preserving outlier data. Its primary role with steel castings data is data reduction, not purification.

1.3 Statistical Outlier Removal (SOR) Filter

This is a powerful algorithm for removing sparse, isolated noise. It operates on the statistical distribution of distances between a point and its neighbors. For a point cloud $P = \{p_1, p_2, …, p_n\}$, the algorithm proceeds as follows:

  1. For each point $p_i$, perform a K-Nearest Neighbors (KNN) search to find its neighborhood set $N(p_i)$.
  2. Compute the mean distance $\bar{d_i}$ from $p_i$ to all points in $N(p_i)$:

$$ \bar{d_i} = \frac{1}{K} \sum_{q \in N(p_i)} \| p_i – q \| $$

  1. The set of all mean distances $\{\bar{d_1}, \bar{d_2}, …, \bar{d_n}\}$ is assumed to have a Gaussian distribution. Compute the global mean $\mu$ and standard deviation $\sigma$ of these mean distances:

$$ \mu = \frac{1}{n}\sum_{i=1}^{n} \bar{d_i}, \quad \sigma = \sqrt{\frac{1}{n}\sum_{i=1}^{n} (\bar{d_i} – \mu)^2} $$

  1. Define a dynamic distance threshold $T = \mu + \lambda \cdot \sigma$, where $\lambda$ is a scaling factor (typically 1.0 to 3.0).
  2. A point $p_i$ is classified as an outlier and removed if $\bar{d_i} > T$; otherwise, it is retained as an inlier.

This filter is highly effective for the “flying pixel” type of noise often found around the edges of scanned steel castings. However, its performance is sensitive to the choice of $K$ and $\lambda$. A small $K$ may not capture accurate local statistics, while an overly large $\lambda$ may fail to remove subtle outliers.

1.4 Radius Outlier Removal (ROR) Filter

Unlike the statistical filter, the Radius Outlier Removal (ROR) filter uses a fixed spatial radius for neighborhood analysis. For each point $p_i$, it counts the number of neighboring points $N_{radius}(p_i)$ within a sphere of radius $R$. If this count is less than a specified minimum threshold $N_{min}$, the point is considered an outlier.

$$ \text{Keep } p_i \quad \text{if } |N_{radius}(p_i)| \geq N_{min} $$

The algorithm is intuitive and computationally efficient for organized or moderately dense clouds. Its main challenge is parameter selection: an overly large $R$ may connect valid surface points to distant noise, preventing their removal, while a very small $R$ might incorrectly mark points in low-density surface regions as outliers. For rough steel castings with varying point density due to surface geometry, this can be problematic.

Proposed Adaptive Joint Filtering Method

Analysis of the common filters reveals that Statistical Outlier Removal (SOR) and Radius Outlier Removal (ROR) are most directly applicable to removing the sparse noise prevalent in our casting scans. However, relying on a single filter often yields suboptimal results. Manually cascading multiple filters (e.g., SOR followed by ROR) is possible but lacks adaptability; the fixed sequence and parameters may not generalize well across different scanning conditions or regions of a complex steel casting with varying noise characteristics.

To enhance denoising robustness and flexibility, we propose an Adaptive Joint Filtering Method. The core idea is to execute SOR and ROR in a synergistic manner, where the influence of each filter on the final result is modulated by adaptive weight factors. A feedback mechanism based on point removal rate is employed to guide the weight adjustment towards an optimal denoising outcome.

The detailed workflow of the proposed method is as follows:

  1. Input and Weight Initialization: The input is the raw point cloud $Q$ with $N_0$ points. Initialize two adaptive weight factors: $\alpha$ for the SOR filter and $\beta$ for the ROR filter. Initially, they can be set to 1.0, implying full influence.
  2. Weighted Filter Application: Apply the filters to the cloud $Q$ with their respective weights influencing the effective filter parameters. The weight factors could modulate the core filter parameters (e.g., $\alpha$ scales the SOR threshold multiplier $\lambda$, $\beta$ scales the ROR radius $R$), or they could determine the blending of points from two independently filtered results. For a simplified and effective implementation, we define the process as generating intermediate clouds:
    • $Q_{\alpha^i \beta^0}$: Result after applying SOR with weight-influenced parameters at iteration $i$.
    • $Q_{\alpha^0 \beta^j}$: Result after applying ROR with weight-influenced parameters at iteration $j$.

    The joint operation at a combined iteration step yields cloud $Q_{\alpha^i \beta^j}$.

  3. Performance Evaluation: Calculate the Point Cloud Removal Rate $\eta$ after obtaining $Q_{\alpha^i \beta^j}$ with $N_{\alpha^i \beta^j}$ points.

$$ \eta = 1 – \frac{N_{\alpha^i \beta^j}}{N_0} $$

  1. Adaptive Weight Adjustment: Define a target range for $\eta$ based on empirical knowledge of valid noise levels for steel castings, for instance, $\eta \in (0, 0.5)$. The adjustment logic is:
    • If $\eta$ is within the acceptable range and visual inspection confirms good feature preservation, the current weights $(\alpha^i, \beta^j)$ are considered optimal.
    • If $\eta$ is too low (insufficient denoising), the weights are adjusted to increase the aggressiveness of one or both filters (e.g., increase $\alpha$ to lower the SOR threshold, or increase $\beta$ to expand the ROR search radius).
    • If $\eta$ is too high (excessive removal, risking loss of surface details), the weights are adjusted to make the filters more conservative.

    This adjustment can be automated using heuristic rules or optimization techniques like a simplex method to maximize a quality metric (balancing low $\eta$ against a measure of surface smoothness or feature retention).

  2. Termination and Output: The iterative adjustment continues until the resulting point cloud $Q_{opt}$ meets the predefined quality criteria (a combination of $\eta$ within range and satisfactory visual/model-based assessment). This final cloud is output as the denoised data.

This method provides a framework for dynamically balancing the strengths of SOR (excellent at removing statistically isolated points) and ROR (effective at removing points in low-density regions), leading to more robust denoising for complex steel castings point clouds under variable conditions.

Experimental Setup and Data Acquisition

To validate the proposed and comparative methods, we conducted experiments using real point cloud data from railway wagon coupler steel castings. The data acquisition system comprised a 3D binocular camera with the following key specifications: working distance of 400–600 mm, field of view of 400 × 500 mm, single-scan acquisition time under 1.5 seconds, single-point measurement accuracy of 0.2 mm, and operates on 24V DC power.

The casting surface, being rough and often reflective, combined with an industrial environment containing airborne particulates, creates a perfect storm for generating noisy point clouds. We scanned three distinct and geometrically complex sections of the coupler casting: the Tail section (primary connection body), the Hand section (part of the locking mechanism), and the Body section (central structural part). Each scan produced a dense point cloud with several hundred thousand points, heavily contaminated with peripheral and scattered noise points.

The experimental platform was a computer with an Intel Core i5-7300HQ processor, 4 GB RAM, running Windows 10 64-bit. The software environment included Visual Studio 2015 and the PCL 1.8.1 library. All filtering algorithms were implemented in C++ using PCL’s native functions for fairness of comparison. Performance was evaluated based on two metrics: 1) Denoising Effectiveness: The visual quality of the output cloud and the preservation of key geometric features (edges, holes, surfaces). 2) Computational Efficiency: The time taken to process the entire point cloud.

Experimental Results and Comparative Analysis

We applied the PassThrough, VoxelGrid, Statistical Outlier Removal (SOR), Radius Outlier Removal (ROR), and our proposed Adaptive Joint Filter to the three casting sections. The parameters for each filter were tuned iteratively to achieve their best possible outcome for the Tail section data, which is used here as the primary example. The raw Tail point cloud contained $N_0 = 492,868$ points.

2.1 Baseline Filtering Results

PassThrough Filter: As expected, this filter only performed crude cropping. Setting limits on the Z-axis (e.g., $Z \in [-100, 100]$) removed all points, as the object’s coordinates fell outside this arbitrary range. Adjusting limits to encompass the object (e.g., $Z \in [-1000, 1000]$) removed no points. It proved incapable of selectively removing intermixed noise.

VoxelGrid Filter: With a leaf size of $L=1.0$ unit, it downsampled the cloud to $N=86,412$ points, effectively reducing density. However, as shown in the analysis, it did not remove the sparse noise surrounding the object; the outliers were simply incorporated into their respective voxel centroids. Its role is data reduction, not cleaning.

Statistical Outlier Removal (SOR): After parameter tuning, setting $K=20$ (neighbors) and $\lambda=1.0$ (multiplier) yielded a good balance. It effectively removed the majority of scattered outliers. The resulting point count was $N_{SOR} = 473,997$. The denoising was visually significant, though some clustered noise near edges sometimes remained.

Radius Outlier Removal (ROR): The best result for the Tail section was achieved with a search radius $R=1.0$ and a minimum neighbor count $N_{min}=10$. This removed points in sparsely populated regions, including many outliers. The resulting point count was $N_{ROR} = 471,639$. It performed slightly more aggressively on certain surface regions than SOR.

The point count data for key parameter variations on the Tail section are summarized below:

Filter Type Key Parameter 1 Key Parameter 2 Points After Filtering Notes
PassThrough (Z-axis) Min: -100 Max: 100 0 Object cropped out.
PassThrough (Z-axis) Min: -1000 Max: 1000 492,868 No filtering.
VoxelGrid Leaf Size: 1.0 86,412 Downsampled, noise not removed.
Statistical (SOR) K=20 $\lambda$=1.0 473,997 Best tuned result.
Radius (ROR) R=1.0 $N_{min}$=10 471,639 Best tuned result.

2.2 Proposed Method Results and Comprehensive Comparison

We implemented the Adaptive Joint Filter with the weight adjustment mechanism targeting a removal rate $\eta$ between 5% and 15% for these steel castings. For the Tail section, starting with weights derived from the best individual parameters ($\alpha$ influencing SOR, $\beta$ influencing ROR), the algorithm converged to a solution that combined their effects.

The proposed method achieved a more thorough removal of peripheral and scattered noise compared to either SOR or ROR alone, while meticulously preserving sharp edges and surface details critical for defect measurement on the steel castings. The final point count for the Tail section was $N_{Proposed} = 455,246$, corresponding to $\eta \approx 7.6\%$.

A comprehensive comparison across all three casting sections—Tail, Hand, and Body—quantifies the performance. The table below shows the point counts before and after filtering with the best-tuned SOR, best-tuned ROR, and the proposed Adaptive Joint Filter, along with the processing time.

Casting Section Filter Algorithm Initial Points ($N_0$) Points After Filtering Removal Rate $\eta$ Processing Time (s)
Tail Section Statistical (SOR) 492,868 473,997 3.8% 58.560
Radius (ROR) 492,868 471,639 4.3% 37.798
Adaptive Joint Filter (Proposed) 492,868 455,246 7.6% 48.256
Hand Section Statistical (SOR) 406,209 277,940 31.6% 43.001
Radius (ROR) 406,209 370,115 8.9% 32.332
Adaptive Joint Filter (Proposed) 406,209 254,163 37.4% 36.783
Body Section Statistical (SOR) 566,863 386,883 31.8% 62.815
Radius (ROR) 566,863 524,308 7.5% 43.614
Adaptive Joint Filter (Proposed) 566,863 375,438 33.8% 48.261

2.3 Analysis of Results

The experimental data leads to several key conclusions regarding the preprocessing of point clouds for wagon coupler steel castings:

  1. Inadequacy of Simple Filters: PassThrough and VoxelGrid filters are unsuitable as primary denoising tools for this application. They cannot address the fundamental challenge of distinguishing random spatial outliers from the authentic casting surface.
  2. Performance of Standard Denoisers: Both SOR and ROR filters are effective and necessary. SOR performs well on globally sparse noise, while ROR is good at cleaning locally sparse areas. However, their performance varies significantly across different geometries (e.g., Hand vs. Body section), indicating a parameter sensitivity problem. The Hand section, with more complex cavities, caused SOR to be overly aggressive ($\eta=31.6\%$), potentially removing valid points.
  3. Advantages of the Proposed Method: The Adaptive Joint Filter consistently delivered a balanced and effective result.
    • Denoising Efficacy: For the Tail section, it achieved a higher, more appropriate removal rate (7.6%) than SOR (3.8%) or ROR (4.3%), indicating more thorough noise cleaning. For the Hand and Body sections, its removal rate aligned more closely with the aggressive-but-necessary SOR filter, suggesting it successfully captured the need for stronger filtering in those complex regions.
    • Feature Preservation: Visually, the clouds processed by the proposed method retained sharper edges and finer surface details compared to those processed by individual filters, which sometimes over-smoothed or under-cleaned certain areas.
    • Computational Efficiency: The processing time of the proposed method (approx. 36-48 seconds) is between that of the faster ROR filter and the slower SOR filter. This represents a very reasonable trade-off, as the joint method’s time is not a simple sum but an integrated process yielding superior quality. The 20-30% time increase over ROR is justified by the significantly improved denoising outcome, which is critical for accurate subsequent analysis of the steel castings.
    • Robustness: By adapting the influence of two complementary filters, the proposed method showed more consistent behavior across different parts of the casting, mitigating the extreme parameter sensitivity seen in the individual filters.

The core equation of our method, the Point Cloud Removal Rate $\eta$, serves as a simple yet effective guide for the adaptive process:

$$ \eta = 1 – \frac{N_{filtered}}{N_0} $$

By seeking a $\eta$ within an empirically validated range for steel castings, the method automates the search for a filter parameter combination that balances thorough cleaning with geometric fidelity.

Conclusion and Future Work

This research addressed the critical preprocessing stage for 3D machine vision inspection of railway wagon coupler steel castings. The presence of noise in raw point clouds poses a significant challenge for automated defect recognition and measurement. We analyzed standard point cloud filtering algorithms and demonstrated their limitations when applied individually to complex industrial scanning data of steel castings.

To overcome these limitations, we proposed a novel Adaptive Joint Filtering Method that synergistically combines Statistical Outlier Removal and Radius Outlier Removal. The method incorporates adaptive weight factors and uses the point cloud removal rate as feedback to guide the denoising process toward an optimal balance. Experimental results on real point cloud data from multiple sections of coupler steel castings confirmed the method’s effectiveness. Compared to using SOR or ROR alone, the proposed method achieved more comprehensive noise removal while better preserving critical geometric features essential for downstream tasks like defect quantification. It maintained computational efficiency, making it suitable for practical industrial deployment.

The current work relies on an empirical target range for the removal rate $\eta$ and heuristic weight adjustment. Future research will focus on increasing the intelligence and autonomy of the system. The primary direction is to integrate a deep learning-based regulator into the filtering pipeline. This regulator would analyze local and global point cloud features (density, curvature, spatial distribution) to predict optimal initial filter parameters or directly adjust the weight factors $\alpha$ and $\beta$ in real-time, eliminating the need for manual parameter tuning for different casting models or scanning setups. Furthermore, exploring the integration of normal-based filtering or advanced non-local denoising concepts could enhance performance on specific types of surface noise prevalent in steel castings. The ultimate goal is a fully adaptive, robust preprocessing module that ensures high-quality point cloud data for reliable automated inspection and robotic processing of critical industrial components like wagon coupler steel castings.

Scroll to Top