Professional Documents
Culture Documents
Abstract— The bilateral filter is a non-linear filter that uses a and a box or Gaussian kernel is used for spatial filtering [3].
range filter along with a spatial filter to perform edge-preserving In this setting, the bilateral filtering of an image { f (i ) :
smoothing of images. A direct computation of the bilateral filter i ∈ I}, I being some finite rectangular domain of Z2 , is
requires O(S) operations per pixel, where S is the size of the
support of the spatial filter. In this paper, we present a fast and given by
j ∈ w( j )gσr ( f (i − j ) − f (i )) f (i − j )
provably accurate algorithm for approximating the bilateral filter
when the range kernel is Gaussian. In particular, for box and f BF (i ) = (1)
Gaussian spatial filters, the proposed algorithm can cut down the j ∈ w( j )gσr ( f (i − j ) − f (i ))
complexity to O(1) per pixel for any arbitrary S. The algorithm
has a simple implementation involving N + 1 spatial filterings, where
where N is the approximation order. We give a detailed analysis t2
of the filtering accuracy that can be achieved by the proposed gσr (t) = exp − 2 . (2)
approximation in relation to the target bilateral filter. This allows 2σr
us to estimate the order N required to obtain a given accuracy. The spatial filter is a Gaussian:
We also present comprehensive numerical results to demonstrate
that the proposed algorithm is competitive with the state-of-the- i 2
art methods in terms of speed and accuracy. w(i ) = exp − 2 (i ∈ ), (3)
2σs
Index Terms— Edge-preserving smoothing, bilateral filter,
kernel, approximation, fast algorithm, error analysis, bounds. or a box:
I. I NTRODUCTION w(i ) = 1/|| (i ∈ ). (4)
The algorithms in [10]–[12] are particularly relevant to algorithm arising from the Gaussian-polynomial approxima-
the present work. Here the authors proceed by approximat- tion and analyze its approximation quality. We present exhaus-
ing (2) using polynomial and trigonometric functions, and tive numerical results in Section IV, and demonstrate its
demonstrate how the bilateral filter can be decomposed into superior performance over existing algorithms.
a series of spatial filterings as result. As is well-known,
since spatial box and Gaussian filters can be implemented in II. G AUSSIAN -P OLYNOMIAL A PPROXIMATION
constant-time using separability and recursion [13], the overall The present idea is to consider the translated kernel
approximation can therefore be computed in constant-time. gσr (t −τ ) that appears in (1), where t = f (i − j ) and τ = f (i ).
We can write
B. Present Contribution
τ2 t2 τt
We propose a fast algorithm for computing (1) which was gσr (t − τ ) = exp − 2 exp − 2 exp . (5)
2σr 2σr σr2
motivated by the line of work in [12] and [14]. In particular,
similar to these papers, we present a novel approximation For a fixed translation τ , this is a function of t. Notice that
of (2) that allows us to decompose the bilateral filter into the first term is simply a scaling factor, while the second
a series of spatial convolutions. The fundamental difference term is a Gaussian centered at the origin. In fact, the second
between the above papers and the present approach is that, term essentially contributes to the bell shape of the translated
instead of approximating (2) and then translating the approxi- Gaussian. The third term is a monotonic exponential, which
mation in range space, we directly approximate the translated is increasing or decreasing depending on the sign of τ ; this
Gaussians appearing in (1). In particular, the computational term helps in translating the Gaussian to t = τ .
advantages obtained using the proposed approximation are the We assume (without loss of generality, as will be explained
following: at the start of Section III) that the dynamic range of the image
• For a fixed approximation order (to be defined shortly),
is [−T, T ]. That is, the arguments t = f (i − j ) and τ = f (i )
the proposed approximation requires half the number in (5) take values in [−T, T ]. This means that the product
of spatial filterings required by the approximations τ t appearing in (5) takes values in [−T 2 , T 2 ]. Consider the
in [8], [10], and [12]. Taylor expansion of the exponential term about the origin:
• The proposed approximation does not involve the tran- N−1 1 τ t n
τt
scendental functions cos(ωx) and sin(ωx) which are exp = + higher-order terms. (6)
σr2 n! σr2
used in [12] and [14]. It only involves polynomials (and n=0
just a single Gaussian), and hence can be efficiently By dropping the higher-order terms, we obtain the following
implemented on hardware [15]. Moreover, the rounding approximation of (5):
error is small when working with polynomials. 2 N−1
As will be demonstrated shortly, the proposed algorithm is t + τ2 1 τ t n
φ N,σr (t, τ ) = exp − . (7)
generally faster and more accurate than Yang’s algorithm [8], 2σr2 n! σr2
n=0
which is currently considered to be the state-of-the-
art [10], [16]. In particular, we perform an error analysis Being the product of a bivariate Gaussian and a polynomial,
whereby we compare the output obtained using the proposed we will henceforth refer to (7) as a Gaussian-polynomial,
algorithm with that of the exact bilateral filter. Due to the where N is its approximation order. By construction, we have
particular nature of the proposed approximation, our analysis the pointwise convergence
is much more simple than that carried out for Yang’s algorithm lim φ N,σr (t, τ ) = gσr (t − τ ). (8)
in [16]. Nevertheless, compared to Yang’s algorithm, we are N→∞
able to establish a smaller bound on the number of spatial We would like to note that the above idea of splitting the kernel
filterings required to achieve a given filtering accuracy. The and approximating a part of its using Taylor polynomials was
latter is defined in terms of the error between the outputs of employed in [17] in the context of the fast Gauss transform.
the bilateral filter and the fast algorithm (this will be made To the best of our knowledge, this idea has not been exploited
precise in Section III). To best of our knowledge, with the for fast bilateral filtering along the lines of the present work.
exception of [8], this is the only fast algorithm that comes In Figure 1, we study the approximations corresponding to
with a provable guarantee on the quality of approximation. different N. The fundamental difference between the Taylor
At this point, we note that the term “accurate” is used in the approximation in [11] and the Gaussian-polynomial approxi-
paper not just to signify that the output of the fast algorithm mation (8) is that instead of approximating the entire Gaussian,
is visibly close to that of the target bilateral filter. It also has we approximate one of its component, namely the exponential
a precise technical meaning, namely, that we can control the function in (5). The intuition behind this is that the Taylor
approximation order to make the error between the outputs of polynomial blows up as one moves away from the origin. This
the bilateral filter and the fast algorithm arbitrarily small. makes it difficult to approximate the tail part of a Gaussian
using such polynomials. On the other hand, the exponential
C. Organization in (5) is monotonic, and hence can be closely approximated
The rest of the paper is organized as follows. We present using polynomials. This point is explained with an example
the proposed kernel approximation and the error analysis in Figure 2. In particular, notice in Figure 2b that the Gaussian-
in Section II. In Section III, we develop a fast constant-time polynomial approximation is quite precise over the range of
CHAUDHURY AND DABHADE: FAST AND PROVABLY ACCURATE BILATERAL FILTERING 2521
Fig. 3. Comparison of the actual error (9) and the bound in (12) for T = 128
and σr = 30. We plot the samples of the error function E 40,30 (t, τ ) over the
Fig. 1. Approximation of g30 (t −τ ) using Gaussian-polynomials φ N,30 (t, τ ) square domain −128 ≤ t, τ ≤ 128 in (a). We compare this with the samples
with different N . The bivariate functions g30 (t −τ ) and φ N,30 (t, τ ) have been of (12) over the same domain in (b), where we have set s = |τ t|. Notice that
sampled along t = −τ to generate a one-dimensional profile. the supremum of either plots are of the same order of magnitude.
interest, and is comparable to the raised-cosine approximation Using (11), we obtain the following result. We note that this
of same order [12]. bound is stronger than that derived for the fast Gauss transform
in [17].
A. Quantitative Error Analysis Proposition 1:
∞
Before explaining how we can use Gaussian-polynomials e−λ λn
to derive a fast bilateral filter in Section III, we study the E N,σr ∞ ≤ λ = T 2 /σr2 . (13)
n!
kernel error incurred by approximating (2) using Gaussian- n=N
polynomials. We will see in Section III that a bound on the To arrive at (13), we proceed by writing (12) as
kernel error can in turn be used to bound the filtering accuracy N−1 n
of the fast algorithm. Note that (8) tells us that Gaussian- s 1 s
ψ N,σr (s) = 1 − exp − 2 .
polynomial can be used to approximate the range kernel with σr n! σr2
n=0
arbitrary accuracy. However, in practice, we will be required to
use a Gaussian-polynomial of some fixed order N. A relevant After differentiation, we get
question is the size of error incurred for a given N? A related N−1
1 s s
question is that, given some error margin ε > 0, how do we fix ψ N,σ (s) = exp − ≥ 0.
r
(N − 1)!σr2 σr2 σr2
the smallest N such that the corresponding error is within ε?
To begin with, we define the error function Thus, (12) is non-decreasing on [0, T 2 ], whereby we conclude
that the maximum in (11) is attained at s = T 2 . This
E N,σr (t, τ ) = gσr (t − τ ) − φ N,σr (t, τ )
2 ∞ establishes Proposition 1.
t + τ2 1 τt n To get an idea of the tightness of the bound in (13), we
= exp − . (9)
2σr2 n! σr2 compare the mesh plots of (9) and (12) in Figure 3 when
n=N
σr = 30 and N = 40. While there is a gap between the error
The mathematical problem is one of bounding (9) for fixed N and the corresponding bound at certain values of (t, τ ), the
and σr . In this work, we consider the ∞ error given by supremum of the latter (which occurs at one of the boundaries
as predicted above) is nevertheless of the same order of
E N,σr ∞ = max |E N,σr (t, τ )| : −T ≤ t, τ ≤ T . (10) magnitude as the supremum of the former.
2522 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 25, NO. 6, JUNE 2016
By bounding (29), we can control the pixelwise difference IV. E XPERIMENTS AND D ISCUSSION
between the exact and the approximate bilateral filter. In par- We implemented the proposed GPA algorithm using
ticular, we have the following result which formally establishes Matlab 8.4 on an Intel 3.4 GHz Linux system with 8 GB mem-
the intuitive fact that the filtering accuracy is essentially within ory. The Matlab implementation has been shared here [20].
a certain factor of the kernel error given by (10). The details The set of grayscale images used for the experiments are
of the derivation are provided in Appendix VI-C. shown in Figure 5. We compared the proposed algorithm with
Proposition 4: Suppose that the spatial filter is non- the following fast algorithms: Yang [8], Paris [9], Weiss [22],
negative and normalized, i.e., w( j ) ≥ 0 for all j ∈ , and and the Shiftable Bilateral Filter (SBF) [14]. We used the
Matlab implementation of these algorithms to make the com-
w( j ) = 1. (30) parison fair; moreover, we used the parameter settings sug-
j ∈ gested in the respective papers. For determining the order
Then in [8] for a given accuracy parameter δ, we have used (34).
T E N,σr ∞ A. Experiment 1
fBF − f GPA ∞ ≤ 2 . (31)
w(0) − E N,σr ∞ The output of the proposed GPA algorithm on a couple of
We note that the spatial filters (3) and (4) are non-negative, images are shown in Figures 6 and 7. We also provided the
and that w(i ) appears in both the numerator and denominator output obtained using exact bilateral filtering. We performed
of (1) and (23). Therefore, we can assume (30) without any the comparison using the box and the Gaussian kernels for
loss of generality. In fact, (30) is automatically true for the box the spatial filter. Notice that the speedup obtained is signifi-
filter. We also recall that the range of the image is assumed to cant. Moreover, the filtered images are visually identical and
be centered; the intensity values are in the interval [−T, T ], numerically very close, in terms of the ∞ and mean-squared
where T ≈ 128 for most grayscale images. errors. We have used the following definition of mean-squared
error (MSE):
2
C. Relation Between Accuracy and N0 MSE = 10 log10 |I|−1 f BF (i ) − fGPA (i ) ,
Note that by combining (31) with the bound in (15), we i∈I
get a direct control on the filtering accuracy in terms of the where |I| denotes the number of pixels in the image.
CHAUDHURY AND DABHADE: FAST AND PROVABLY ACCURATE BILATERAL FILTERING 2525
Fig. 6. Comparison of the exact bilateral filter (BF) and the proposed approximation (GPA) on images I1 and I2 . A Gaussian kernel (σs = 5) is used for
the spatial filter, and σr = 50 for the Gaussian range kernel. The accuracy parameter was set to δ = 0.1 for the GPA. In the caption of (a) and (c), we
report the run time of the BF. In the caption of (b) and (d), we report the run time of the GPA, and the ∞ and mean-squared errors between BF and GPA.
(a) BF (10.2 sec). (b) GPA (0.77 sec, −72 dB, −174 dB). (c) BF (9.4 sec). (d) GPA (0.85 sec, −58 dB, −162 dB).
Fig. 7. The setup here is identical to that in Figure 6, with the difference that a box kernel (W = 10) is used for the spatial filter instead of the Gaussian.
(a) BF (4.3 sec). (b) GPA (0.61 sec, −65 dB, −164 dB). (c) BF (4.22 sec). (d) GPA (0.62 sec, −54 dB, −155 dB).
Fig. 8. Comparison of the filtering accuracy and the run time of four different algorithms as a function of the parameters σs (Gaussian spatial filter) and σr .
We used image I1 in Figure 5 for the comparison. We used δ = 1 for GPA and Yang’s algorithm [8]. A tolerance of 0.01 was used for the SBF [14].
(a) σs = 3. (b) σs = 3. (c) σr = 30. (d) σr = 30.
Fig. 9. Comparison of the filtering accuracy and the run time as a function of W and σr . The settings are identical to that in Figure 8; the difference here
is that we have used a box spatial kernel instead of a Gaussian kernel. (a) W = 4. (b) W = 4. (c) σr = 30. (d) σr = 30.
Fig. 10. Comparison of the filtering accuracy (∞ error and MSE) of various fast algorithms on the images in Figure 5. The red horizontal lines
in 10a and 10b represent the accuracy parameter δ used for GPA and Yang’s algorithm. The tolerance for SBF was set to be 0.01. In 10a - 10b, we
show the results for a Gaussian spatial kernel, and in 10c - 10d we show the results for a box kernel. We used σr = 30 for the Gaussian range kernel in all
the experiments. (a) σs = 5. (b) σs = 5. (c) W = 4. (d) W = 4.
TABLE III
C OMPARISON OF THE P ROPOSED GPA A LGORITHM W ITH YANG ’s A LGORITHM [8] FOR D IFFERENT O RDER N . T HE ∞ E RROR AND THE MSE A RE
IN D ECIBELS , W HILE THE T IME I S IN M ILLISECONDS . T HE C OMPARISON I S D ONE ON I MAGE I5 U SING B OTH B OX AND G AUSSIAN
S PATIAL F ILTERS ; THE T YPE OF S PATIAL F ILTER I S M ENTIONED W ITHIN B RACKETS . T HE R ESPECTIVE PARAMETERS FOR
THE B OX AND G AUSSIAN F ILTER A RE W = 4 AND σs = 5, AND σr = 30 FOR THE G AUSSIAN R ANGE K ERNEL .
N OTICE T HAT THE A CCURACY OF GPA S ATURATES A BOVE N = 60.
compared to (33), since log(1/δ) δ −1/2 when δ < 1. in Figures 8 and 9. As before, we performed the comparison
Moreover, the leading constant in (34) is much larger than for both the box and Gaussian spatial filters. It is evident from
the constant in the first term in (33). As an example, when these results that the proposed method is competitive with
δ = 3 and σr = 50, we have N0 ≈ 27 for Yang’s algorithm existing methods in terms of the speed-accuracy tradeoff.
(this is the estimate reported in [16]). On the other hand,
the corresponding estimate for our algorithm is N0 ≈ 19 C. Experiment 3
(assuming that we use a box filter of size 3×3). The difference We next compared the proposed algorithm with existing fast
becomes dramatic for smaller values of δ. For example, when algorithms on the images shown in Figure 5. A summary of the
σr = 50 and δ = 0.01, the estimate from (33) is 24, while that comparisons (in terms of maximum pixelwise error and MSE)
from (34) is 456. Further comparisons are provided in Table II. is provided in Figure 10.
Notice that the order for Yang’s approximation explodes when
δ < 1 (sub-pixel accuracy). It is also seen from the table D. Experiment 4
that (33) provides a close approximation of (18) for the setting Finally, we performed a detailed comparison of the proposed
under consideration. algorithm with Yang’s algorithm, which is widely considered
to be the state-of-the-art algorithm. In the first comparison,
B. Experiment 2 we fixed an image and the parameters of the bilateral filter.
A graphic comparison of the algorithms for various The order N was then varied and the corresponding error and
settings of the spatial and range kernels is presented run times were noted. The results are presented in Table III.
CHAUDHURY AND DABHADE: FAST AND PROVABLY ACCURATE BILATERAL FILTERING 2527
TABLE IV
C OMPARISON OF THE GPA A LGORITHM W ITH YANG ’s A LGORITHM [8] AT D IFFERENT δ. S EE TABLE III FOR THE PARAMETER S ETTINGS .
Notice that the run time of GPA is consistently smaller than B. Derivation of (26)
that of Yang’s algorithm for both the box and Gaussian In terms of (24), we can write φ N,σr ( f (i − j )− f (i )) f (i − j )
kernels. Indeed, as remarked earlier, for a fixed order N, as
Yang’s algorithm [8] requires 2N spatial filterings, while GPA N−1
requires only N +1 spatial filterings. Thus, the runtime of GPA f (i )2 1
σr exp − G n (i )Fn+1 (i − j ). (37)
is about half of that of Yang’s algorithm. Moreover, beyond 2σr2 n!
n=0
a certain N, GPA provides much better filtering accuracy.
We performed a similar experiment by varying δ, the results On substituting (37) in the numerator of (23), and exchanging
of which are reported in Table IV. Notice that the run time of the summations, we get
Yang’s algorithm becomes prohibitively large when δ is small.
w( j )φ N,σr ( f (i − j ) − f (i )) f (i − j )
j ∈
V. C ONCLUSION
f (i )2
= exp − P(i ),
We presented a novel fast algorithm for approximating the 2σr2
bilateral filter. The algorithm was shown to be both fast and
which gives us (27) where we have used (25). Similarly, on
accurate in practice using extensive experiments. The space
substituting (37) in the denominator of (23), and exchanging
and time complexity of the proposed algorithm is smaller
the summations, we get
than the state-of-the-art algorithm of Yang et al. [8], and,
moreover, was shown to provide much better accuracy. We also f (i )2
performed an error analysis of the approximation scheme, and w( j )φ N,σr ( f (i − j ) − f (i )) = exp − Q(i ),
2σr2
presented a rule for setting the approximation order that can j ∈
guarantee the filtering accuracy to be within a desired margin. where Q(i ) is given by (28). Cancelling the common expo-
nential term from the numerator and denominator, we get (26).
A PPENDIX
A. Derivation of (18) C. Derivation of (31)
Taking the logarithm of (17), we can restate the problem as To establish (31), we write (1) as f BF (i ) = P1 (i )/Q 1 (i ),
one of finding the smallest integer x > λ such that where
ν(x) = x log x − px − q ≥ 0 (35) P1 (i ) = w( j )gσr ( f (i − j ) − f (i )) f (i − j ),
j ∈
where p = 1 + log(λ) and q = −λ − log ε.
and
Notice that ν (λ) = 0 and ν (x) = 1/x > 0. Hence, ν(x) is
strictly convex over (0, ∞) with a minimum at x = λ. Since Q 1 (i ) = w( j )gσr ( f (i − j ) − f (i )).
ν(λ) = log ε < 0 when ε < 1, we conclude that there exists j ∈
some θ > λ for which ν(θ ) = 0. The smallest integer solution
Similarly, we write (23) as f GPA (i ) = P2 (i )/Q 2 (i ), where
of (17) is precisely [θ ]. To find θ , we solve the equations
ν(θ ) = 0 and θ > λ. Note that we can write ν(θ ) = 0 as P2 (i ) = w( j )φ N,σr ( f (i − j ) − f (i )) f (i − j ),
q
q j ∈
exp = qe− p , (36)
θ θ and
which is of the form y exp(y) = qe− p , where y = q/θ .
Q 2 (i ) = w( j )φ N,σr ( f (i − j ) − f (i )).
The inverse of the mapping y → y exp(y) is a well-studied
j ∈
function called the Lambert W-function [19]. In particular, the
inverse (which is generally multivalued) in this case is given by We can then write fBF (i ) − f GPA (i ) as
q P1 (i )(Q 2 (i ) − Q 1 (i )) + Q 1 (i )(P1 (i ) − P2 (i ))
= W0 (qe− p ), =
θ Q 1 (i )Q 2 (i )
where W0 (t) is one of the two branches of the Lambert 1
= f BF (i )(Q 2 (i ) − Q 1 (i )) + P1 (i ) − P2 (i ) . (38)
W-function [19]. This gives us estimate (18). Q 2 (i )
2528 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 25, NO. 6, JUNE 2016
We uniformly upper-bound (resp. lower-bound) the numerator [5] C. Knaus and M. Zwicker, “Progressive image denoising,” IEEE Trans.
(resp. denominator) in (38). In particular, note that Image Process., vol. 23, no. 7, pp. 3114–3125, Jul. 2014.
[6] K. N. Chaudhury and K. Rithwik, “Image denoising using optimally
f BF ∞ ≤ T. (39) weighted bilateral filters: A sure and fast approach,” in Proc. IEEE ICIP,
Sep. 2015, pp. 108–112.
[7] F. Durand and J. Dorsey, “Fast bilateral filtering for the display of high-
This follows from the fact that f BF (i ) in (1) can be expressed dynamic-range images,” ACM Trans. Graph., vol. 21, no. 3, pp. 257–266,
as a convex combination of { f (i − j ) : j ∈ }. On the other 2002.
hand, Q 2 (i ) − Q 1 (i ) is [8] Q. Yang, K.-H. Tan, and N. Ahuja, “Real-time O(1) bilateral filtering,”
in Proc. IEEE CVPR, Jun. 2009, pp. 557–564.
w( j ) gσr ( f (i − j ) − f (i )) − φ N,σr ( f (i − j ) − f (i )) . [9] S. Paris and F. Durand, “A fast approximation of the bilateral filter using
a signal processing approach,” in Proc. ECCV, 2006, pp. 568–580.
j ∈ [10] K. Sugimoto and S. I. Kamata, “Compressive bilateral filtering,” IEEE
Trans. Image Process., vol. 24, no. 11, pp. 3357–3369, Nov. 2015.
Therefore, using (30), we get [11] F. Porikli, “Constant time O(1) bilateral filtering,” in Proc. IEEE CVPR,
Jun. 2008, pp. 1–8.
Q 1 − Q 2 ∞ ≤ E N,σr ∞ . (40) [12] K. N. Chaudhury, D. Sage, and M. Unser, “Fast O(1) bilateral filtering
using trigonometric range kernels,” IEEE Trans. Image Process., vol. 20,
Similarly, no. 12, pp. 3376–3382, Dec. 2011.
[13] R. Deriche, “Recursively implementating the Gaussian and its deriva-
P1 − P2 ∞ ≤ E N,σr ∞ T. (41) tives,” INRIA, France, Res. Rep. INRIA-00074778, 1993.
[14] K. N. Chaudhury, “Acceleration of the shiftable O(1) algorithm for
To uniformly lower-bound Q 2 (i ), we note that for i ∈ I, bilateral filtering and nonlocal means,” IEEE Trans. Image Process.,
vol. 22, no. 4, pp. 1291–1300, Apr. 2013.
Q 1 (i ) = w(0)gσr (0) + w( j )gσr ( f (i − j ) − f (i )) [15] J.-M. Muller, Elementary Functions: Algorithms and Implementation.
j ∈\{0} Cambridge, MA, USA: Birkhäuser, 2006.
[16] S. An, F. Boussaid, M. Bennamoun, and F. Sohel, “Quantitative error
≥ w(0), analysis of bilateral filtering,” IEEE Signal Process. Lett., vol. 22, no. 2,
pp. 202–206, Feb. 2015.
where we have used the non-negativity of the range and spatial [17] C. Yang, R. Duraiswami, and N. A. Gumerov, “Improved fast Gauss
kernels. Using the inverse triangle inequality along with (40), transform,” Dept. Comput. Sci., Univ. Maryland, College Park, MD,
USA, Tech. Rep. CS-TR-4495, 2003.
we have for i ∈ I, [18] M. Mitzenmacher and E. Upfal, Probability and Computing:
Randomized Algorithms and Probabilistic Analysis. Cambridge, U.K.:
|Q 2 (i )| ≥ Q 1 (i )−|Q 2 (i )− Q 1 (i )| ≥ w(0)−E N,σr ∞ . (42) Cambridge Univ. Press, 2005.
[19] R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey, and
Combining (38) - (42), we arrive at (31). D. E. Knuth, “On the Lambert W function,” Adv. Comput. Math., vol. 5,
no. 1, pp. 329–359, 1996.
[20] K. Chaudhury and S. Dabhade. Fast and
D. Derivation of (33) Accurate Bilateral Filtering, MATLAB Central File Exchange, accessed
on Mar. 25, 2016. [Online]. Available: http://www.mathworks.com/
Note that typically δ T . For example, T is in hundreds matlabcentral/fileexchange/56158
for a grayscale image, whereas, δ ∼ 1. Therefore, it follows [21] Image Databases, accessed on Sep. 2, 2015. [Online]. Available:
from (32) that ε ≈ w(0)δ/(2T ). On the other hand, from http://www.imageprocessingplace.com/root_files_V3/image_databases.
htm
(18) and (19), we have [22] B. Weiss, “Fast median and bilateral filtering,” ACM Trans. Graph.,
q eλ vol. 25, no. 3, pp. 519–526, 2006.
N0 ≈ = ,
t − t2 1 − (q/eλ)
where t = q/eλ and q = −λ + log(1/ε). Since |q| < eλ,
Kunal N. Chaudhury (M’08–SM’14) is currently
1
≈ 1 + (q/eλ). an Assistant Professor of Electrical Engineering with
1 − (q/eλ) the Indian Institute of Science. His research areas
include fast algorithms for image and video process-
Therefore, N0 ≈ eλ + q = (e − 1)λ + log(1/ε). ing, convex optimization models and fast solvers,
sensor network localization, multiview registration,
and Fourier and wavelet analysis. He is a member
ACKNOWLEDGEMENTS of SIAM. He is on the Editorial Board of the SPIE
Journal of Electronic Imaging.
The authors thank Dr. Alessandro Foi and the anonymous
reviewers for their useful comments and suggestions.
R EFERENCES
[1] K. N. Chaudhury, “Fast and accurate bilateral filtering using Swapnil D. Dabhade received the B.E. degree in
Gauss-polynomial decomposition,” in Proc. IEEE ICIP, Sep. 2015, electronics and telecommunication engineering from
pp. 2005–2009. the Vishwakarma Institute of Information Technol-
[2] P. Perona and J. Malik, “Scale-space and edge detection using ogy, Pune, India, in 2013. He is currently pursuing
anisotropic diffusion,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 12, the M.E. degree in system science and automation
no. 7, pp. 629–639, Jul. 1990. with the Indian Institute of Science. He was a
[3] C. Tomasi and R. Manduchi, “Bilateral filtering for gray and color project intern with the Tata Institute of Fundamental
images,” in Proc. IEEE 6th ICCV, Jan. 1998, pp. 839–846. Research, Ooty, in 2012 and 2013. His research
[4] S. Paris, P. Kornprobst, J. Tumblin, and F. Durand, “Bilateral filtering: interests include image processing, computer vision,
Theory and applications,” Found. Trends Comput. Graph. Vis., vol. 4, and VLSI and FPGA design.
no. 1, pp. 1–73, 2009.