The bilateral filter is a popular non-linear smoother that has applications in image processing, computer vision, and computational photography. The novelty of the filter is that a range kernel is used in tandem with a spatial kernel for performing edge-preserving smoothing, where both kernels are usually Gaussian. A direct implementation of the bilateral filter is computationally expensive, and several fast approximations have been proposed to address this problem. In particular, it was recently demonstrated in a series of papers that a fast and accurate approximation of the bilateral filter can be obtained by approximating the Gaussian range kernel using polynomials and trigonometric functions. By adopting some of the ideas from this line of work, we propose a fast algorithm based on the discrete Fourier transform of the samples of the range kernel. We develop a parallel C implementation of the resulting algorithm for Gaussian kernels, and analyze the effect of various extrinsic and intrinsic parameters on the approximation quality and the run time. A key component of the implementation are the recursive Gaussian filters of Deriche and Young.
Source CodeThe ANSI C source code used in the demo can be downloaded from the web page of this article 1 . Compilation and usage instruction are included in the README.txt of the archive.