Fast O(1) Bilateral Filtering Using Trigonometric Range Kernels

Kunal Narayan Chaudhury, Daniel Sage, Michael Unser · DOI

TL;DR

This paper presents a novel O(1) (constant time) algorithm for bilateral filtering by introducing trigonometric range kernels. This approach offers superior approximation quality compared to previous polynomial-based methods, enabling faster and more accurate edge-preserving image smoothing.

What Problem Does This Paper Address?

Bilateral filtering is a powerful image processing technique that smooths images while preserving edges. However, its direct implementation is computationally expensive, especially for large filters, making real-time applications challenging. Existing O(1) algorithms, while fast, often rely on polynomial approximations of the range kernel, which can lead to artifacts and limited accuracy. This paper aims to bridge this gap by developing a constant-time bilateral filter that uses trigonometric functions for the range kernel, offering a more accurate and efficient solution.

Methods

The core of this paper's contribution lies in leveraging the properties of trigonometric functions to linearize the non-linear bilateral filter. The authors generalize the O(1) algorithm proposed by Porikli, which used polynomial range kernels. Instead, they introduce trigonometric range kernels, specifically "raised cosines," which are shown to have desirable properties for image filtering: symmetry, non-negativity, and monotonicity.

The key idea is to express the bilateral filter as a linear combination of spatial averages of transformed images. By using trigonometric kernels, the non-linear range component can be decomposed into a sum of terms involving complex exponentials. Each of these terms can then be filtered using a standard O(1) spatial averaging algorithm (like those based on Fourier transforms or recursive filters). The final filtered image is obtained by combining the results of these auxiliary image filters. This approach effectively transforms the computationally intensive non-linear operation into a series of fast linear operations.

Datasets

Not discussed in the paper. The paper focuses on the algorithmic development and evaluation using standard image processing concepts rather than specific datasets.

Key Insights and Ideas

  • Trigonometric Kernels for Linearization: The paper's central insight is that trigonometric functions, like polynomials, are "self-shiftable," meaning their translates are also trigonometric functions of the same degree. This property allows for the linearization of the bilateral filter's non-linear range component.
  • Superior Approximation of Gaussians: Trigonometric kernels, particularly raised cosines, provide a significantly better approximation of Gaussian kernels compared to polynomial approximations, especially for a given number of terms. This leads to higher quality results with fewer computational resources.
  • Exactness for Raised Cosines: The proposed method provides an exact implementation for the family of raised cosine range kernels, unlike previous methods that relied on approximations.
  • Control over Variance: The use of trigonometric kernels offers a clear mechanism to control the variance (effective width) of the range kernel, allowing for fine-tuning of the filtering process.

Key Results

  • Constant-Time Complexity: The algorithm achieves O(1) complexity for bilateral filtering, meaning the processing time is independent of the spatial filter size.
  • Improved Accuracy: The paper demonstrates that trigonometric kernels provide superior approximation of Gaussian kernels compared to polynomial kernels. Figure 3 shows that the output using their algorithm is very close to the exact output, while the polynomial-based method [10] exhibits noticeable artifacts. The standard deviation of the error between the exact output and their algorithm's output was 1.2, compared to 6.5 for the polynomial method.
  • Fast Processing: Experiments show that the algorithm is significantly faster than direct implementations. For a 720x540 grayscale image, processing times ranged from 27ms to 3604ms depending on the spatial and range kernel variances, which is considerably faster than direct methods that took seconds for similar settings.
  • Parallelizability: The algorithm is inherently parallelizable, allowing for further speedups on multi-core processors.

Limitations and Future Work

  • Approximation for Narrow Gaussians: The paper acknowledges that approximating very narrow Gaussian kernels over large intervals still requires a large number of terms (high degree N) for trigonometric kernels, similar to the limitation in [10]. This can lead to increased computation time.
  • Lookup Tables for Small σγ: For very small variances of the range kernel (σγ < 15), the required degree N becomes large. The authors suggest using lookup tables to determine N for small σγ to optimize processing.
  • Future Work: The paper hints at an "approximation scheme for further accelerating the processing for very small σγ, without appreciably degrading the final output," which is beyond the scope of the current paper. The ability to extend this to space-variant spatial kernels is also mentioned as a benefit.

Summary updated

BibTeX
@article{chaudhury2011fast,
  author = {Kunal Narayan Chaudhury and Daniel Sage and Michael Unser},
  title = {{Fast O(1) Bilateral Filtering Using Trigonometric Range Kernels}},
  journal = {IEEE Trans. Image Process.},
  year = {2011},
  doi = {10.1109/tip.2011.2159234},
}
Figure