Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1670 IEEE SIGNAL PROCESSING LETTERS, VOL.

27, 2020

Gaussian-Adaptive Bilateral Filter


Bo-Hao Chen , Member, IEEE, Yi-Syuan Tseng, and Jia-Li Yin, Student Member, IEEE

Abstract—Recent studies have demonstrated that a bilateral where Ki denotes a normalizing factor, σs and σr denote the sizes
filter can increase the quality of edge-preserving image smoothing of the window for extension of the neighborhood and variation
significantly. Different strategies or mechanisms have been used in intensities of the amplitude of an edge, respectively. They can
to eliminate the brute-force computation in bilateral filters. How-
ever, blindly decreasing the processing time of the bilateral filter be set to 30 and 10, respectively, according to [9]. In Eq. (2),
2
gi −gj 2
cannot further ameliorate the effectiveness of filter. In addition, the second term exp(− i−j σs2 ) and third term exp(− σr2 )
even when the processing speed of the filter is increased, inherent are referred to as the Gaussian spatial kernel, denoted as Gs ,
problem occurred in the Gaussian range kernel when facing a noise
filtering input and its effect on edge-preserving image smoothing and the range kernel, denoted as Gr , respectively. The Gaussian
operation are barely discussed. In this letter, we propose a novel spatial kernel defines the influence of pixels at different spatial
Gaussian-adaptive bilateral filter (GABF) to resolve the aforemen- distances, whereas the Gaussian range kernel describes the
tioned problem. The basic idea is to acquire a low-pass guidance contribution of pixels with different intensities.
for the range kernel by a Gaussian spatial kernel. Such low-pass Among the weighted-average filters, the BF is probably
guidance lead to a clean Gaussian range kernel for later bilateral
composite. The results of experiments conducted on several test the simplest and most effective filter for image smoothing
datasets indicate that the proposed GABF outperforms most exist- and can recover the content of an image while preserving its
ing bilateral-filter-based methods. edges effectively. However, because of the nature of brute-force
Index Terms—Bilateral filter, gaussian range kernel, gaussian computation per pixel in Eq. (2), several early attempts made
spatial kernel, image smoothing. by various researchers focused on reducing the computational
I. INTRODUCTION burden. In general, state-of-the-art BFs can be categorized as
quantization based [7], [10], approximation based [9], [11], [12],
DGE-PRESERVING smoothing the content in an image
E is a fundamental problem in computer vision [1] and com-
puter graphics [2]. Many studies have focused on this problem
transformation based [13], [14], and histogram based [4], [15].
Quantization-based BFs first quantize the intensity range into
a small set of levels, after which each level undergoes bilateral
which is related to suppressing and/or extracting image content, filtering by using convolutions. Durand et al. [7] developed a
such as edge detection [3], feature extraction [4], image restora- piecewise-linear BF that discretizes the possible signal intensity
tion [5], image matting [6], and high dynamic range (HDR) and computes each value by linearly interpolating between two
compression [7]. closest values to display HDR images. Yang et al. [10] extended
The works have mainly relied on the following linear the piecewise-linear BF and proposed a constant-time BF by
translation-variant filtering process f : calculating each value between two closest principle bilateral

f (i) = Wi,j (g)Ij , (1) filtered image components, where the computational complexity
j does not vary with kernel size.
Approximation-based BFs usually take advantage of the
where g and I denote guidance and input images, respectively, shiftable approximation of the Gaussian spatial and/or range
and these may be identical depending on the problem. Wi,j kernels to bilateral filtering. Porikli [11] proposed a speed-up
denotes the filter kernel at i and j positions of the guidance BF in constant time by using both integral histograms and
image. For instance, the filter kernel in a bilateral filter (BF) [8] Taylor approximation to avoid the redundant operations with the
can be represented as Gaussian spatial and range kernels. Ghosh et al. [11] approxi-
   
