Abstract
Stereo matching is a fundamental task in computer vision, critical for depth perception in autonomous driving and robotics. However, achieving a balance between high accuracy and real-time performance on low-power embedded hardware remains a significant challenge. This paper introduces two primary optimizations: a novel zigzag scanning pattern for Zero-Means Normalized Cross Correlation ($Z^2$-ZNCC) and an efficient data-compression technique for cost aggregation (FastDT). Evaluated on the NVIDIA Jetson Tx2, the proposed method achieves 32 fps on 1280x384 images with a 9.26% error rate on the KITTI 2015 benchmark, outperforming previous state-of-the-art implementations in speed while maintaining robustness to illumination changes.
Introduction
Stereo matching calculates depth by identifying corresponding pixels between two horizontally offset images. In the context of mobile robotics and autonomous vehicles, this process must be both robust to environmental variations—such as lighting shifts—and fast enough for real-time decision-making. Existing approaches typically fall into two categories: computationally light methods like Census transforms or Sum of Absolute Differences (SAD), which often fail under non-ideal lighting; and heavy methods like ZNCC or Convolutional Neural Networks (CNNs), which offer high accuracy but struggle to reach real-time speeds on embedded GPUs.
This research targets the Jetson Tx2 platform, aiming to optimize the two most resource-intensive stages of the stereo-matching pipeline: cost calculation (initial similarity matching) and cost aggregation (refining similarities based on neighboring pixels).
Methods
Zigzag Scanning ($Z^2$-ZNCC)
The standard ZNCC algorithm is mathematically robust because it accounts for the mean and variance of pixel windows, making it invariant to linear changes in brightness. However, calculating these values for every pixel involves redundant data fetching from global memory, which is a major bottleneck on embedded GPUs due to memory latency.
The authors propose $Z^2$-ZNCC, which utilizes a zigzag scanning pattern. Instead of traditional row-by-row processing, this pattern allows a GPU thread to traverse pixels in a way that maximizes the reuse of intermediate calculation results. By storing these results in fast, on-chip registers rather than re-fetching them from global memory, the system significantly reduces data transmission and increases the "work per clock cycle" of the GPU.
Fast Domain Transformation (FastDT)
Following cost calculation, the cost aggregation stage refines the disparity map. This stage typically processes 32-bit floating-point numbers, which consumes substantial memory bandwidth. To mitigate this, the researchers developed FastDT, a compression-centric approach to aggregation:
- Normalization: Values are shifted to a nearly zero-mean range to fit within 16-bit integers.
- Bit-Packing: Using a clever 2-bit flag system to identify the position of significant bits, 16-bit data is encoded into 8-bit codes.
This technique allows the system to pack four pixel values into a single 32-bit memory transmission, effectively quadrupling the data throughput during aggregation without a significant loss in depth accuracy.
Experimental Results
The framework was evaluated using the KITTI 2015 benchmark, a standard for autonomous driving research, and compared against Census-based methods, Semi-Global Matching (SGM), and CNN-based models.
Speed and Efficiency
The $Z^2$-ZNCC optimization proved to be 2x faster than traditional scanning methods and 26% faster than previous state-of-the-art NCC implementations. When combined with FastDT, the entire pipeline achieved a processing speed of 32 fps for 1280x384 resolution images on the Jetson Tx2. This represents a significant milestone for real-time performance on embedded hardware.
Accuracy
On the KITTI 2015 dataset, the system recorded an error rate of 9.26%. While deep-learning-based models (CNNs) can achieve lower error rates (approximately 3%), they typically run at fewer than 5 fps on the same embedded hardware, making them less practical for high-speed robotics. Notably, compared to Census-based methods, the ZNCC approach improved accuracy by 7.26% while maintaining nearly identical processing speeds.
Conclusion
By optimizing memory access patterns and data throughput, the authors demonstrate that mathematically complex algorithms like ZNCC can be adapted for real-time use on low-power devices. While the FastDT aggregation can occasionally introduce a "fattening effect" at object boundaries, the overall system provides a practical and robust solution for robotics applications where the high latency of CNNs is unacceptable. Future work will focus on refining the cost aggregation stage to further improve boundary accuracy without sacrificing the real-time advantages of the $Z^2$-ZNCC framework.
Summary updated