Embedding Bilateral Filter in Least Squares for Efficient Edge-preserving Image Smoothing

Wei Liu, Pingping Zhang, Xiaogang Chen, Chunhua Shen, Xiaolin Huang, Jie Yang

Introduction

Edge-preserving smoothing (EPS) is a fundamental task in computational photography and image processing, essential for applications such as noise reduction, HDR tone mapping, and detail enhancement. Traditionally, researchers have faced a significant trade-off between computational efficiency and output quality.

Local methods, such as the Bilateral Filter (BLF), are computationally efficient but frequently introduce artifacts like "halos" or "gradient reversals" (where edges appear unnaturally sharp or inverted). Conversely, global optimization methods, such as Weighted Least Squares (WLS), produce high-quality, artifact-free results by considering the entire image as a single optimization problem. However, these global methods are computationally intensive, often running an order of magnitude slower than their local counterparts. This paper introduces BLF-LS, a hybrid framework that achieves the visual quality of global optimization at the near-real-time speeds of local filtering.

The BLF-LS Framework

The core innovation of this work is a two-step pipeline that decouples the edge-weighting logic from the global reconstruction process.

  1. Gradient Smoothing: Instead of smoothing pixel intensities directly, the algorithm first computes image gradients. It then applies a fast version of a local filter (typically the Bilateral Filter) to these gradients. This step effectively flattens small-scale textures and noise while preserving significant edges.
  2. Global Reconstruction: The smoothed gradients are embedded into a Least Squares (LS) optimization framework. The objective is to find an output image that closely matches the original image's intensities while its gradients align with the pre-smoothed target gradients.

By moving the non-linear weighting into the gradient pre-processing step, the final optimization becomes a homogeneous (unweighted) problem. This allows the system to be solved extremely efficiently in the Fourier domain using Fast Fourier Transforms (FFT), bypassing the need for slow, large-scale linear solvers.

Figure 4: Comparison of gradient reversal artifacts. (a) Input image. (b) Standard BLF results in noticeable gradient reversals around the seagull's edges. (c) The proposed BLF-LS eliminates these artifacts. (d) Intensity and gradient profile illustrating the sharp transition maintained by the method.

As shown in Figure 4, standard local filters like BLF often suffer from gradient reversals, which manifest as unnatural halos or "ringing" near high-contrast edges. By smoothing in the gradient domain and then reconstructing globally, BLF-LS ensures that the output remains "piecewise linear" rather than "piecewise constant," resulting in much smoother transitions and the elimination of these artifacts.

Comparative Evaluation and Results

The authors evaluated BLF-LS against several state-of-the-art methods across various benchmarks. The results demonstrate that BLF-LS provides a significant performance boost without sacrificing image quality.

  • Efficiency: For a 1024 × 1024 color image, BLF-LS processes in approximately 0.16 seconds, compared to 6.8 seconds for the standard WLS method. This represents a speedup of over 40x in some scenarios, and consistently maintains a 10x advantage over traditional global solvers.
  • Visual Quality: Qualitative comparisons indicate that BLF-LS is visually indistinguishable from the much slower WLS method, while successfully avoiding the halos typical of standard LS and the gradient reversals of BLF.
Figure 1: Visual comparison of smoothing techniques. (a) Input images. (b) BLF shows gradient reversals. (c) WLS provides high quality but is slow. (d) Standard LS produces massive halos. (e) BLF-LS achieves WLS-like quality with significantly higher efficiency.

Figure 1 highlights these differences across diverse subjects. While standard Least Squares (LS) creates massive halos due to its unweighted nature, embedding the Bilateral Filter's edge-awareness into the gradients allows the LS solver to act as a high-fidelity reconstruction engine that "cleans up" the local artifacts of the initial filter.

Applications and Versatility

The framework is highly flexible; the Bilateral Filter in the first step can be swapped for other local filters like the Adaptive Manifold Filter (AMF) or Domain Transform Filter (NC) depending on the specific requirements of the task. The authors successfully demonstrated the method's utility in several domains:

  • Detail Enhancement: Boosting fine textures without creating artificial halos around major structures.
  • Texture Removal: Eliminating complex patterns (e.g., mosaic tiles or scales) while keeping primary object boundaries sharp.
  • Artifact Removal: Cleaning up compression noise in digital illustrations and clip-art.

Conclusion

BLF-LS bridges the gap between local and global image smoothing. By leveraging the speed of FFT-based solvers and the edge-preserving properties of local filters in the gradient domain, it offers a practical solution for high-quality, real-time image processing. Future work may extend this "smooth-then-reconstruct" paradigm to video sequences and other complex global optimization problems in computer vision.

Summary updated

BibTeX
@article{liu2020embedding,
  author = {Wei Liu and Pingping Zhang and Xiaogang Chen and Chunhua Shen and Xiaolin Huang and Jie Yang},
  title = {{Embedding Bilateral Filter in Least Squares for Efficient Edge-preserving Image Smoothing}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2020},
  url = {https://openreview.net/forum?id=kt4CXGXPaF},
}
Figure