Improvement of Optical Flow Estimation by Using the Hampel Filter for Low-End Embedded Systems

Ji-Il Park, YeongSeok Lee, Eungyo Suh, Hyun-Yong Jeong, Kuk-Jin Yoon, Kyung-Soo KimIEEE RA-L 2021 · OpenReview

Introduction

Optical flow estimation—the process of calculating the apparent motion of objects, surfaces, and edges in a visual scene—is a fundamental requirement for autonomous navigation. For small unmanned ground vehicles (UGVs) and micro-aerial vehicles (MAVs), optical flow enables critical tasks such as obstacle avoidance and target tracking. However, state-of-the-art deep learning models for optical flow typically require high-performance GPUs, which are often incompatible with the strict weight, size, and power constraints of low-end embedded systems. This research proposes a computationally efficient alternative by integrating a 2D Hampel filter into traditional optical flow pipelines.

The Challenge of Embedded Optical Flow

Traditional non-deep-learning methods often utilize a "coarse-to-fine" pyramid approach to estimate motion. A vital component of this process is the post-processing filter used to remove noise from the flow field. Standard median filters are the common choice due to their simplicity, but they frequently cause "oversmoothing," which blurs sharp motion boundaries and degrades accuracy at the edges of moving objects. While weighted median filters can mitigate this blurring, their high computational complexity makes them unsuitable for real-time execution on low-power microcontrollers or CPUs.

The 2D Hampel Filter Approach

The researchers addressed this gap by adapting the Hampel filter—traditionally a 1D signal processing tool for outlier removal—into a 2D image and flow field operator. Unlike a standard median filter that replaces every pixel with a local median, the Hampel filter is a decision-based operator:

  1. Statistical Calculation: It determines the local median ($M$) and the Median Absolute Deviation (MAD) within a specified window ($K$).
  2. Outlier Detection: A pixel is flagged as an outlier only if its value falls outside a threshold ($t$) of standard deviations from the median.
  3. Conditional Replacement: If a pixel is an outlier, it is replaced by the median; otherwise, the original value is preserved.

By only modifying pixels identified as noise, the Hampel filter preserves the integrity of accurate motion vectors at object boundaries, avoiding the characteristic blur of the median filter.

Experimental Evaluation and Results

The proposed method was evaluated using the KITTI Vision Benchmark Suite (2012 and 2015) and synthetic noise tests.

Synthetic Noise Performance

To demonstrate the filter's edge-preservation capabilities, the authors applied it to a grayscale image corrupted with salt-and-pepper noise. As shown in the comparative analysis below, the Hampel filter significantly outperforms the standard median filter in maintaining image detail, especially as the window size ($K$) increases.

Comparison of Median and Hampel filters on a noisy image. The Hampel filter (c, d, g, h) preserves significantly more detail than the standard median filter (a, e), especially at larger window sizes (K=7).

Real-World Benchmark Performance

On the KITTI 2015 benchmark, the "Classic+Hampel" configuration demonstrated superior consistency compared to baseline methods. The approach achieved a standard deviation of 20.49% for pixels with errors greater than 3 pixels, outperforming both the standard median-based "BA" method (23.79%) and the more complex weighted median "Classic+NL-Fast" method (21.17%). Qualitatively, the Hampel-based pipeline was more effective at identifying the sharp edges of moving vehicles and detecting occluded objects in complex outdoor environments.

Conclusion

By replacing traditional smoothing filters with a 2D Hampel filter, the researchers have developed a robust optical flow estimation method tailored for low-power robotics. The "leave it alone if it's okay" logic of the Hampel filter provides a unique balance: it offers the boundary preservation of expensive weighted filters with the computational efficiency required for embedded deployment. Future work will focus on porting the current MATLAB implementation to optimized C/C++ for real-time testing on physical UGV and drone hardware.

Summary updated

BibTeX
@article{park2021improvement,
  author = {Ji-Il Park and YeongSeok Lee and Eungyo Suh and Hyun-Yong Jeong and Kuk-Jin Yoon and Kyung-Soo Kim},
  title = {{Improvement of Optical Flow Estimation by Using the Hampel Filter for Low-End Embedded Systems}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2021},
  url = {https://openreview.net/forum?id=YKdMOqIevD},
}
Figure