1 i − j2 gi − gj 2 mated the Gaussian range kernel via a Fourier basis for bilateral
Wi,j (g) =
bf
exp − exp − , filtering, where the coefficients were acquired by resolving a
Ki σs2 σr2
series of least-squares problems. Ghosh et al. also developed a
(2)
trigonometric (Fourier) approximation for the Gaussian range
Manuscript received August 13, 2020; accepted September 14, 2020. Date kernel of bilateral filtering in [9]. Chaudhury et al. [16] decom-
of publication September 18, 2020; date of current version October 5, 2020. posed the BF into a sequence of spatial convolutions applying a
This work was supported by the Ministry of Science and Technology, Taiwan,
under Grant MOST 108-2221-E-155-034-MY3 and Grant MOST 107-2221-E- Gaussian polynomial approximation algorithm to the Gaussian
155-052-MY2. The associate editor coordinating the review of this manuscript range kernel. Transformation-based BFs transfer the bilateral
and approving it for publication was Prof. Jianxin Li. (Corresponding author: filtering process to high-dimensional convolutions to speed up
Bo-Hao Chen.)
The authors are with the Department of Computer Science and Engineer- the process. For example, Paris et al. [13] expressed the bilateral
ing, Yuan Ze University and the Innovation Center for Big Data and Digital filtering process in a higher-dimensional space and thereby de-
Convergence, Yuan Ze University, Taoyuan 320, Taiwan (e-mail: bhchen@ veloped an accelerated BF by downsampling space and intensity
saturn.yzu.edu.tw; ghu259@gmail.com; s1079104@mail.yzu.edu.tw).
Digital Object Identifier 10.1109/LSP.2020.3024990 in this domain. Dai et al. [14] developed a unified mechanism to

1070-9908 © 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.

Authorized licensed use limited to: Constantin Vertan. Downloaded on October 07,2020 at 11:51:41 UTC from IEEE Xplore. Restrictions apply.
CHEN et al.: GAUSSIAN-ADAPTIVE BILATERAL FILTER 1671

noise and the retention of a higher number of edges be-


ing achieved, as demonstrated in the bottom part of third
column in Fig. 1.

II. GAUSSIAN-ADAPTIVE BILATERAL FILTER


The BF degrades considerably when the guidance g and noise
filtering input I are identical. As an example, in Fig. 2(a), the
bilateral kernel achieves limited smoothing because the range
kernel is corrupted with additive noise. Hence, a key charac-
teristic of our GABF is that g and I are nonidentical, which
implies that as soon as a low-pass filtering process is performed
to achieve a guidance for the range kernel, a strict preservation
Fig. 1. Edge-preserving image smoothing results of a classical BF for a noise
filtering input. For comparison, the subfigures from each result are cropped. of the image contours is enforced, as demonstrated in Fig. 2(b).
For a given image I, the Gaussian blur process, which corre-
sponds to low-pass filtering, is first applied to produce a low-pass
compute the bilateral filtering in linear time by transforming the guidance image. This is achieved by a weighted average of pixels
filtering process into a series of 3D box filtering processes. The in the adjacent positions with a weight descending from the
bilateral filtering is considered as an operator acting on the local center position i. This process can be represented as follows:
histogram by the histogram-based BFs. Hence, Weiss [4] added  g
linear-data approximation on the basis of distributive histograms f (i) = Wi,j (g)Ij , (3)
to the logarithmic BF to accelerate the filtering process. Zhang j
et al. [15] generalized the integral histograms to a constant-time
joint BF by using a devised data structure. where the filter kernel can be defined by
Although these bilateral-filter-based approaches focused on  
eliminating the brute-force computation approach used in bilat- g 1 i − j2
Wi,j (g) = exp − . (4)
eral filters, the inherent problem in the Gaussian range kernel Ki σs2
when dealing with noise filtering input and its effect on the
edge-preserving smoothing operation has seldom been consid- An example of Gaussian blur process with different values
ered. In Fig. 1, we present the results obtained by a classical BF of σs is given in Fig. 3. We observe that the resulting image
with a noise filtering input, where we applied Eq. (1) with the significantly loses its contents and sharp edges, and abrupt
bilateral filtering kernel of Eq. (2) to smooth images corrupted discontinuities occur as the values of σs increase, which means
by Gaussian random noise (see the zoomed-in region shown that more averaging is performed. Consequently, most edges of
in the upper part of the second column). The ground-truth the resulting image, shown in Fig. 3(d), are blurred. However,
low-pass image is obtained by using the BF from the noise-free the BF degrades to a classical Gaussian filter when g and I are
filtering input shown in the upper part of the third column. The identical and the filtering input I is oversmooth.
bottom part of the second column shows a noisy result of the For noise filtering inputs, we ensure that g and I are noniden-
BF. This is mainly due to the incapability of the noisy range tical; in other words, the Gaussian spatial kernel is exploited on
kernel in dealing with the noise filtering input. Nevertheless, all filtering input I while the Gaussian range kernel describes the
of the aforementioned state-of-the-art BF-based methods have influence of pixels from low-pass guidance ḡj obtained from the
different strategies or mechanisms to approximate the effort of Gaussian blur process on Ii . Therefore, the Gaussian-adaptive
BFs and ease their nature of brute-force computation, which bilateral kernel is defined as
means the effort of these methods becomes closer to that of a    
BF and exhibit the same problem for a noise filtering input. gabf 1 i − j2 Ii − ḡj 2
Wi,j (I, ḡ) = exp − exp − ,
This motivated us to develop a variation of the BF that can be Ki σs2 σr2
applied to arbitrary images. In this letter, we propose a Gaussian- (5)
adaptive BF (GABF) to resolve the aforementioned problems. where ḡ is the low-pass guidance and can be obtained by Eq. (3).
Our major contributions are listed as follows: The Gaussian spatial kernel on I coupled with Gaussian range
r We propose adaptive bilateral filtering for edge-preserving kernel from ḡ enforces a strict preservation of image edges and
image smoothing by using a variation of the bilateral contours, while smoothing surfaces of objects in the filtering
kernel. output f (i) although the filtering input I is corrupted by different
r For the first time in edge-preserving image smoothing op- noise compositions. Hence, the filtering output f (i) of the GABF
erations, the simple bilateral filtering can not only achieve can be expressed as
edge-preserving smoothing in the presence of various

