Source-linked AI summary

Fast Guided Filter

Kaiming He, Jian Sun

arXiv:1505.00996v1cs.CV

TL;DR

The paper addresses the underused opportunity to accelerate an already popular guided filter. It uses subsampled filtering and coefficient upsampling, reducing complexity to O(N/s^2); across real applications, the authors report over 10× speedup with almost no visible degradation.

  • Problem

    A simple guided-filter speedup had not been broadly exploited despite the method’s popularity and existing implementations.

  • Method

    The method subsamples the filtering input and guidance images, computes local linear coefficients and box filters at low resolution, upsamples the coefficients, and computes output using full-resolution guidance.

  • Results

    The method reduces complexity from O(N) to O(N/s^2) and achieves over 10× speedup in practice, with almost no visible degradation across real applications.

  • Takeaways & Limitations

    The acceleration is intended to improve performance of guided-filter applications and further popularize the technique.

Abstract

from arXiv · show

The guided filter is a technique for edge-aware image filtering. Because of its nice visual quality, fast speed, and ease of implementation, the guided filter has witnessed various applications in real products, such as image editing apps in phones and stereo reconstruction, and has been included in official MATLAB and OpenCV. In this note, we remind that the guided filter can be simply sped up from O(N) time to O(N/s^2) time for a subsampling ratio s. In a variety of applications, this leads to a speedup of >10x with almost no visible degradation. We hope this acceleration will improve performance of current applications and further popularize this filter. Code is released.

1. Introduction

The guided filter is a popular, edge-aware smoothing method used in products and official MATLAB and OpenCV. The note presents a subsampling strategy that reduces complexity and reportedly preserves visual quality.

  • The guided filter is an edge-preserving smoothing algorithm with O(N) complexity independent of filter size.It can suppress gradient-reversal artifacts and produce visually pleasing edge profiles.
  • Its visual quality, speed, and implementation simplicity have supported adoption in real products, MATLAB, and OpenCV.Applications include phone image-editing apps and stereo reconstruction.
  • The proposed speedup subsamples the input and guidance images, computes local coefficients at lower resolution, then upsamples those coefficients for full-resolution output.The upsampled coefficients are applied to the original guidance image.
  • The strategy reduces time complexity from O(N) to O(N/s^2) for subsampling ratio s, with an observed speedup exceeding 10×.The strategy had previously been mentioned for joint upsampling but not other generic scenarios.
  • For mega-pixel images, the method reportedly causes almost no visible degradation because subsampled local windows can still contain enough pixels for local statistics.The note provides technical details, visual examples, and released code.

2. Method

The Fast Guided Filter computes guided-filter coefficients on subsampled input and guidance images, then upsamples the coefficients while retaining full-resolution guidance for the output. This reduces the main box-filter computation while preserving the guided-filter pipeline.

  • Guided filter formulation: The guided filter models output pixels locally from guidance image I, filtering input p, and output q.The local model uses coefficients associated with square windows.
  • Guided filter formulation: The standard guided-filter algorithm computes local means, variances, covariances, coefficients a and b, smoothed coefficient maps, and output q.The output is formed by combining the smoothed coefficient maps with the guidance image.
  • Fast Guided Filter: Fast Guided Filter subsamples I and p by ratio s, sets the low-resolution radius to r/s, and performs box filters on the resulting maps.The low-resolution coefficient maps are then bilinearly upsampled before producing the output.
  • Fast Guided Filter: The final output remains q = āI + b̄, using the full-resolution guidance image I after coefficient upsampling.Keeping I at full resolution allows it to guide output edges and structures.
  • Efficiency and applications: O(N/s^2) box-filter computation and >10× speedup at s = 4 are reported, with visual examples covering smoothing, detail enhancement, denoising, and feathering.The examples use s = 4 across the listed applications.
Loading 1505.00996v1…