Abstract
Guided Image Filtering (GF) is a cornerstone technique for edge-preserving smoothing in computer vision. However, its application to multi-channel guidance—such as RGB images or multi-label cost volumes—is hindered by the requirement for computationally expensive matrix inversions at every pixel. This paper introduces the Hardware-Efficient Guided Filter (HGF), which reformulates the filtering process to replace branch-heavy matrix solvers with parallel-friendly element-wise arithmetic and box filters. Furthermore, HGF introduces synthesized polynomial guidance to break the traditional linear model limitation. Experimental results show that HGF achieves state-of-the-art accuracy and real-time performance on modern SIMD architectures.
Introduction
Guided Image Filtering is widely utilized in tasks ranging from image dehazing to stereo matching. Despite its popularity, multi-channel GF faces a significant computational bottleneck: the need to invert an $n \times n$ matrix at every pixel. Standard algorithms like LU decomposition are "branchy," containing numerous conditional statements that disrupt the parallel execution flow of modern CPUs and GPUs. This lack of hardware friendliness makes multi-channel GF impractical for high-resolution, real-time applications.
The core insight of this work is that algorithmic efficiency on modern hardware depends as much on instruction flow as it does on theoretical complexity ($O(N)$). By eliminating branching and introducing non-linearity through polynomial terms, the proposed HGF framework achieves both superior speed and higher precision.
Proposed Method: Hardware-Efficient Guided Filter
The authors propose two primary innovations to modernize the Guided Filter for high-performance computing:
1. Hardware-Efficient Matrix Inversion
Instead of traditional solvers, HGF reformulates the inversion process using a recursive approach based on the Sherman-Morrison formula. This allows the inverse to be computed using only two hardware-optimized operations:
- Element-wise arithmetic: Simple additions and multiplications that map directly to GPU cores.
- Box filtering: A smoothing operation computed in $O(1)$ time using Summed Area Tables.
By reducing the problem to these primitives, the filter eliminates branch instructions, allowing it to fully saturate the parallel computing power of SIMD architectures.
2. Polynomial Guidance
Standard GF assumes a linear relationship between the guidance and output, which can lead to over-smoothing. HGF synthesizes multi-channel polynomial guidance (e.g., using $I, I^2, I^3$ as channels). This introduces non-linearity, allowing the filter to capture complex structures more accurately.
Experimental Results
The HGF was evaluated across several benchmarks, including the Middlebury dataset for stereo matching and various image segmentation tasks.
Speed and Efficiency
On an NVIDIA GPU, HGF achieved sub-12ms processing times for $2000 \times 2000$ images with up to 5 guidance channels. On a CPU, it demonstrated a nearly 7x speedup over standard OpenCV implementations for a $10^3 \times 10^3$ image with 9 channels. As shown in the performance charts below, the HGF matrix inversion method scales far more efficiently than traditional LU decomposition.
Accuracy Improvements
In stereo matching tasks, HGF consistently achieved a lower Percentage of Bad Pixels (PBP) than standard GF and Bilateral Filters. The polynomial guidance allows for better detail preservation, particularly in complex sequences like "Cone" and "Teddy."
Conclusion
The Hardware-Efficient Guided Filter (HGF) successfully addresses the computational challenges of multi-label filtering. By prioritizing hardware-friendly operations and breaking the linearity constraint with polynomial guidance, HGF provides a robust solution for real-time, high-resolution computer vision. While the number of required box filters scales with the square of the channels, the current implementation remains highly efficient for standard multi-label problems. Future work may explore adapting this framework for higher-dimensional data, such as volumetric medical scans.
Summary updated