noise, but also adapt to dynamically changing scenarios. f (i) = gabf
Wi,j (I, ḡ)Ij . (6)
r Finally, the proposed GABF significantly outperforms
j
existing state-of-the-art BF-based methods in edge-
preserving image smoothing, with a large reduction in The entire process of our GABF is illustrated in Fig. 2(b).

Authorized licensed use limited to: Constantin Vertan. Downloaded on October 07,2020 at 11:51:41 UTC from IEEE Xplore. Restrictions apply.
1672 IEEE SIGNAL PROCESSING LETTERS, VOL. 27, 2020

Fig. 2. Comparison between BF and our GABF for edge-preserving image smoothing. (a) Considering the guidance g and noise filtering input I are identical
and using I as the filtering input, the BF performs edge-preserving image smoothing via a noisy Gaussian range kernel. (b) Our proposed GABF first generates
a low-pass guidance g for the Gaussian range kernel, whereas I is processed by the Gaussian spatial kernel so that edge-preserving image smoothing can be
performed by the noise-free Gaussian-adaptive bilateral kernel.

Fig. 3. Gaussian blur process in Eq. (3) using different σs values in Eq. (4).
(a) Input image corrupted by Gaussian random noise. (b) Ground-truth image.
Images smoothed using the following: (c) σs = 3.5; and (d) σs = 7.0. Fig. 4. Visual comparison for edge-preserving image smoothing on Set5.

III. EXPERIMENTS
A. Implementation Details
In this study, we select five frequently used benchmark
datasets — namely Set5 [17], USC-SIPI [18], Urban100 [19],
BSDS100 [20], and Set14 [21] — to verify the suitability of
our GABF and other BF-based methods, including the BF
[8], Fourier Approximation based BF (FABF) [12], Gaussian-
Fig. 5. Visual comparison for edge-preserving image smoothing on USC-SIPI.
Polynomial Approximation based BF (GPABF) [16], and Opti-
mized Fourier Approximation based BF (OFABF) [9]. To ensure
a fair comparison, we follow a previous work [9] to set σs
and σr to 30 and 10, respectively, in our GABF and the other
BF-based methods. We perform all our evaluations using a
desktop computer with an Intel i7-3.60 GHz processor and 16
GB RAM to execute Matlab codes on the luminance channel in
the YCbCr color space.

B. Qualitative Analysis
The edge-preserving image smoothing results are shown in Fig. 6. Visual comparison for edge-preserving image smoothing on Urban100.
Figs. 4–9, where the first column shows the noise-free original
image and the upper part of the second column (denoted as
Original) shows a zoomed-in region from the image. To ensure to generate a noise filtering input, which is shown in the upper
a fair comparison, we regard the low-pass image filtered using part of the fourth column (denoted as Noise). The remaining
the BF from the noise-free original image as our ground-truth zoomed-in regions in the figure present the edge-preserving
image (upper part of third column; this figure is denoted as image smoothing results achieved after the methods under com-
ground-truth). We add Gaussian random noise with a variance parison are applied to the image. It is clear that our GABF yields
of 0.10 and standard deviation of 0.15 into the original image the best results. Figs. 4–9 show that many noise artifacts remain

Authorized licensed use limited to: Constantin Vertan. Downloaded on October 07,2020 at 11:51:41 UTC from IEEE Xplore. Restrictions apply.
CHEN et al.: GAUSSIAN-ADAPTIVE BILATERAL FILTER 1673

TABLE I
AVERAGE SSIM/PSNR/GMSD VALUES ATTAINED FROM EDGE-PRESERVING
IMAGE SMOOTHING RESULTS ON EACH DATASET. VALUES INDICATING THE
BEST PERFORMANCE ARE SHOWN IN BOLD

Fig. 7. Visual comparison for edge-preserving image smoothing on Urban100.

Fig. 8. Visual comparison for edge-preserving image smoothing on BSD100.

Fig. 9. Visual comparison for edge-preserving image smoothing on Set14.

in the image after the BF, FABF, GPABF, and OFABF are applied
to it, and hence, these methods fail to recover a clean low-pass
image. This is because the FABF, GPABF, and OFABF only
focus on fast approximation with respect to the BF. Thus, they Fig. 10. Application example for image deraining.
exhibit negative results similar to that of the BF when processing
noise input images because the noise input corrupts the range
kernel in the representation of the photometric range between D. Performance on Other Tasks
pixels. To verify the validity of our GABF further, we apply these
BF-based methods to an image-deraining task along with the
C. Quantitative Analysis deraining method [25] for image decomposition. The results
To measure the quality of the edge preserving image smooth- of image deraining are shown in Fig. 10. Only our GABF
ing of the five datasets, Structural Similarity Index (SSIM) can effectively filtering low-pass components from rain streaks,
[22], peak signal-to-noise ratio (PSNR) [23], and Gradient which would then benefit the image-deraining task.
Magnitude Similarity Deviation (GMSD) [24] are applied. The
results are summarized in Table I. Notably, higher SSIM and
PSNR values indicate superior accuracy, whereas lower GMSD IV. CONCLUSION
values imply better gradient similarity between the recovered In this letter, we proposed a novel Gaussian-adaptive bilat-
and ground-truth images. Rather than incorporating a fast ap- eral kernel that can adaptively acquire a clean Gaussian range
proximation to a BF as used in FABF, GPABF, and OFABF, kernel for different noise filtering inputs. On the basis of the
we propose to exploit the influence of pixels from low-pass Gaussian-adaptive bilateral kernel, we proposed a GABF. It is
guidance obtained from the Gaussian blur process on range a simple yet efficient edge-preserving image smoothing filter
kernel modeling. The quantitative results in Table I indicate that that enables the use of a noise-free bilateral kernel to effectively
our GABF performs considerably better than the other BF-based perform edge-preserving image smoothing for noise filtering
methods for each dataset. In other words, this strategy supports inputs. The experimental results on five datasets demonstrated
our proposed Gaussian-adaptive bilateral kernel in handling the that our GABF outperforms four other state-of-the-art BF-based
edge-preserving image smoothing problem under degradation methods. We also demonstrated that our GABF achieves promis-
due to noise. ing results when used in image-deraining tasks.

Authorized licensed use limited to: Constantin Vertan. Downloaded on October 07,2020 at 11:51:41 UTC from IEEE Xplore. Restrictions apply.
1674 IEEE SIGNAL PROCESSING LETTERS, VOL. 27, 2020

REFERENCES [14] L. Dai, M. Yuan, and X. Zhang, “Speeding up the bilateral filter: A
joint acceleration way,” IEEE Trans. Image Process., vol. 25, no. 6,
[1] L. Tang, H. Li, Q. Wu, and K. N. Ngan, “Boundary-guided optimization pp. 2657–2672, Jun. 2016.
framework for saliency refinement,” IEEE Signal Process. Lett., vol. 25, [15] K. Zhang, G. Lafruit, R. Lauwereins, and L. Van Gool, “Constant time
no. 4, pp. 491–495, Apr. 2018. joint bilateral filtering using joint integral histograms,” IEEE Trans. Image
[2] Q. Zou, “A PDE model for smooth surface reconstruction from 2D parallel Process., vol. 21, no. 9, pp. 4309–4314, Sep. 2012.
slices,” IEEE Signal Process. Lett., vol. 27, pp. 1015–1019, 2020. [16] K. N. Chaudhury and S. D. Dabhade, “Fast and provably accurate bilateral
[3] G. Dong and S. T. Acton, “On the convergence of bilateral filter for edge- filtering,” IEEE Trans. Image Process., vol. 25, no. 6, pp. 2519–2528,
preserving image smoothing,” IEEE Signal Process. Lett., vol. 14, no. 9, Jun. 2016.
pp. 617–620, Sep. 2007. [17] M. Bevilacqua, A. Roumy, C. Guillemot, and M. line Alberi Morel, “Low-
[4] B. Weiss, “Fast median and bilateral filtering,” ACM Trans. Graph., vol. 25, complexity single-image super-resolution based on nonnegative neighbor
no. 3, Jul. 2006, Art. no. 519526. embedding,” in Proc. Brit. Conf. Mach. Vis., 2012, pp. 135.1–135.10.
[5] J. Yin, B. Chen, and Y. Li, “Highly accurate image reconstruction [18] A. Weber, The USC-SIPI Image Database, 2020. [Online]. Available: http:
for multimodal noise suppression using semisupervised learning on //sipi.usc.edu/database/
big data,” IEEE Trans. Multimedia, vol. 20, no. 11, pp. 3045–3056, [19] J. Huang, A. Singh, and N. Ahuja, “Single image super-resolution from
Nov. 2018. transformed self-exemplars,” in Proc. IEEE Conf. Comput. Vis. Pattern
[6] K. He, J. Sun, and X. Tang, “Guided image filtering,” IEEE Trans. Pattern Recognit, 2015, pp. 5197–5206.
Anal. Mach. Intell., vol. 35, no. 6, pp. 1397–1409, Jun. 2013. [20] P. Arbelez, M. Maire, C. Fowlkes, and J. Malik, “Contour detection and
[7] F. Durand and J. Dorsey, “Fast bilateral filtering for the display of high- hierarchical image segmentation,” IEEE Trans. Pattern Anal. Mach. Intell.,
dynamic-range images,” ACM Trans. Graph., vol. 21, no. 3, Jul. 2002, vol. 33, no. 5, pp. 898–916, May 2011.
Art. no. 257266. [21] S. Xie and Z. Tu, “Holistically-nested edge detection,” in Proc. Int. Conf.
[8] C. Tomasi and R. Manduchi, “Bilateral filtering for gray and color images,” Comput. Vis., 2015, pp. 1395–1403.
in Proc. Int. Conf. Comput. Vis., 1998, pp. 839–846. [22] S. V. R. Dendi, C. Dev, N. Kothari, and S. S. Channappayya, “Generating
[9] S. Ghosh, P. Nair, and K. N. Chaudhury, “Optimized fourier bilateral image distortion maps using convolutional autoencoders with application
filtering,” IEEE Signal Process. Lett., vol. 25, no. 10, pp. 1555–1559, to no reference image quality assessment,” IEEE Signal Process. Lett.,
Oct. 2018. vol. 26, no. 1, pp. 89–93, Jan. 2019.
[10] Q. Yang, K. Tan, and N. Ahuja, “Real-time O(1) bilateral filtering,” in [23] G. Baloch, H. Ozkaramanli, and R. Yu, “Residual correlation regulariza-
Proc. IEEE Conf. Comput. Vis. Pattern Recognit., 2009, pp. 557–564. tion based image denoising,” IEEE Signal Process. Lett., vol. 25, no. 2,
[11] F. Porikli, “Constant time O(1) bilateral filtering,” in Proc. IEEE Conf. pp. 298–302, Feb. 2018.
Comput. Vis. Pattern Recognit., 2008, pp. 1–8. [24] W. Xue, L. Zhang, X. Mou, and A. C. Bovik, “Gradient magnitude
[12] S. Ghosh and K. N. Chaudhury, “On fast bilateral filtering using fourier ker- similarity deviation: A highly efficient perceptual image quality index,”
nels,” IEEE Signal Process. Lett., vol. 23, no. 5, pp. 570–573, May. 2016. IEEE Trans. Image Process., vol. 23, no. 2, pp. 684–695, Feb. 2014.
[13] S. Paris and F. Durand, “A fast approximation of the bilateral filter using [25] L. Kang, C. Lin, and Y. Fu, “Automatic single-image-based rain streaks
a signal processing approach,” in Proc. Euro. Conf. Comput. Vis., 2006, removal via image decomposition,” IEEE Trans. Image Process., vol. 21,
pp. 568–580. no. 4, pp. 1742–1755, Apr. 2012.

Authorized licensed use limited to: Constantin Vertan. Downloaded on October 07,2020 at 11:51:41 UTC from IEEE Xplore. Restrictions apply.

You might also like