research article optimal (1) bilateral filter with ...downloads.hindawi.com › journals › mpe ›...

12
Research Article Optimal O(1) Bilateral Filter with Arbitrary Spatial and Range Kernels Using Sparse Approximation Shengdong Pan, Xiangjing An, and Hangen He College of Mechatronics Engineering and Automation, National University of Defence Technology (NUDT), Changsha, Hunan 410073, China Correspondence should be addressed to Xiangjing An; [email protected] Received 15 October 2013; Accepted 9 January 2014; Published 18 February 2014 Academic Editor: Chung-Hao Chen Copyright © 2014 Shengdong Pan et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. A number of acceleration schemes for speeding up the time-consuming bilateral filter have been proposed in the literature. Among these techniques, the histogram-based bilateral filter trades the flexibility for achieving O(1) computational complexity using box spatial kernel. A recent study shows that this technique can be leveraged for O(1) bilateral filter with arbitrary spatial and range kernels by linearly combining the results of multiple-box bilateral filters. However, this method requires many box bilateral filters to obtain sufficient accuracy when approximating the bilateral filter with a large spatial kernel. In this paper, we propose approximating arbitrary spatial kernel using a fixed number of boxes. It turns out that the multiple-box spatial kernel can be applied in many O(1) acceleration schemes in addition to the histogram-based one. Experiments on the application to the histogram-based acceleration are presented in this paper. Results show that the proposed method has better accuracy in approximating the bilateral filter with Gaussian spatial kernel, compared with the previous histogram-based methods. Furthermore, the performance of the proposed histogram-based bilateral filter is robust with respect to the parameters of the filter kernel. 1. Introduction e bilateral filter is proposed by Tomasi and Manduchi in [1]. Before this name, it is called SUSAN filter [2]. e general idea of the bilateral filter stems from the earlier work of the neighborhood filter [3] and the sigma filter [4]. e bilateral filter is a noniterative, nonlinear spatial filter which imposes both the geometric affinity and the intensity similarity when aggregating the contribution of each neighboring pixel within the spatial support. Hence the shape of the filter kernel is data adaptive, which enables the filter to preserve abrupt edges when smoothing out small variations. Such an edge-avoiding smoothing property is later demonstrated to be of much potential use in many applications in computer vision and graphics. It has become a general tool in image processing literature, where it is employed in noise cancelation [1, 58], high-dynamic-range tone mapping [911], image enhancement [1214], and many other applications [1517]. On the flip side of its convenient properties for image- and video-based applications, the direct implementation of the standard bilateral filter requires ( 2 ) operations per pixel, where is the radius of the effective support of the spatial kernel. e computational complexity is too intensive for time-critical applications. Consequently, a plenty of studies on its simplification and acceleration can be found in the literature. Durand and Dorsey proposed a piecewise linear bilateral filter in [9]. ey quantize the intensity into several segments and perform FFT-based linear filtering for each seg- ment. e final results are pooled using a linear interpolation on these linearly filtered images. e complexity of Durand’s piecewise linear bilateral filter is (log ). Pham and van Vliet [18] decomposed the 2D bilateral convolution using two 1D bilateral convolutions and reduced the complexity to ( ). Paris et al. [19] and later Chen et al. [11] generalize the idea of the piecewise linear bilateral filter by Durand et al. to form a 3-D bilateral grid. en the bilateral filtering can be interpreted as a linear convolution of a vector-valued image. Based on an equipollent subsampling in the augmented data Hindawi Publishing Corporation Mathematical Problems in Engineering Volume 2014, Article ID 289517, 11 pages http://dx.doi.org/10.1155/2014/289517

Upload: others

Post on 05-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Research ArticleOptimal O(1) Bilateral Filter with Arbitrary Spatial and RangeKernels Using Sparse Approximation

Shengdong Pan Xiangjing An and Hangen He

College of Mechatronics Engineering and Automation National University of Defence Technology (NUDT) ChangshaHunan 410073 China

Correspondence should be addressed to Xiangjing An anxjnudteducn

Received 15 October 2013 Accepted 9 January 2014 Published 18 February 2014

Academic Editor Chung-Hao Chen

Copyright copy 2014 Shengdong Pan et alThis is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

A number of acceleration schemes for speeding up the time-consuming bilateral filter have been proposed in the literature Amongthese techniques the histogram-based bilateral filter trades the flexibility for achieving O(1) computational complexity using boxspatial kernel A recent study shows that this technique can be leveraged for O(1) bilateral filter with arbitrary spatial and rangekernels by linearly combining the results of multiple-box bilateral filters However this method requires many box bilateral filters toobtain sufficient accuracywhen approximating the bilateral filter with a large spatial kernel In this paper we propose approximatingarbitrary spatial kernel using a fixed number of boxes It turns out that the multiple-box spatial kernel can be applied in manyO(1)acceleration schemes in addition to the histogram-based one Experiments on the application to the histogram-based accelerationare presented in this paper Results show that the proposed method has better accuracy in approximating the bilateral filter withGaussian spatial kernel compared with the previous histogram-based methods Furthermore the performance of the proposedhistogram-based bilateral filter is robust with respect to the parameters of the filter kernel

1 Introduction

The bilateral filter is proposed by Tomasi and Manduchiin [1] Before this name it is called SUSAN filter [2] Thegeneral idea of the bilateral filter stems from the earlierwork of the neighborhood filter [3] and the sigma filter[4] The bilateral filter is a noniterative nonlinear spatialfilter which imposes both the geometric affinity and theintensity similarity when aggregating the contribution ofeach neighboring pixel within the spatial support Hence theshape of the filter kernel is data adaptive which enables thefilter to preserve abrupt edges when smoothing out smallvariations Such an edge-avoiding smoothing property islater demonstrated to be of much potential use in manyapplications in computer vision and graphics It has becomea general tool in image processing literature where it isemployed in noise cancelation [1 5ndash8] high-dynamic-rangetone mapping [9ndash11] image enhancement [12ndash14] and manyother applications [15ndash17]

On the flip side of its convenient properties for image- andvideo-based applications the direct implementation of thestandard bilateral filter requires 119874(1205902

119904) operations per pixel

where 120590119904is the radius of the effective support of the spatial

kernel The computational complexity is too intensive fortime-critical applications Consequently a plenty of studieson its simplification and acceleration can be found in theliterature Durand and Dorsey proposed a piecewise linearbilateral filter in [9] They quantize the intensity into severalsegments and performFFT-based linear filtering for each seg-mentThe final results are pooled using a linear interpolationon these linearly filtered images The complexity of Durandrsquospiecewise linear bilateral filter is 119874(log120590

119904) Pham and van

Vliet [18] decomposed the 2D bilateral convolution usingtwo 1D bilateral convolutions and reduced the complexity to119874(120590119904) Paris et al [19] and later Chen et al [11] generalize the

idea of the piecewise linear bilateral filter by Durand et al toform a 3-D bilateral grid Then the bilateral filtering can beinterpreted as a linear convolution of a vector-valued imageBased on an equipollent subsampling in the augmented data

Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2014 Article ID 289517 11 pageshttpdxdoiorg1011552014289517

2 Mathematical Problems in Engineering

space the complexity of this method is 119874(1 + |R|120590119904120590119903)

where |R| denotes the number of grids of the intensity and120590119903is the bandwidth of the range kernel Thus the bilateral

grid method runs faster with larger spatial kernel Weiss[20] develops an 119874(log120590

119904) algorithm for local histogram

calculation which is later used to derive an119874(log120590119904) bilateral

filter with box spatial kernel Porikli [21] proposes an 119874(1)

box bilateral filter by virtue of the 119874(1) integral histogram[22] Porikli [21] and Yang et al [23] and later Chaudhuryet al [24 25] suggest the use of some series of the intensityto approximate arbitrary range kernel and employ 119874(1)

algorithms to efficiently compute the spatial filtering for eachterm of the series

Based onPoriklirsquos119874(1) single-box bilateral filter proposedin [21] Gunturk proposes an 119874(1) bilateral filter with arbi-trary spatial and range kernels by linearly combiningmultiplesingle-box bilateral filters [26]The accuracy can be improvedcomparedwith the single-box bilateral filter in approximatingthe bilateral filter with arbitrary spatial kernel Howeverwhen the radius of the effective spatial support is largea large number of single-box bilateral filters are requiredto guarantee the accuracy Furthermore no instruction forthe selection over all the possible box spatial kernels ispresented when the number of single-box bilateral filter islimited Consequently Gunturkrsquos method does not producesufficiently good approximation with only a few additionalsingle-box bilateral filters when the spatial kernel is largeMore details about the limitations of Gunturkrsquos method areshown in the following text

In this paper we focus our attention on approximatingarbitrary spatial kernel with a fixed number of boxes Withthis constraint the MSE-based optimization becomes a well-known sparse representation problem We then employ theBatch-OMP method published recently in [27] to solve theproblem for the radiuses and the coefficients of the boxes Inaddition to the application to the histogram-based bilateralfilter the proposedmethod can be employed in other acceler-ation schemes by substituting the spatial filtering with a fixedtimes of box filtering Hence a number of119874(1) bilateral filtersare produced Afterwards the application to the histogram-based bilateral filter is discussed with some representativeexperiments Results show that the proposed histogram-based bilateral filter is robust and sufficiently accurate overa large range of the size of the spatial kernel and outperformsthe other congeneric methods in both the accuracy and therobustness

The rest of this paper is arranged as follows Briefdescriptions of the original bilateral filter and its accelerationschemes are provided in Section 2 where the previousaccelerations are categorized into several types and analyzedrespectively Then in Section 3 the proposed method forapproximating arbitrary spatial kernel with a fixed numberof boxes is deduced in detail The application to somepopular acceleration schemes is also provided in this sectionAfterwards the application to the histogram-based bilateralfilter is tested in Section 4 together with some comparisonswith the previous histogram-based methods Finally theconclusions are drawn in Section 5 followed by some furtherdiscussions

2 Related Works

Thebilateral filter is proposed byTomasi andManduchi in [1]It is a normalized convolution in which the contribution ofa neighboring pixel depends on both the geometric distanceand the intensity difference with regard to the center pixelGenerally arbitrary kernels can be applied to both the spatialand range filtering to measure the affinity between one pixeland its neighbors The discrete form of the bilateral filterwith arbitrary spatial and range kernels can be formulated asfollows

119906BF(x) =

sumyisin119873(x)119870119904 (x minus y)119870119903(V (x) minus V (y)) V (y)

sumyisin119873(x)119870119904 (x minus y)119870119903(V (x) minus V (y))

(1)

where V and 119906 are respectively the original image and thefiltered image and119873(x) denotes the effective spatial supportof the filtering kernel which is centered at x 119870

119904and 119870

119903

are respectively the spatial and range kernels The originalbilateral filter employs Gaussian kernels for both the spatialand range filtering which provides intuitive control overthe similarity measure with the variances respectively forthese two kernels However the brute-force implementationof the Gaussian bilateral filter is rather time consuming andis thus too slow for real-time applications Consequentlymany research papers have been devoted to accelerating thecomputation of the bilateral filter and many publications canbe found during the past decade

21 Kernel Separation Pham and Vliet proposed a methodto approximate the 2-D data-adaptive convolution usingtwo 1-D data-adaptive convolutions [18] The computationalcomplexity is reduced from 119874(120590

2

119903) operations per pixel to

119874(120590119903) operations per pixel where 120590

119903denotes the radius of

the effective spatial support This method performs well inregions with simple structure However it does not producesatisfactory results in textured regions

22 Piecewise Linear Approximation Durand and Dorseyproposed a piecewise linear approximation of the bilateralfilter in [9] The authors first quantize the original intensityinto several segments Then for each segment 119894

119896 a range-

weighted image pair (119869119896119882119896) is calculated Afterwards a

linearly filtered result 119906119896for each 119894

119896is generated by linear

filtering with the corresponding range-weighted image pairwhich can be formulated as follows

119906119896(x) =

sumyisin119873(x)119870119904 (x minus y) 119869119896(y)

sumyisin119873(x)119870119904 (x minus y)119882119896(y)

(2)

where119882119896(y) = 119870

119903(119894119896minusV(y)) and 119869

119896(y) = 119882119896(y)V(y)Then the

final result is obtained by linearly interpolating between twoclosest filtered images that is for V(x) isin [119894

119896 119894119896+1

] the filteredoutput at x is given as follows

119906BF(x) =

(119894119896+1

minus V (x)) 119906119896(x) + (V (x) minus 119894

119896) 119906119896+1

(x)119894119896+1

minus 119894119896

(3)

The computational complexity is dramatically reducedsince the implementation requires only 119874(log120590

119903) operations

Mathematical Problems in Engineering 3

per pixel using fast Fourier transform (FFT) to compute each119906119896 It is further accelerated by performing a subsampling in

the spatial domainRecently based on Durandrsquos formulation Yang et al

[23] employedDerichersquos recursive approximation of Gaussiankernel [28] to calculate the spatial filtering which can beimplemented in constant time and can be realized in real timein some graphic processing units (GPU)

23 3-D Bilateral Grid Manipulations The piecewise linearbilateral filter is later generalized and further accelerated byParis et al in [19]The authors express the filtering in a higher-dimensional space where another dimension for the intensityis added to the original spatial dimensionsThen the bilateralfiltering can be expressed as simple linear convolutions witha vector-valued image in this augmented space followed by apoint-by-point division With the new representation of thedata simple criteria are derived for subsampling the data toachieve significant acceleration of the bilateral filter With thesame computational time this method is more accurate thanthe piecewise linear bilateral filter by Durand and Dorsey in[9]

Built upon the technique by Paris et al in [19] Chen et al[11] extend the higher-dimensional approach and introduce anew compact data structuremdashthe bilateral gridThis enables avariety of fast edge-preserving image processing applicationsThe authors parallelize the bilateral-grid algorithm in mod-ern graphics hardware with graphic processing units (GPU)The GPU-based implementation is two orders of magni-tude faster than the equivalent CPU-based implementationsThis enables the real-time edge-preserving manipulationson high-definition images The authors demonstrate the useof the bilateral-grid method on a variety of applicationsincluding image editing high-dynamic-range tone mappingand image enhancement

The computational complexity of the bilateral-grid meth-ods is 119874(1 + |R|120590

119904120590119903) operations per pixel where R is the

dynamic range of the intensity and |R| is the number of gridsoccupied by the range dimension This results in a paradox-ical property that the algorithm proceeds faster when thesize of the spatial kernel is larger due to larger subsamplingrate However the exact output is dependent on the phaseof subsampling Furthermore the operations with small 120590

119904

and 120590119903require fine subsamplingThis requires largermemory

andmore computation time Furthermore the aggregation ofthe final result relies on a trilinear interpolation among theresults on the grids Better accuracy can be obtained usinghigher-order interpolations Consequently there is a tradeoffbetween the quality and the computational cost using thistype of bilateral filters

24 Histogram-Based Approximation Using Box SpatialKernel Weiss developed an iterative method to computelocal histogram with 119874(log120590

119903) complexity in [20] He later

demonstrated that such fast local histogram computation canbe applied for the 119874(log120590

119903) bilateral filter when the spatial

kernel is a uniform box Similar to Weissrsquo work Porikliproposed an 119874(1) bilateral filter [21] based on his earlier

work on119874(1) integral histogram [22]The bilateral filter withsingle-box spatial kernel is formulated as follows

119906bBF

(x) =sumyisin119861(x)119870119903 (V (x) minus V (y)) V (y)sumyisin119861(x)119870119903 (V (x) minus V (y))

(4)

where 119861(x) denotes the box with uniform weight centered atx Then the above formulation can be further expressed interms of local histograms as follows

119906bBF

(x) =sum119875

119901=1119867x (119868119901)119870119903 (V (x) minus 119868119901) 119868119901

sum119875

119901=1119867x (119868119901)119870119903 (V (x) minus 119868119901)

(5)

where 119875 is the number of histogram bin 119868119901denotes the

intensity level of the 119901th histogram bin and119867x(119868119901) indicatesthe number of pixels in the 119901th histogram bin within thespatial neighborhood centered at x Then the computationaltime is constant with 119874(1) integral histogram technique[22] And the calculation can be further accelerated by thequantizing the intensity into a small number of histogrambins

Based on Poriklirsquos single-box bilateral filter Gunturkproposed a method to approximate the bilateral filter witharbitrary spatial and range kernels using a weighted sumof multiple single-box bilateral filters [26] which can beformulated as follows

119906BF(x) asymp

119872

sum

119898=1

119898119906bBF119898

(x) ≐ 119906119898bBF (x) (6)

The coefficients 119898 are then obtained by solving a set of

linear equations which minimize the squared error betweenthe discrete forms of

119870119904(x minus y)119870

119903(V (x) minus V (y))

119872

sum

119898=1

119896119898119861119898(x minus y)119870

119903(V (x) minus V (y))

(7)

This improvement provides better approximation of thebilateral filter with arbitrary spatial and range kernels bycosting a little computation time compared with the single-box bilateral filter However further study shows that theapproximation given by (6) only performs well when the sizeof spatial kernel is relatively small As the radius of the spatialsupport increases more single-box bilateral filters should becombined to guarantee the approximation accuracy accord-ing to Gunturkrsquos schemeThus the computational complexitywill be unbearable for efficient applications if the size of thespatial kernel is too large

25 Accelerations Based on Series Expansion of the RangeKernel In [21] Porikli proposes another 119874(1) bilateral filterwith arbitrary spatial kernel and Gaussian range kernelwhich employs Taylor series expansion of the range kernelThen the bilateral filtering is decomposed into a set ofspatial filtering steps with the image series computed priorto the convolution To guarantee a constant-time processing

4 Mathematical Problems in Engineering

the author proposes to subsample the separable 1D linearspatial filters to a constant number of taps asymmetricallyHowever the accuracy is poor using a low order Taylorexpansion when the variance of Gaussian range kernelis small Moreover the range weight blows up when theintensity difference is too large with respect to the varianceHence the decaying monotonicity for an admissible kernel isbroken

As an extension of Poriklirsquos polynomial bilateral filterin [21] Chaudhury et al propose a constant-time bilateralfilter with trigonometric range kernels in [24] Based on thefact that the raised cosine series converges to a Gaussianthe trigonometric range kernel is applied to approximateGaussian range kernel The authors show that the bilateralfilter using trigonometric series is more accurate than theone using Taylor series with the same number of termsThe computation time of the trigonometric bilateral filter isconstant with respect to the variance of the spatial kernelHowever the complexity is 119874(|R|

21205902

119903) with respect to the

variance of the range kernel where |R| denotes the numberof quantization levels of the intensity and 120590

119903is the variance

of the range kernel Consequently the bilateral filtering withsmall 120590

119903will be time consuming using trigonometric range

kernelMore recently in [25] the trigonometric bilateral filter is

accelerated using truncations when 120590119903is small and further

extended to a larger class of data-dependent filters includingthe well-known nonlocal means filter

3 Fast Implementation of theBilateral Filter Using Sparse Approximationwith Fixed Number of Boxes

In this paper we propose a method to approximate arbitraryspatial kernel with multiple boxes which can then be lever-aged for the constant-time implementation of the bilateralfilter with arbitrary spatial and range kernels Let 119871 be theradius of the spatial support of the given spatial kernel 119870

119904

applied in the bilateral filter Then all the candidate boxestogether form a series 119861

119897 where 119897 is the radius of the box 119861

119897

and 119897 = 0 1 2 119871 For arbitrary119870119904 it can be approximated

using the weighted sum of all the candidate boxes which isformulated as follows

119870119904(x minus y) asymp

119871

sum

119897=0

119896119897119861119897(x minus y) (8)

Because of the symmetry andmonotonicity of any admis-sible spatial kernel it is possible to find a real positive series119896119897 that minimizes the following squared error

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

(9)

where the spatial dependency is omitted for simplicity

31 Approximating Arbitrary Spatial Kernel with Fixed Num-ber of Boxes For that the number of boxes is great when

119871 is large the computational cost will become unbearablefor real-time applications In order to handle this problemwe add a constraint that the number of boxes used in theapproximation should not be larger than a preset number119873such that the constrained minimization of the squared errorcan be further formulated as follows

min119896119897

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

st 119897 | 119896119897= 0 le 119873 (10)

The left part of the above formulation is again the leastsquared error norm And the right part is employed tolimit the number of boxes used in the approximation whichdenotes the number of boxes that have nonzero coefficientsFor any 119897 isin [0 119871] we align the center of the correspondingbox with that of 119870

119904and pad it with zeros up to the same size

as119870119904Then the columns of each padded box are concatenated

to form a column vector b119897We then put these column vectors

together to form a matrix B of size 119878 times (119871 + 1) where 119878 =

(2119871+1)2 is the number of elements in119870

119904 Correspondingly we

concatenate the columns of119870119904to form a column vector q By

definingk as a columnvector containing all the coefficients119896119897

the optimization problem given in (10) can be reformulatedas follows

k = argminkq minus Bk2 st k0 le 119873 (11)

where k0is the 119871

0norm of the vector k which denotes the

number of non-zero elements in kOne should be very familiarwith the formulation given by

(11) since it is a well-known sparse representation problemThis formulation searches the sparse representation of thesignal q using the known dictionary B This sparse approx-imation problem which is known to be NP-hard can beefficiently solved using several available techniques includingOrthogonal Matching Pursuit (OMP) [27 29 30] BasisPursuit (BP) [31 32] and FOCUSS [33]

In this paper we employ the efficient OMP algorithmby Rubinstein et al in [27] namely Batch-OMP to solve(11) After we find out the radiuses and coefficients of theboxes corresponding to the given spatial kernel and the givennumber of boxes the further computation of the bilateralfilter can be given as follows

119906BF(x) asymp 119906119900bBF (x)

=

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y)) V (y)

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y))

(12)

With this respect we can benefit from the integral maptechnique to efficiently calculate the spatial convolution inconstant time It is worth mentioning that119873 in (10) and (11)is an input parameter defined by the users For a given 120590

119904 the

more the number of boxes used is the better the approxima-tion accuracy can be achieved But more computational timeis needed for more boxes Thus there is a tradeoff betweenthe approximation accuracy and the computational efficiency

Mathematical Problems in Engineering 5

with our method Generally we can find a minimum 119873

that guarantees the acceptable quality of the approximationwhich will be discussed in detail in the next section

32 Application to the Histogram-Based Bilateral Filters Nowhaving that an arbitrary spatial kernel is approximated witha preset number of boxes we first exploit its use in thehistogram-based bilateral filters which is originally devel-oped byWeiss in [20] later accelerated by Porikli in [21] andrecently extended by Gunturk in [26]

Firstly let us denote the solution of (11) using the notation119896119899 which contains119873non-zero coefficients for119873 boxeswith

different radiuses selected by the Batch-OMP algorithmThesubscripts 119899rsquos now are not the radiuses but the indices of theselected boxes that is 119899 = 1 2 119873 Then the proposedbilateral filter with multiple-box spatial kernel given in (12)can be reformulated as follows

119906119900bBF

(x)

=

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y)) V (y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y))

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y)) V (y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y))

(13)

Following the single-box histogram-based bilateral filterby Weiss [20] and Porikli [21] (13) can be further formulatedin terms of local histogram as follows

119906119900bBF

(x) =sum119873

119899=1119896119899sum119875

119901=1119868119901119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

sum119873

119899=1119896119899sum119875

119901=1119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

(14)

Prior to the filtering process the intensity is quantizedinto 119875 bins resulting in an intensity series 119868

119901119875

1 Then the

corresponding 119875 frames of range weight 119870119903(V(x) minus 119868

119901) are

calculated Based on the work in [22] an integral histogramis establishedThen119873 local histogrammaps are calculated inconstant time using the same integral histogram Comparedwith the single-box bilateral filter the proposed methodrequires119873minus1 additional local histogram calculations whichcan be efficiently obtained using the integral histogramtechnique The calculations of 119873 times of box filtering forboth the numerator and dominator in (14) can be parallelizedfor more efficient implementation

33 Application to the Interpolation-Based Bilateral FiltersSince Durandrsquos piecewise linear bilateral filter [9] Yangrsquosextension [23] and also Parisrsquo method [19] employ an inter-polation in pooling the filtering results we call them togetherthe interpolation-based bilateral filters for convenience Asthe origin of this type of bilateral filters Durandrsquos method isdiscussed in this paper for demonstrating the application ofthe proposed approximation to this type of bilateral filtersSimilar adaptation can be easily made for the application toYangrsquos method

Let us replace the spatial kernel 119870119904in (2) by Durand and

Dorsey using the weighted sum of multiple boxes and thecalculation of 119906

119896is formulated as follows

119906119896(x) asymp

sumy (sum119873

119899=1119896119899119861119899(x minus y)) 119869

119896(y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119882

119896(y)

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y) 119869

119896(y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119882

119896(y)

(15)

Given an image it is first divided into a preset number ofintensity segments forming an image series 119894

119896 Correspond-

ingly a range-weighted image series 119869119896(y) and a weight

series 119882119896(y) are computed Afterwards the corresponding

integral maps of these two image series are established Thefiltered result 119906

119896for each image segment 119894

119896is computed

according to (15) with 119874(1) complexity The final resultis obtained using an interpolation as given in (3) for anexample The running time of this bilateral filter is constantwith respect to the size of the spatial kernel

34 Applications to the Series-Based Bilateral Filters Since aconvolution with spatial kernels is also involved in the series-based bilateral filters the proposed sparse approximationis also possible to be applied in this type of accelerationsThe detailed adaptation for the series-based bilateral filtersis omitted in this paper which can be easily derived by thereaders

4 Experiments and Comparisons

The proposed algorithm is implemented in MATLAB 2010bunder Windows XP SP3 (32 bits) in a PC computer withPentium Dual-Core T4200 200GHz each and 3GB RAMThe proposed histogram-based bilateral filter with multiple-box spatial kernel is tested and discussed in this sectionThe experiments on approximating the bilateral filter withGaussian spatial and range kernels provide the readers witha glance at the validity and the effectiveness of the proposedmethod The application to other types of the acceleration ofthe bilateral filter can be easily implemented and evaluatedunder the guidance provided in the previous section But itis not given here for saving the length of this paper In thefollowing text of this section we evaluate the performanceof the proposed histogram-based bilateral filter in bothqualitative and quantitative aspects

Before the evaluation we briefly introduce the basicsettings of the experiments discussed in the following textFour standard test images are employed which are 8 bitgrayscale images of size 512 times 512 as shown in Figure 1 Thenumerical results given in the following texts are all producedusing the standard test images unless otherwise noticed

41 Qualitative Demonstration For the qualitative demon-stration the proposed histogram-based method togetherwith Poriklirsquos single-box bilateral filter andGunturkrsquos bilateralfilter is employed to approximate the standard bilateral filter

6 Mathematical Problems in Engineering

(a) Barbara (b) Boat (c) Lena (d) Pirate

Figure 1 Four standard test images used in the experiments in this paper They are 8-bit grayscale images of size 512 times 512

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

Figure 2 Barbara a demonstration of the visual quality of the approximation results First column results obtained using the proposedmethod where119873 = 5 Second column the color-coded absolute error maps corresponding to the images in the first column Third columnresults obtained using Poriklirsquos single-box bilateral filter with optimal spatial parameter Fourth column the color-coded absolute error mapscorresponding to the images in the third column Fifth column results obtained using Gunturkrsquos bilateral filter where119872 = 5 Last columnthe color-coded absolute error maps corresponding to the images in the fifth column First row images are obtained with 120590

119904= 12 Second

row images are obtained with 120590119904= 18 Third row images are obtained with 120590

119904= 30 Fourth row images are obtained with 120590

119904= 60 For all

these results 120590119903= 50 and 119875 = 16 The ranges of the color-coded maps are uniformly limited to [0 50] to facilitate visual comparison

with Gaussian spatial and range kernels The results areillustrated in Figure 2 As shown in Figure 2 the images inthe first third and fifth columns are respectively the resultsof the proposed histogram-based bilateral filter the resultsof Poriklirsquos single-box bilateral filter [21] and the results ofGunturkrsquos bilateral filter [26] The color-coded maps in thesecond fourth and sixth columns are the correspondingabsolute error between the images respectively in the firstthird and fifth columns and the results of the standard

Gaussian bilateral filter respectively with the same inputparameters The variances of the spatial kernels are 120590

119904=

12 18 30 and 60 respectively for the four rows Thevariances of the range kernels are the same that is 120590

119903= 50

The number of boxes for the proposed method is 119873 = 5 inproducing the images in the first column Correspondinglythe number of box bilateral filters used in Gunturkrsquos methodis 119872 = 5 in producing the results in the fifth column ForPoriklirsquos method the results are obtained with optimal spatial

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

2 Mathematical Problems in Engineering

space the complexity of this method is 119874(1 + |R|120590119904120590119903)

where |R| denotes the number of grids of the intensity and120590119903is the bandwidth of the range kernel Thus the bilateral

grid method runs faster with larger spatial kernel Weiss[20] develops an 119874(log120590

119904) algorithm for local histogram

calculation which is later used to derive an119874(log120590119904) bilateral

filter with box spatial kernel Porikli [21] proposes an 119874(1)

box bilateral filter by virtue of the 119874(1) integral histogram[22] Porikli [21] and Yang et al [23] and later Chaudhuryet al [24 25] suggest the use of some series of the intensityto approximate arbitrary range kernel and employ 119874(1)

algorithms to efficiently compute the spatial filtering for eachterm of the series

Based onPoriklirsquos119874(1) single-box bilateral filter proposedin [21] Gunturk proposes an 119874(1) bilateral filter with arbi-trary spatial and range kernels by linearly combiningmultiplesingle-box bilateral filters [26]The accuracy can be improvedcomparedwith the single-box bilateral filter in approximatingthe bilateral filter with arbitrary spatial kernel Howeverwhen the radius of the effective spatial support is largea large number of single-box bilateral filters are requiredto guarantee the accuracy Furthermore no instruction forthe selection over all the possible box spatial kernels ispresented when the number of single-box bilateral filter islimited Consequently Gunturkrsquos method does not producesufficiently good approximation with only a few additionalsingle-box bilateral filters when the spatial kernel is largeMore details about the limitations of Gunturkrsquos method areshown in the following text

In this paper we focus our attention on approximatingarbitrary spatial kernel with a fixed number of boxes Withthis constraint the MSE-based optimization becomes a well-known sparse representation problem We then employ theBatch-OMP method published recently in [27] to solve theproblem for the radiuses and the coefficients of the boxes Inaddition to the application to the histogram-based bilateralfilter the proposedmethod can be employed in other acceler-ation schemes by substituting the spatial filtering with a fixedtimes of box filtering Hence a number of119874(1) bilateral filtersare produced Afterwards the application to the histogram-based bilateral filter is discussed with some representativeexperiments Results show that the proposed histogram-based bilateral filter is robust and sufficiently accurate overa large range of the size of the spatial kernel and outperformsthe other congeneric methods in both the accuracy and therobustness

The rest of this paper is arranged as follows Briefdescriptions of the original bilateral filter and its accelerationschemes are provided in Section 2 where the previousaccelerations are categorized into several types and analyzedrespectively Then in Section 3 the proposed method forapproximating arbitrary spatial kernel with a fixed numberof boxes is deduced in detail The application to somepopular acceleration schemes is also provided in this sectionAfterwards the application to the histogram-based bilateralfilter is tested in Section 4 together with some comparisonswith the previous histogram-based methods Finally theconclusions are drawn in Section 5 followed by some furtherdiscussions

2 Related Works

Thebilateral filter is proposed byTomasi andManduchi in [1]It is a normalized convolution in which the contribution ofa neighboring pixel depends on both the geometric distanceand the intensity difference with regard to the center pixelGenerally arbitrary kernels can be applied to both the spatialand range filtering to measure the affinity between one pixeland its neighbors The discrete form of the bilateral filterwith arbitrary spatial and range kernels can be formulated asfollows

119906BF(x) =

sumyisin119873(x)119870119904 (x minus y)119870119903(V (x) minus V (y)) V (y)

sumyisin119873(x)119870119904 (x minus y)119870119903(V (x) minus V (y))

(1)

where V and 119906 are respectively the original image and thefiltered image and119873(x) denotes the effective spatial supportof the filtering kernel which is centered at x 119870

119904and 119870

119903

are respectively the spatial and range kernels The originalbilateral filter employs Gaussian kernels for both the spatialand range filtering which provides intuitive control overthe similarity measure with the variances respectively forthese two kernels However the brute-force implementationof the Gaussian bilateral filter is rather time consuming andis thus too slow for real-time applications Consequentlymany research papers have been devoted to accelerating thecomputation of the bilateral filter and many publications canbe found during the past decade

21 Kernel Separation Pham and Vliet proposed a methodto approximate the 2-D data-adaptive convolution usingtwo 1-D data-adaptive convolutions [18] The computationalcomplexity is reduced from 119874(120590

2

119903) operations per pixel to

119874(120590119903) operations per pixel where 120590

119903denotes the radius of

the effective spatial support This method performs well inregions with simple structure However it does not producesatisfactory results in textured regions

22 Piecewise Linear Approximation Durand and Dorseyproposed a piecewise linear approximation of the bilateralfilter in [9] The authors first quantize the original intensityinto several segments Then for each segment 119894

119896 a range-

weighted image pair (119869119896119882119896) is calculated Afterwards a

linearly filtered result 119906119896for each 119894

119896is generated by linear

filtering with the corresponding range-weighted image pairwhich can be formulated as follows

119906119896(x) =

sumyisin119873(x)119870119904 (x minus y) 119869119896(y)

sumyisin119873(x)119870119904 (x minus y)119882119896(y)

(2)

where119882119896(y) = 119870

119903(119894119896minusV(y)) and 119869

119896(y) = 119882119896(y)V(y)Then the

final result is obtained by linearly interpolating between twoclosest filtered images that is for V(x) isin [119894

119896 119894119896+1

] the filteredoutput at x is given as follows

119906BF(x) =

(119894119896+1

minus V (x)) 119906119896(x) + (V (x) minus 119894

119896) 119906119896+1

(x)119894119896+1

minus 119894119896

(3)

The computational complexity is dramatically reducedsince the implementation requires only 119874(log120590

119903) operations

Mathematical Problems in Engineering 3

per pixel using fast Fourier transform (FFT) to compute each119906119896 It is further accelerated by performing a subsampling in

the spatial domainRecently based on Durandrsquos formulation Yang et al

[23] employedDerichersquos recursive approximation of Gaussiankernel [28] to calculate the spatial filtering which can beimplemented in constant time and can be realized in real timein some graphic processing units (GPU)

23 3-D Bilateral Grid Manipulations The piecewise linearbilateral filter is later generalized and further accelerated byParis et al in [19]The authors express the filtering in a higher-dimensional space where another dimension for the intensityis added to the original spatial dimensionsThen the bilateralfiltering can be expressed as simple linear convolutions witha vector-valued image in this augmented space followed by apoint-by-point division With the new representation of thedata simple criteria are derived for subsampling the data toachieve significant acceleration of the bilateral filter With thesame computational time this method is more accurate thanthe piecewise linear bilateral filter by Durand and Dorsey in[9]

Built upon the technique by Paris et al in [19] Chen et al[11] extend the higher-dimensional approach and introduce anew compact data structuremdashthe bilateral gridThis enables avariety of fast edge-preserving image processing applicationsThe authors parallelize the bilateral-grid algorithm in mod-ern graphics hardware with graphic processing units (GPU)The GPU-based implementation is two orders of magni-tude faster than the equivalent CPU-based implementationsThis enables the real-time edge-preserving manipulationson high-definition images The authors demonstrate the useof the bilateral-grid method on a variety of applicationsincluding image editing high-dynamic-range tone mappingand image enhancement

The computational complexity of the bilateral-grid meth-ods is 119874(1 + |R|120590

119904120590119903) operations per pixel where R is the

dynamic range of the intensity and |R| is the number of gridsoccupied by the range dimension This results in a paradox-ical property that the algorithm proceeds faster when thesize of the spatial kernel is larger due to larger subsamplingrate However the exact output is dependent on the phaseof subsampling Furthermore the operations with small 120590

119904

and 120590119903require fine subsamplingThis requires largermemory

andmore computation time Furthermore the aggregation ofthe final result relies on a trilinear interpolation among theresults on the grids Better accuracy can be obtained usinghigher-order interpolations Consequently there is a tradeoffbetween the quality and the computational cost using thistype of bilateral filters

24 Histogram-Based Approximation Using Box SpatialKernel Weiss developed an iterative method to computelocal histogram with 119874(log120590

119903) complexity in [20] He later

demonstrated that such fast local histogram computation canbe applied for the 119874(log120590

119903) bilateral filter when the spatial

kernel is a uniform box Similar to Weissrsquo work Porikliproposed an 119874(1) bilateral filter [21] based on his earlier

work on119874(1) integral histogram [22]The bilateral filter withsingle-box spatial kernel is formulated as follows

119906bBF

(x) =sumyisin119861(x)119870119903 (V (x) minus V (y)) V (y)sumyisin119861(x)119870119903 (V (x) minus V (y))

(4)

where 119861(x) denotes the box with uniform weight centered atx Then the above formulation can be further expressed interms of local histograms as follows

119906bBF

(x) =sum119875

119901=1119867x (119868119901)119870119903 (V (x) minus 119868119901) 119868119901

sum119875

119901=1119867x (119868119901)119870119903 (V (x) minus 119868119901)

(5)

where 119875 is the number of histogram bin 119868119901denotes the

intensity level of the 119901th histogram bin and119867x(119868119901) indicatesthe number of pixels in the 119901th histogram bin within thespatial neighborhood centered at x Then the computationaltime is constant with 119874(1) integral histogram technique[22] And the calculation can be further accelerated by thequantizing the intensity into a small number of histogrambins

Based on Poriklirsquos single-box bilateral filter Gunturkproposed a method to approximate the bilateral filter witharbitrary spatial and range kernels using a weighted sumof multiple single-box bilateral filters [26] which can beformulated as follows

119906BF(x) asymp

119872

sum

119898=1

119898119906bBF119898

(x) ≐ 119906119898bBF (x) (6)

The coefficients 119898 are then obtained by solving a set of

linear equations which minimize the squared error betweenthe discrete forms of

119870119904(x minus y)119870

119903(V (x) minus V (y))

119872

sum

119898=1

119896119898119861119898(x minus y)119870

119903(V (x) minus V (y))

(7)

This improvement provides better approximation of thebilateral filter with arbitrary spatial and range kernels bycosting a little computation time compared with the single-box bilateral filter However further study shows that theapproximation given by (6) only performs well when the sizeof spatial kernel is relatively small As the radius of the spatialsupport increases more single-box bilateral filters should becombined to guarantee the approximation accuracy accord-ing to Gunturkrsquos schemeThus the computational complexitywill be unbearable for efficient applications if the size of thespatial kernel is too large

25 Accelerations Based on Series Expansion of the RangeKernel In [21] Porikli proposes another 119874(1) bilateral filterwith arbitrary spatial kernel and Gaussian range kernelwhich employs Taylor series expansion of the range kernelThen the bilateral filtering is decomposed into a set ofspatial filtering steps with the image series computed priorto the convolution To guarantee a constant-time processing

4 Mathematical Problems in Engineering

the author proposes to subsample the separable 1D linearspatial filters to a constant number of taps asymmetricallyHowever the accuracy is poor using a low order Taylorexpansion when the variance of Gaussian range kernelis small Moreover the range weight blows up when theintensity difference is too large with respect to the varianceHence the decaying monotonicity for an admissible kernel isbroken

As an extension of Poriklirsquos polynomial bilateral filterin [21] Chaudhury et al propose a constant-time bilateralfilter with trigonometric range kernels in [24] Based on thefact that the raised cosine series converges to a Gaussianthe trigonometric range kernel is applied to approximateGaussian range kernel The authors show that the bilateralfilter using trigonometric series is more accurate than theone using Taylor series with the same number of termsThe computation time of the trigonometric bilateral filter isconstant with respect to the variance of the spatial kernelHowever the complexity is 119874(|R|

21205902

119903) with respect to the

variance of the range kernel where |R| denotes the numberof quantization levels of the intensity and 120590

119903is the variance

of the range kernel Consequently the bilateral filtering withsmall 120590

119903will be time consuming using trigonometric range

kernelMore recently in [25] the trigonometric bilateral filter is

accelerated using truncations when 120590119903is small and further

extended to a larger class of data-dependent filters includingthe well-known nonlocal means filter

3 Fast Implementation of theBilateral Filter Using Sparse Approximationwith Fixed Number of Boxes

In this paper we propose a method to approximate arbitraryspatial kernel with multiple boxes which can then be lever-aged for the constant-time implementation of the bilateralfilter with arbitrary spatial and range kernels Let 119871 be theradius of the spatial support of the given spatial kernel 119870

119904

applied in the bilateral filter Then all the candidate boxestogether form a series 119861

119897 where 119897 is the radius of the box 119861

119897

and 119897 = 0 1 2 119871 For arbitrary119870119904 it can be approximated

using the weighted sum of all the candidate boxes which isformulated as follows

119870119904(x minus y) asymp

119871

sum

119897=0

119896119897119861119897(x minus y) (8)

Because of the symmetry andmonotonicity of any admis-sible spatial kernel it is possible to find a real positive series119896119897 that minimizes the following squared error

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

(9)

where the spatial dependency is omitted for simplicity

31 Approximating Arbitrary Spatial Kernel with Fixed Num-ber of Boxes For that the number of boxes is great when

119871 is large the computational cost will become unbearablefor real-time applications In order to handle this problemwe add a constraint that the number of boxes used in theapproximation should not be larger than a preset number119873such that the constrained minimization of the squared errorcan be further formulated as follows

min119896119897

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

st 119897 | 119896119897= 0 le 119873 (10)

The left part of the above formulation is again the leastsquared error norm And the right part is employed tolimit the number of boxes used in the approximation whichdenotes the number of boxes that have nonzero coefficientsFor any 119897 isin [0 119871] we align the center of the correspondingbox with that of 119870

119904and pad it with zeros up to the same size

as119870119904Then the columns of each padded box are concatenated

to form a column vector b119897We then put these column vectors

together to form a matrix B of size 119878 times (119871 + 1) where 119878 =

(2119871+1)2 is the number of elements in119870

119904 Correspondingly we

concatenate the columns of119870119904to form a column vector q By

definingk as a columnvector containing all the coefficients119896119897

the optimization problem given in (10) can be reformulatedas follows

k = argminkq minus Bk2 st k0 le 119873 (11)

where k0is the 119871

0norm of the vector k which denotes the

number of non-zero elements in kOne should be very familiarwith the formulation given by

(11) since it is a well-known sparse representation problemThis formulation searches the sparse representation of thesignal q using the known dictionary B This sparse approx-imation problem which is known to be NP-hard can beefficiently solved using several available techniques includingOrthogonal Matching Pursuit (OMP) [27 29 30] BasisPursuit (BP) [31 32] and FOCUSS [33]

In this paper we employ the efficient OMP algorithmby Rubinstein et al in [27] namely Batch-OMP to solve(11) After we find out the radiuses and coefficients of theboxes corresponding to the given spatial kernel and the givennumber of boxes the further computation of the bilateralfilter can be given as follows

119906BF(x) asymp 119906119900bBF (x)

=

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y)) V (y)

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y))

(12)

With this respect we can benefit from the integral maptechnique to efficiently calculate the spatial convolution inconstant time It is worth mentioning that119873 in (10) and (11)is an input parameter defined by the users For a given 120590

119904 the

more the number of boxes used is the better the approxima-tion accuracy can be achieved But more computational timeis needed for more boxes Thus there is a tradeoff betweenthe approximation accuracy and the computational efficiency

Mathematical Problems in Engineering 5

with our method Generally we can find a minimum 119873

that guarantees the acceptable quality of the approximationwhich will be discussed in detail in the next section

32 Application to the Histogram-Based Bilateral Filters Nowhaving that an arbitrary spatial kernel is approximated witha preset number of boxes we first exploit its use in thehistogram-based bilateral filters which is originally devel-oped byWeiss in [20] later accelerated by Porikli in [21] andrecently extended by Gunturk in [26]

Firstly let us denote the solution of (11) using the notation119896119899 which contains119873non-zero coefficients for119873 boxeswith

different radiuses selected by the Batch-OMP algorithmThesubscripts 119899rsquos now are not the radiuses but the indices of theselected boxes that is 119899 = 1 2 119873 Then the proposedbilateral filter with multiple-box spatial kernel given in (12)can be reformulated as follows

119906119900bBF

(x)

=

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y)) V (y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y))

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y)) V (y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y))

(13)

Following the single-box histogram-based bilateral filterby Weiss [20] and Porikli [21] (13) can be further formulatedin terms of local histogram as follows

119906119900bBF

(x) =sum119873

119899=1119896119899sum119875

119901=1119868119901119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

sum119873

119899=1119896119899sum119875

119901=1119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

(14)

Prior to the filtering process the intensity is quantizedinto 119875 bins resulting in an intensity series 119868

119901119875

1 Then the

corresponding 119875 frames of range weight 119870119903(V(x) minus 119868

119901) are

calculated Based on the work in [22] an integral histogramis establishedThen119873 local histogrammaps are calculated inconstant time using the same integral histogram Comparedwith the single-box bilateral filter the proposed methodrequires119873minus1 additional local histogram calculations whichcan be efficiently obtained using the integral histogramtechnique The calculations of 119873 times of box filtering forboth the numerator and dominator in (14) can be parallelizedfor more efficient implementation

33 Application to the Interpolation-Based Bilateral FiltersSince Durandrsquos piecewise linear bilateral filter [9] Yangrsquosextension [23] and also Parisrsquo method [19] employ an inter-polation in pooling the filtering results we call them togetherthe interpolation-based bilateral filters for convenience Asthe origin of this type of bilateral filters Durandrsquos method isdiscussed in this paper for demonstrating the application ofthe proposed approximation to this type of bilateral filtersSimilar adaptation can be easily made for the application toYangrsquos method

Let us replace the spatial kernel 119870119904in (2) by Durand and

Dorsey using the weighted sum of multiple boxes and thecalculation of 119906

119896is formulated as follows

119906119896(x) asymp

sumy (sum119873

119899=1119896119899119861119899(x minus y)) 119869

119896(y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119882

119896(y)

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y) 119869

119896(y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119882

119896(y)

(15)

Given an image it is first divided into a preset number ofintensity segments forming an image series 119894

119896 Correspond-

ingly a range-weighted image series 119869119896(y) and a weight

series 119882119896(y) are computed Afterwards the corresponding

integral maps of these two image series are established Thefiltered result 119906

119896for each image segment 119894

119896is computed

according to (15) with 119874(1) complexity The final resultis obtained using an interpolation as given in (3) for anexample The running time of this bilateral filter is constantwith respect to the size of the spatial kernel

34 Applications to the Series-Based Bilateral Filters Since aconvolution with spatial kernels is also involved in the series-based bilateral filters the proposed sparse approximationis also possible to be applied in this type of accelerationsThe detailed adaptation for the series-based bilateral filtersis omitted in this paper which can be easily derived by thereaders

4 Experiments and Comparisons

The proposed algorithm is implemented in MATLAB 2010bunder Windows XP SP3 (32 bits) in a PC computer withPentium Dual-Core T4200 200GHz each and 3GB RAMThe proposed histogram-based bilateral filter with multiple-box spatial kernel is tested and discussed in this sectionThe experiments on approximating the bilateral filter withGaussian spatial and range kernels provide the readers witha glance at the validity and the effectiveness of the proposedmethod The application to other types of the acceleration ofthe bilateral filter can be easily implemented and evaluatedunder the guidance provided in the previous section But itis not given here for saving the length of this paper In thefollowing text of this section we evaluate the performanceof the proposed histogram-based bilateral filter in bothqualitative and quantitative aspects

Before the evaluation we briefly introduce the basicsettings of the experiments discussed in the following textFour standard test images are employed which are 8 bitgrayscale images of size 512 times 512 as shown in Figure 1 Thenumerical results given in the following texts are all producedusing the standard test images unless otherwise noticed

41 Qualitative Demonstration For the qualitative demon-stration the proposed histogram-based method togetherwith Poriklirsquos single-box bilateral filter andGunturkrsquos bilateralfilter is employed to approximate the standard bilateral filter

6 Mathematical Problems in Engineering

(a) Barbara (b) Boat (c) Lena (d) Pirate

Figure 1 Four standard test images used in the experiments in this paper They are 8-bit grayscale images of size 512 times 512

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

Figure 2 Barbara a demonstration of the visual quality of the approximation results First column results obtained using the proposedmethod where119873 = 5 Second column the color-coded absolute error maps corresponding to the images in the first column Third columnresults obtained using Poriklirsquos single-box bilateral filter with optimal spatial parameter Fourth column the color-coded absolute error mapscorresponding to the images in the third column Fifth column results obtained using Gunturkrsquos bilateral filter where119872 = 5 Last columnthe color-coded absolute error maps corresponding to the images in the fifth column First row images are obtained with 120590

119904= 12 Second

row images are obtained with 120590119904= 18 Third row images are obtained with 120590

119904= 30 Fourth row images are obtained with 120590

119904= 60 For all

these results 120590119903= 50 and 119875 = 16 The ranges of the color-coded maps are uniformly limited to [0 50] to facilitate visual comparison

with Gaussian spatial and range kernels The results areillustrated in Figure 2 As shown in Figure 2 the images inthe first third and fifth columns are respectively the resultsof the proposed histogram-based bilateral filter the resultsof Poriklirsquos single-box bilateral filter [21] and the results ofGunturkrsquos bilateral filter [26] The color-coded maps in thesecond fourth and sixth columns are the correspondingabsolute error between the images respectively in the firstthird and fifth columns and the results of the standard

Gaussian bilateral filter respectively with the same inputparameters The variances of the spatial kernels are 120590

119904=

12 18 30 and 60 respectively for the four rows Thevariances of the range kernels are the same that is 120590

119903= 50

The number of boxes for the proposed method is 119873 = 5 inproducing the images in the first column Correspondinglythe number of box bilateral filters used in Gunturkrsquos methodis 119872 = 5 in producing the results in the fifth column ForPoriklirsquos method the results are obtained with optimal spatial

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Mathematical Problems in Engineering 3

per pixel using fast Fourier transform (FFT) to compute each119906119896 It is further accelerated by performing a subsampling in

the spatial domainRecently based on Durandrsquos formulation Yang et al

[23] employedDerichersquos recursive approximation of Gaussiankernel [28] to calculate the spatial filtering which can beimplemented in constant time and can be realized in real timein some graphic processing units (GPU)

23 3-D Bilateral Grid Manipulations The piecewise linearbilateral filter is later generalized and further accelerated byParis et al in [19]The authors express the filtering in a higher-dimensional space where another dimension for the intensityis added to the original spatial dimensionsThen the bilateralfiltering can be expressed as simple linear convolutions witha vector-valued image in this augmented space followed by apoint-by-point division With the new representation of thedata simple criteria are derived for subsampling the data toachieve significant acceleration of the bilateral filter With thesame computational time this method is more accurate thanthe piecewise linear bilateral filter by Durand and Dorsey in[9]

Built upon the technique by Paris et al in [19] Chen et al[11] extend the higher-dimensional approach and introduce anew compact data structuremdashthe bilateral gridThis enables avariety of fast edge-preserving image processing applicationsThe authors parallelize the bilateral-grid algorithm in mod-ern graphics hardware with graphic processing units (GPU)The GPU-based implementation is two orders of magni-tude faster than the equivalent CPU-based implementationsThis enables the real-time edge-preserving manipulationson high-definition images The authors demonstrate the useof the bilateral-grid method on a variety of applicationsincluding image editing high-dynamic-range tone mappingand image enhancement

The computational complexity of the bilateral-grid meth-ods is 119874(1 + |R|120590

119904120590119903) operations per pixel where R is the

dynamic range of the intensity and |R| is the number of gridsoccupied by the range dimension This results in a paradox-ical property that the algorithm proceeds faster when thesize of the spatial kernel is larger due to larger subsamplingrate However the exact output is dependent on the phaseof subsampling Furthermore the operations with small 120590

119904

and 120590119903require fine subsamplingThis requires largermemory

andmore computation time Furthermore the aggregation ofthe final result relies on a trilinear interpolation among theresults on the grids Better accuracy can be obtained usinghigher-order interpolations Consequently there is a tradeoffbetween the quality and the computational cost using thistype of bilateral filters

24 Histogram-Based Approximation Using Box SpatialKernel Weiss developed an iterative method to computelocal histogram with 119874(log120590

119903) complexity in [20] He later

demonstrated that such fast local histogram computation canbe applied for the 119874(log120590

119903) bilateral filter when the spatial

kernel is a uniform box Similar to Weissrsquo work Porikliproposed an 119874(1) bilateral filter [21] based on his earlier

work on119874(1) integral histogram [22]The bilateral filter withsingle-box spatial kernel is formulated as follows

119906bBF

(x) =sumyisin119861(x)119870119903 (V (x) minus V (y)) V (y)sumyisin119861(x)119870119903 (V (x) minus V (y))

(4)

where 119861(x) denotes the box with uniform weight centered atx Then the above formulation can be further expressed interms of local histograms as follows

119906bBF

(x) =sum119875

119901=1119867x (119868119901)119870119903 (V (x) minus 119868119901) 119868119901

sum119875

119901=1119867x (119868119901)119870119903 (V (x) minus 119868119901)

(5)

where 119875 is the number of histogram bin 119868119901denotes the

intensity level of the 119901th histogram bin and119867x(119868119901) indicatesthe number of pixels in the 119901th histogram bin within thespatial neighborhood centered at x Then the computationaltime is constant with 119874(1) integral histogram technique[22] And the calculation can be further accelerated by thequantizing the intensity into a small number of histogrambins

Based on Poriklirsquos single-box bilateral filter Gunturkproposed a method to approximate the bilateral filter witharbitrary spatial and range kernels using a weighted sumof multiple single-box bilateral filters [26] which can beformulated as follows

119906BF(x) asymp

119872

sum

119898=1

119898119906bBF119898

(x) ≐ 119906119898bBF (x) (6)

The coefficients 119898 are then obtained by solving a set of

linear equations which minimize the squared error betweenthe discrete forms of

119870119904(x minus y)119870

119903(V (x) minus V (y))

119872

sum

119898=1

119896119898119861119898(x minus y)119870

119903(V (x) minus V (y))

(7)

This improvement provides better approximation of thebilateral filter with arbitrary spatial and range kernels bycosting a little computation time compared with the single-box bilateral filter However further study shows that theapproximation given by (6) only performs well when the sizeof spatial kernel is relatively small As the radius of the spatialsupport increases more single-box bilateral filters should becombined to guarantee the approximation accuracy accord-ing to Gunturkrsquos schemeThus the computational complexitywill be unbearable for efficient applications if the size of thespatial kernel is too large

25 Accelerations Based on Series Expansion of the RangeKernel In [21] Porikli proposes another 119874(1) bilateral filterwith arbitrary spatial kernel and Gaussian range kernelwhich employs Taylor series expansion of the range kernelThen the bilateral filtering is decomposed into a set ofspatial filtering steps with the image series computed priorto the convolution To guarantee a constant-time processing

4 Mathematical Problems in Engineering

the author proposes to subsample the separable 1D linearspatial filters to a constant number of taps asymmetricallyHowever the accuracy is poor using a low order Taylorexpansion when the variance of Gaussian range kernelis small Moreover the range weight blows up when theintensity difference is too large with respect to the varianceHence the decaying monotonicity for an admissible kernel isbroken

As an extension of Poriklirsquos polynomial bilateral filterin [21] Chaudhury et al propose a constant-time bilateralfilter with trigonometric range kernels in [24] Based on thefact that the raised cosine series converges to a Gaussianthe trigonometric range kernel is applied to approximateGaussian range kernel The authors show that the bilateralfilter using trigonometric series is more accurate than theone using Taylor series with the same number of termsThe computation time of the trigonometric bilateral filter isconstant with respect to the variance of the spatial kernelHowever the complexity is 119874(|R|

21205902

119903) with respect to the

variance of the range kernel where |R| denotes the numberof quantization levels of the intensity and 120590

119903is the variance

of the range kernel Consequently the bilateral filtering withsmall 120590

119903will be time consuming using trigonometric range

kernelMore recently in [25] the trigonometric bilateral filter is

accelerated using truncations when 120590119903is small and further

extended to a larger class of data-dependent filters includingthe well-known nonlocal means filter

3 Fast Implementation of theBilateral Filter Using Sparse Approximationwith Fixed Number of Boxes

In this paper we propose a method to approximate arbitraryspatial kernel with multiple boxes which can then be lever-aged for the constant-time implementation of the bilateralfilter with arbitrary spatial and range kernels Let 119871 be theradius of the spatial support of the given spatial kernel 119870

119904

applied in the bilateral filter Then all the candidate boxestogether form a series 119861

119897 where 119897 is the radius of the box 119861

119897

and 119897 = 0 1 2 119871 For arbitrary119870119904 it can be approximated

using the weighted sum of all the candidate boxes which isformulated as follows

119870119904(x minus y) asymp

119871

sum

119897=0

119896119897119861119897(x minus y) (8)

Because of the symmetry andmonotonicity of any admis-sible spatial kernel it is possible to find a real positive series119896119897 that minimizes the following squared error

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

(9)

where the spatial dependency is omitted for simplicity

31 Approximating Arbitrary Spatial Kernel with Fixed Num-ber of Boxes For that the number of boxes is great when

119871 is large the computational cost will become unbearablefor real-time applications In order to handle this problemwe add a constraint that the number of boxes used in theapproximation should not be larger than a preset number119873such that the constrained minimization of the squared errorcan be further formulated as follows

min119896119897

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

st 119897 | 119896119897= 0 le 119873 (10)

The left part of the above formulation is again the leastsquared error norm And the right part is employed tolimit the number of boxes used in the approximation whichdenotes the number of boxes that have nonzero coefficientsFor any 119897 isin [0 119871] we align the center of the correspondingbox with that of 119870

119904and pad it with zeros up to the same size

as119870119904Then the columns of each padded box are concatenated

to form a column vector b119897We then put these column vectors

together to form a matrix B of size 119878 times (119871 + 1) where 119878 =

(2119871+1)2 is the number of elements in119870

119904 Correspondingly we

concatenate the columns of119870119904to form a column vector q By

definingk as a columnvector containing all the coefficients119896119897

the optimization problem given in (10) can be reformulatedas follows

k = argminkq minus Bk2 st k0 le 119873 (11)

where k0is the 119871

0norm of the vector k which denotes the

number of non-zero elements in kOne should be very familiarwith the formulation given by

(11) since it is a well-known sparse representation problemThis formulation searches the sparse representation of thesignal q using the known dictionary B This sparse approx-imation problem which is known to be NP-hard can beefficiently solved using several available techniques includingOrthogonal Matching Pursuit (OMP) [27 29 30] BasisPursuit (BP) [31 32] and FOCUSS [33]

In this paper we employ the efficient OMP algorithmby Rubinstein et al in [27] namely Batch-OMP to solve(11) After we find out the radiuses and coefficients of theboxes corresponding to the given spatial kernel and the givennumber of boxes the further computation of the bilateralfilter can be given as follows

119906BF(x) asymp 119906119900bBF (x)

=

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y)) V (y)

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y))

(12)

With this respect we can benefit from the integral maptechnique to efficiently calculate the spatial convolution inconstant time It is worth mentioning that119873 in (10) and (11)is an input parameter defined by the users For a given 120590

119904 the

more the number of boxes used is the better the approxima-tion accuracy can be achieved But more computational timeis needed for more boxes Thus there is a tradeoff betweenthe approximation accuracy and the computational efficiency

Mathematical Problems in Engineering 5

with our method Generally we can find a minimum 119873

that guarantees the acceptable quality of the approximationwhich will be discussed in detail in the next section

32 Application to the Histogram-Based Bilateral Filters Nowhaving that an arbitrary spatial kernel is approximated witha preset number of boxes we first exploit its use in thehistogram-based bilateral filters which is originally devel-oped byWeiss in [20] later accelerated by Porikli in [21] andrecently extended by Gunturk in [26]

Firstly let us denote the solution of (11) using the notation119896119899 which contains119873non-zero coefficients for119873 boxeswith

different radiuses selected by the Batch-OMP algorithmThesubscripts 119899rsquos now are not the radiuses but the indices of theselected boxes that is 119899 = 1 2 119873 Then the proposedbilateral filter with multiple-box spatial kernel given in (12)can be reformulated as follows

119906119900bBF

(x)

=

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y)) V (y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y))

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y)) V (y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y))

(13)

Following the single-box histogram-based bilateral filterby Weiss [20] and Porikli [21] (13) can be further formulatedin terms of local histogram as follows

119906119900bBF

(x) =sum119873

119899=1119896119899sum119875

119901=1119868119901119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

sum119873

119899=1119896119899sum119875

119901=1119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

(14)

Prior to the filtering process the intensity is quantizedinto 119875 bins resulting in an intensity series 119868

119901119875

1 Then the

corresponding 119875 frames of range weight 119870119903(V(x) minus 119868

119901) are

calculated Based on the work in [22] an integral histogramis establishedThen119873 local histogrammaps are calculated inconstant time using the same integral histogram Comparedwith the single-box bilateral filter the proposed methodrequires119873minus1 additional local histogram calculations whichcan be efficiently obtained using the integral histogramtechnique The calculations of 119873 times of box filtering forboth the numerator and dominator in (14) can be parallelizedfor more efficient implementation

33 Application to the Interpolation-Based Bilateral FiltersSince Durandrsquos piecewise linear bilateral filter [9] Yangrsquosextension [23] and also Parisrsquo method [19] employ an inter-polation in pooling the filtering results we call them togetherthe interpolation-based bilateral filters for convenience Asthe origin of this type of bilateral filters Durandrsquos method isdiscussed in this paper for demonstrating the application ofthe proposed approximation to this type of bilateral filtersSimilar adaptation can be easily made for the application toYangrsquos method

Let us replace the spatial kernel 119870119904in (2) by Durand and

Dorsey using the weighted sum of multiple boxes and thecalculation of 119906

119896is formulated as follows

119906119896(x) asymp

sumy (sum119873

119899=1119896119899119861119899(x minus y)) 119869

119896(y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119882

119896(y)

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y) 119869

119896(y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119882

119896(y)

(15)

Given an image it is first divided into a preset number ofintensity segments forming an image series 119894

119896 Correspond-

ingly a range-weighted image series 119869119896(y) and a weight

series 119882119896(y) are computed Afterwards the corresponding

integral maps of these two image series are established Thefiltered result 119906

119896for each image segment 119894

119896is computed

according to (15) with 119874(1) complexity The final resultis obtained using an interpolation as given in (3) for anexample The running time of this bilateral filter is constantwith respect to the size of the spatial kernel

34 Applications to the Series-Based Bilateral Filters Since aconvolution with spatial kernels is also involved in the series-based bilateral filters the proposed sparse approximationis also possible to be applied in this type of accelerationsThe detailed adaptation for the series-based bilateral filtersis omitted in this paper which can be easily derived by thereaders

4 Experiments and Comparisons

The proposed algorithm is implemented in MATLAB 2010bunder Windows XP SP3 (32 bits) in a PC computer withPentium Dual-Core T4200 200GHz each and 3GB RAMThe proposed histogram-based bilateral filter with multiple-box spatial kernel is tested and discussed in this sectionThe experiments on approximating the bilateral filter withGaussian spatial and range kernels provide the readers witha glance at the validity and the effectiveness of the proposedmethod The application to other types of the acceleration ofthe bilateral filter can be easily implemented and evaluatedunder the guidance provided in the previous section But itis not given here for saving the length of this paper In thefollowing text of this section we evaluate the performanceof the proposed histogram-based bilateral filter in bothqualitative and quantitative aspects

Before the evaluation we briefly introduce the basicsettings of the experiments discussed in the following textFour standard test images are employed which are 8 bitgrayscale images of size 512 times 512 as shown in Figure 1 Thenumerical results given in the following texts are all producedusing the standard test images unless otherwise noticed

41 Qualitative Demonstration For the qualitative demon-stration the proposed histogram-based method togetherwith Poriklirsquos single-box bilateral filter andGunturkrsquos bilateralfilter is employed to approximate the standard bilateral filter

6 Mathematical Problems in Engineering

(a) Barbara (b) Boat (c) Lena (d) Pirate

Figure 1 Four standard test images used in the experiments in this paper They are 8-bit grayscale images of size 512 times 512

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

Figure 2 Barbara a demonstration of the visual quality of the approximation results First column results obtained using the proposedmethod where119873 = 5 Second column the color-coded absolute error maps corresponding to the images in the first column Third columnresults obtained using Poriklirsquos single-box bilateral filter with optimal spatial parameter Fourth column the color-coded absolute error mapscorresponding to the images in the third column Fifth column results obtained using Gunturkrsquos bilateral filter where119872 = 5 Last columnthe color-coded absolute error maps corresponding to the images in the fifth column First row images are obtained with 120590

119904= 12 Second

row images are obtained with 120590119904= 18 Third row images are obtained with 120590

119904= 30 Fourth row images are obtained with 120590

119904= 60 For all

these results 120590119903= 50 and 119875 = 16 The ranges of the color-coded maps are uniformly limited to [0 50] to facilitate visual comparison

with Gaussian spatial and range kernels The results areillustrated in Figure 2 As shown in Figure 2 the images inthe first third and fifth columns are respectively the resultsof the proposed histogram-based bilateral filter the resultsof Poriklirsquos single-box bilateral filter [21] and the results ofGunturkrsquos bilateral filter [26] The color-coded maps in thesecond fourth and sixth columns are the correspondingabsolute error between the images respectively in the firstthird and fifth columns and the results of the standard

Gaussian bilateral filter respectively with the same inputparameters The variances of the spatial kernels are 120590

119904=

12 18 30 and 60 respectively for the four rows Thevariances of the range kernels are the same that is 120590

119903= 50

The number of boxes for the proposed method is 119873 = 5 inproducing the images in the first column Correspondinglythe number of box bilateral filters used in Gunturkrsquos methodis 119872 = 5 in producing the results in the fifth column ForPoriklirsquos method the results are obtained with optimal spatial

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

4 Mathematical Problems in Engineering

the author proposes to subsample the separable 1D linearspatial filters to a constant number of taps asymmetricallyHowever the accuracy is poor using a low order Taylorexpansion when the variance of Gaussian range kernelis small Moreover the range weight blows up when theintensity difference is too large with respect to the varianceHence the decaying monotonicity for an admissible kernel isbroken

As an extension of Poriklirsquos polynomial bilateral filterin [21] Chaudhury et al propose a constant-time bilateralfilter with trigonometric range kernels in [24] Based on thefact that the raised cosine series converges to a Gaussianthe trigonometric range kernel is applied to approximateGaussian range kernel The authors show that the bilateralfilter using trigonometric series is more accurate than theone using Taylor series with the same number of termsThe computation time of the trigonometric bilateral filter isconstant with respect to the variance of the spatial kernelHowever the complexity is 119874(|R|

21205902

119903) with respect to the

variance of the range kernel where |R| denotes the numberof quantization levels of the intensity and 120590

119903is the variance

of the range kernel Consequently the bilateral filtering withsmall 120590

119903will be time consuming using trigonometric range

kernelMore recently in [25] the trigonometric bilateral filter is

accelerated using truncations when 120590119903is small and further

extended to a larger class of data-dependent filters includingthe well-known nonlocal means filter

3 Fast Implementation of theBilateral Filter Using Sparse Approximationwith Fixed Number of Boxes

In this paper we propose a method to approximate arbitraryspatial kernel with multiple boxes which can then be lever-aged for the constant-time implementation of the bilateralfilter with arbitrary spatial and range kernels Let 119871 be theradius of the spatial support of the given spatial kernel 119870

119904

applied in the bilateral filter Then all the candidate boxestogether form a series 119861

119897 where 119897 is the radius of the box 119861

119897

and 119897 = 0 1 2 119871 For arbitrary119870119904 it can be approximated

using the weighted sum of all the candidate boxes which isformulated as follows

119870119904(x minus y) asymp

119871

sum

119897=0

119896119897119861119897(x minus y) (8)

Because of the symmetry andmonotonicity of any admis-sible spatial kernel it is possible to find a real positive series119896119897 that minimizes the following squared error

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

(9)

where the spatial dependency is omitted for simplicity

31 Approximating Arbitrary Spatial Kernel with Fixed Num-ber of Boxes For that the number of boxes is great when

119871 is large the computational cost will become unbearablefor real-time applications In order to handle this problemwe add a constraint that the number of boxes used in theapproximation should not be larger than a preset number119873such that the constrained minimization of the squared errorcan be further formulated as follows

min119896119897

1003817100381710038171003817100381710038171003817100381710038171003817

119870119904minus

119871

sum

119897=0

119896119897119861119897

1003817100381710038171003817100381710038171003817100381710038171003817

2

2

st 119897 | 119896119897= 0 le 119873 (10)

The left part of the above formulation is again the leastsquared error norm And the right part is employed tolimit the number of boxes used in the approximation whichdenotes the number of boxes that have nonzero coefficientsFor any 119897 isin [0 119871] we align the center of the correspondingbox with that of 119870

119904and pad it with zeros up to the same size

as119870119904Then the columns of each padded box are concatenated

to form a column vector b119897We then put these column vectors

together to form a matrix B of size 119878 times (119871 + 1) where 119878 =

(2119871+1)2 is the number of elements in119870

119904 Correspondingly we

concatenate the columns of119870119904to form a column vector q By

definingk as a columnvector containing all the coefficients119896119897

the optimization problem given in (10) can be reformulatedas follows

k = argminkq minus Bk2 st k0 le 119873 (11)

where k0is the 119871

0norm of the vector k which denotes the

number of non-zero elements in kOne should be very familiarwith the formulation given by

(11) since it is a well-known sparse representation problemThis formulation searches the sparse representation of thesignal q using the known dictionary B This sparse approx-imation problem which is known to be NP-hard can beefficiently solved using several available techniques includingOrthogonal Matching Pursuit (OMP) [27 29 30] BasisPursuit (BP) [31 32] and FOCUSS [33]

In this paper we employ the efficient OMP algorithmby Rubinstein et al in [27] namely Batch-OMP to solve(11) After we find out the radiuses and coefficients of theboxes corresponding to the given spatial kernel and the givennumber of boxes the further computation of the bilateralfilter can be given as follows

119906BF(x) asymp 119906119900bBF (x)

=

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y)) V (y)

sumy (sum119897|119896119897 = 0 119896119897119861119897 (x minus y))119870119903(V (x) minus V (y))

(12)

With this respect we can benefit from the integral maptechnique to efficiently calculate the spatial convolution inconstant time It is worth mentioning that119873 in (10) and (11)is an input parameter defined by the users For a given 120590

119904 the

more the number of boxes used is the better the approxima-tion accuracy can be achieved But more computational timeis needed for more boxes Thus there is a tradeoff betweenthe approximation accuracy and the computational efficiency

Mathematical Problems in Engineering 5

with our method Generally we can find a minimum 119873

that guarantees the acceptable quality of the approximationwhich will be discussed in detail in the next section

32 Application to the Histogram-Based Bilateral Filters Nowhaving that an arbitrary spatial kernel is approximated witha preset number of boxes we first exploit its use in thehistogram-based bilateral filters which is originally devel-oped byWeiss in [20] later accelerated by Porikli in [21] andrecently extended by Gunturk in [26]

Firstly let us denote the solution of (11) using the notation119896119899 which contains119873non-zero coefficients for119873 boxeswith

different radiuses selected by the Batch-OMP algorithmThesubscripts 119899rsquos now are not the radiuses but the indices of theselected boxes that is 119899 = 1 2 119873 Then the proposedbilateral filter with multiple-box spatial kernel given in (12)can be reformulated as follows

119906119900bBF

(x)

=

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y)) V (y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y))

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y)) V (y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y))

(13)

Following the single-box histogram-based bilateral filterby Weiss [20] and Porikli [21] (13) can be further formulatedin terms of local histogram as follows

119906119900bBF

(x) =sum119873

119899=1119896119899sum119875

119901=1119868119901119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

sum119873

119899=1119896119899sum119875

119901=1119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

(14)

Prior to the filtering process the intensity is quantizedinto 119875 bins resulting in an intensity series 119868

119901119875

1 Then the

corresponding 119875 frames of range weight 119870119903(V(x) minus 119868

119901) are

calculated Based on the work in [22] an integral histogramis establishedThen119873 local histogrammaps are calculated inconstant time using the same integral histogram Comparedwith the single-box bilateral filter the proposed methodrequires119873minus1 additional local histogram calculations whichcan be efficiently obtained using the integral histogramtechnique The calculations of 119873 times of box filtering forboth the numerator and dominator in (14) can be parallelizedfor more efficient implementation

33 Application to the Interpolation-Based Bilateral FiltersSince Durandrsquos piecewise linear bilateral filter [9] Yangrsquosextension [23] and also Parisrsquo method [19] employ an inter-polation in pooling the filtering results we call them togetherthe interpolation-based bilateral filters for convenience Asthe origin of this type of bilateral filters Durandrsquos method isdiscussed in this paper for demonstrating the application ofthe proposed approximation to this type of bilateral filtersSimilar adaptation can be easily made for the application toYangrsquos method

Let us replace the spatial kernel 119870119904in (2) by Durand and

Dorsey using the weighted sum of multiple boxes and thecalculation of 119906

119896is formulated as follows

119906119896(x) asymp

sumy (sum119873

119899=1119896119899119861119899(x minus y)) 119869

119896(y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119882

119896(y)

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y) 119869

119896(y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119882

119896(y)

(15)

Given an image it is first divided into a preset number ofintensity segments forming an image series 119894

119896 Correspond-

ingly a range-weighted image series 119869119896(y) and a weight

series 119882119896(y) are computed Afterwards the corresponding

integral maps of these two image series are established Thefiltered result 119906

119896for each image segment 119894

119896is computed

according to (15) with 119874(1) complexity The final resultis obtained using an interpolation as given in (3) for anexample The running time of this bilateral filter is constantwith respect to the size of the spatial kernel

34 Applications to the Series-Based Bilateral Filters Since aconvolution with spatial kernels is also involved in the series-based bilateral filters the proposed sparse approximationis also possible to be applied in this type of accelerationsThe detailed adaptation for the series-based bilateral filtersis omitted in this paper which can be easily derived by thereaders

4 Experiments and Comparisons

The proposed algorithm is implemented in MATLAB 2010bunder Windows XP SP3 (32 bits) in a PC computer withPentium Dual-Core T4200 200GHz each and 3GB RAMThe proposed histogram-based bilateral filter with multiple-box spatial kernel is tested and discussed in this sectionThe experiments on approximating the bilateral filter withGaussian spatial and range kernels provide the readers witha glance at the validity and the effectiveness of the proposedmethod The application to other types of the acceleration ofthe bilateral filter can be easily implemented and evaluatedunder the guidance provided in the previous section But itis not given here for saving the length of this paper In thefollowing text of this section we evaluate the performanceof the proposed histogram-based bilateral filter in bothqualitative and quantitative aspects

Before the evaluation we briefly introduce the basicsettings of the experiments discussed in the following textFour standard test images are employed which are 8 bitgrayscale images of size 512 times 512 as shown in Figure 1 Thenumerical results given in the following texts are all producedusing the standard test images unless otherwise noticed

41 Qualitative Demonstration For the qualitative demon-stration the proposed histogram-based method togetherwith Poriklirsquos single-box bilateral filter andGunturkrsquos bilateralfilter is employed to approximate the standard bilateral filter

6 Mathematical Problems in Engineering

(a) Barbara (b) Boat (c) Lena (d) Pirate

Figure 1 Four standard test images used in the experiments in this paper They are 8-bit grayscale images of size 512 times 512

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

Figure 2 Barbara a demonstration of the visual quality of the approximation results First column results obtained using the proposedmethod where119873 = 5 Second column the color-coded absolute error maps corresponding to the images in the first column Third columnresults obtained using Poriklirsquos single-box bilateral filter with optimal spatial parameter Fourth column the color-coded absolute error mapscorresponding to the images in the third column Fifth column results obtained using Gunturkrsquos bilateral filter where119872 = 5 Last columnthe color-coded absolute error maps corresponding to the images in the fifth column First row images are obtained with 120590

119904= 12 Second

row images are obtained with 120590119904= 18 Third row images are obtained with 120590

119904= 30 Fourth row images are obtained with 120590

119904= 60 For all

these results 120590119903= 50 and 119875 = 16 The ranges of the color-coded maps are uniformly limited to [0 50] to facilitate visual comparison

with Gaussian spatial and range kernels The results areillustrated in Figure 2 As shown in Figure 2 the images inthe first third and fifth columns are respectively the resultsof the proposed histogram-based bilateral filter the resultsof Poriklirsquos single-box bilateral filter [21] and the results ofGunturkrsquos bilateral filter [26] The color-coded maps in thesecond fourth and sixth columns are the correspondingabsolute error between the images respectively in the firstthird and fifth columns and the results of the standard

Gaussian bilateral filter respectively with the same inputparameters The variances of the spatial kernels are 120590

119904=

12 18 30 and 60 respectively for the four rows Thevariances of the range kernels are the same that is 120590

119903= 50

The number of boxes for the proposed method is 119873 = 5 inproducing the images in the first column Correspondinglythe number of box bilateral filters used in Gunturkrsquos methodis 119872 = 5 in producing the results in the fifth column ForPoriklirsquos method the results are obtained with optimal spatial

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Mathematical Problems in Engineering 5

with our method Generally we can find a minimum 119873

that guarantees the acceptable quality of the approximationwhich will be discussed in detail in the next section

32 Application to the Histogram-Based Bilateral Filters Nowhaving that an arbitrary spatial kernel is approximated witha preset number of boxes we first exploit its use in thehistogram-based bilateral filters which is originally devel-oped byWeiss in [20] later accelerated by Porikli in [21] andrecently extended by Gunturk in [26]

Firstly let us denote the solution of (11) using the notation119896119899 which contains119873non-zero coefficients for119873 boxeswith

different radiuses selected by the Batch-OMP algorithmThesubscripts 119899rsquos now are not the radiuses but the indices of theselected boxes that is 119899 = 1 2 119873 Then the proposedbilateral filter with multiple-box spatial kernel given in (12)can be reformulated as follows

119906119900bBF

(x)

=

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y)) V (y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119870

119903(V (x) minus V (y))

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y)) V (y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119870

119903(V (x) minus V (y))

(13)

Following the single-box histogram-based bilateral filterby Weiss [20] and Porikli [21] (13) can be further formulatedin terms of local histogram as follows

119906119900bBF

(x) =sum119873

119899=1119896119899sum119875

119901=1119868119901119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

sum119873

119899=1119896119899sum119875

119901=1119867x119899 (119868119901)119870119903 (V (x) minus 119868119901)

(14)

Prior to the filtering process the intensity is quantizedinto 119875 bins resulting in an intensity series 119868

119901119875

1 Then the

corresponding 119875 frames of range weight 119870119903(V(x) minus 119868

119901) are

calculated Based on the work in [22] an integral histogramis establishedThen119873 local histogrammaps are calculated inconstant time using the same integral histogram Comparedwith the single-box bilateral filter the proposed methodrequires119873minus1 additional local histogram calculations whichcan be efficiently obtained using the integral histogramtechnique The calculations of 119873 times of box filtering forboth the numerator and dominator in (14) can be parallelizedfor more efficient implementation

33 Application to the Interpolation-Based Bilateral FiltersSince Durandrsquos piecewise linear bilateral filter [9] Yangrsquosextension [23] and also Parisrsquo method [19] employ an inter-polation in pooling the filtering results we call them togetherthe interpolation-based bilateral filters for convenience Asthe origin of this type of bilateral filters Durandrsquos method isdiscussed in this paper for demonstrating the application ofthe proposed approximation to this type of bilateral filtersSimilar adaptation can be easily made for the application toYangrsquos method

Let us replace the spatial kernel 119870119904in (2) by Durand and

Dorsey using the weighted sum of multiple boxes and thecalculation of 119906

119896is formulated as follows

119906119896(x) asymp

sumy (sum119873

119899=1119896119899119861119899(x minus y)) 119869

119896(y)

sumy (sum119873

119899=1119896119899119861119899(x minus y))119882

119896(y)

=

sum119873

119899=1119896119899sumy 119861119899 (x minus y) 119869

119896(y)

sum119873

119899=1119896119899sumy 119861119899 (x minus y)119882

119896(y)

(15)

Given an image it is first divided into a preset number ofintensity segments forming an image series 119894

119896 Correspond-

ingly a range-weighted image series 119869119896(y) and a weight

series 119882119896(y) are computed Afterwards the corresponding

integral maps of these two image series are established Thefiltered result 119906

119896for each image segment 119894

119896is computed

according to (15) with 119874(1) complexity The final resultis obtained using an interpolation as given in (3) for anexample The running time of this bilateral filter is constantwith respect to the size of the spatial kernel

34 Applications to the Series-Based Bilateral Filters Since aconvolution with spatial kernels is also involved in the series-based bilateral filters the proposed sparse approximationis also possible to be applied in this type of accelerationsThe detailed adaptation for the series-based bilateral filtersis omitted in this paper which can be easily derived by thereaders

4 Experiments and Comparisons

The proposed algorithm is implemented in MATLAB 2010bunder Windows XP SP3 (32 bits) in a PC computer withPentium Dual-Core T4200 200GHz each and 3GB RAMThe proposed histogram-based bilateral filter with multiple-box spatial kernel is tested and discussed in this sectionThe experiments on approximating the bilateral filter withGaussian spatial and range kernels provide the readers witha glance at the validity and the effectiveness of the proposedmethod The application to other types of the acceleration ofthe bilateral filter can be easily implemented and evaluatedunder the guidance provided in the previous section But itis not given here for saving the length of this paper In thefollowing text of this section we evaluate the performanceof the proposed histogram-based bilateral filter in bothqualitative and quantitative aspects

Before the evaluation we briefly introduce the basicsettings of the experiments discussed in the following textFour standard test images are employed which are 8 bitgrayscale images of size 512 times 512 as shown in Figure 1 Thenumerical results given in the following texts are all producedusing the standard test images unless otherwise noticed

41 Qualitative Demonstration For the qualitative demon-stration the proposed histogram-based method togetherwith Poriklirsquos single-box bilateral filter andGunturkrsquos bilateralfilter is employed to approximate the standard bilateral filter

6 Mathematical Problems in Engineering

(a) Barbara (b) Boat (c) Lena (d) Pirate

Figure 1 Four standard test images used in the experiments in this paper They are 8-bit grayscale images of size 512 times 512

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

Figure 2 Barbara a demonstration of the visual quality of the approximation results First column results obtained using the proposedmethod where119873 = 5 Second column the color-coded absolute error maps corresponding to the images in the first column Third columnresults obtained using Poriklirsquos single-box bilateral filter with optimal spatial parameter Fourth column the color-coded absolute error mapscorresponding to the images in the third column Fifth column results obtained using Gunturkrsquos bilateral filter where119872 = 5 Last columnthe color-coded absolute error maps corresponding to the images in the fifth column First row images are obtained with 120590

119904= 12 Second

row images are obtained with 120590119904= 18 Third row images are obtained with 120590

119904= 30 Fourth row images are obtained with 120590

119904= 60 For all

these results 120590119903= 50 and 119875 = 16 The ranges of the color-coded maps are uniformly limited to [0 50] to facilitate visual comparison

with Gaussian spatial and range kernels The results areillustrated in Figure 2 As shown in Figure 2 the images inthe first third and fifth columns are respectively the resultsof the proposed histogram-based bilateral filter the resultsof Poriklirsquos single-box bilateral filter [21] and the results ofGunturkrsquos bilateral filter [26] The color-coded maps in thesecond fourth and sixth columns are the correspondingabsolute error between the images respectively in the firstthird and fifth columns and the results of the standard

Gaussian bilateral filter respectively with the same inputparameters The variances of the spatial kernels are 120590

119904=

12 18 30 and 60 respectively for the four rows Thevariances of the range kernels are the same that is 120590

119903= 50

The number of boxes for the proposed method is 119873 = 5 inproducing the images in the first column Correspondinglythe number of box bilateral filters used in Gunturkrsquos methodis 119872 = 5 in producing the results in the fifth column ForPoriklirsquos method the results are obtained with optimal spatial

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

6 Mathematical Problems in Engineering

(a) Barbara (b) Boat (c) Lena (d) Pirate

Figure 1 Four standard test images used in the experiments in this paper They are 8-bit grayscale images of size 512 times 512

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

01020304050

Figure 2 Barbara a demonstration of the visual quality of the approximation results First column results obtained using the proposedmethod where119873 = 5 Second column the color-coded absolute error maps corresponding to the images in the first column Third columnresults obtained using Poriklirsquos single-box bilateral filter with optimal spatial parameter Fourth column the color-coded absolute error mapscorresponding to the images in the third column Fifth column results obtained using Gunturkrsquos bilateral filter where119872 = 5 Last columnthe color-coded absolute error maps corresponding to the images in the fifth column First row images are obtained with 120590

119904= 12 Second

row images are obtained with 120590119904= 18 Third row images are obtained with 120590

119904= 30 Fourth row images are obtained with 120590

119904= 60 For all

these results 120590119903= 50 and 119875 = 16 The ranges of the color-coded maps are uniformly limited to [0 50] to facilitate visual comparison

with Gaussian spatial and range kernels The results areillustrated in Figure 2 As shown in Figure 2 the images inthe first third and fifth columns are respectively the resultsof the proposed histogram-based bilateral filter the resultsof Poriklirsquos single-box bilateral filter [21] and the results ofGunturkrsquos bilateral filter [26] The color-coded maps in thesecond fourth and sixth columns are the correspondingabsolute error between the images respectively in the firstthird and fifth columns and the results of the standard

Gaussian bilateral filter respectively with the same inputparameters The variances of the spatial kernels are 120590

119904=

12 18 30 and 60 respectively for the four rows Thevariances of the range kernels are the same that is 120590

119903= 50

The number of boxes for the proposed method is 119873 = 5 inproducing the images in the first column Correspondinglythe number of box bilateral filters used in Gunturkrsquos methodis 119872 = 5 in producing the results in the fifth column ForPoriklirsquos method the results are obtained with optimal spatial

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Mathematical Problems in Engineering 7

Table 1 Comparison of the PSNR values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 4190 4034 4162 4315 4189 4292 4145 4089 4143 4268 4170 4260120 4328 3921 4310 4470 4010 4437 4258 4106 4253 4415 4083 4404150 4427 4168 4350 4570 4326 4392 4335 4261 4285 4517 4352 4436180 4505 4198 3789 4644 4095 3708 4390 4201 3761 4590 4198 3848240 4614 4389 2481 4735 4405 2411 4475 4337 2455 4691 4427 2535300 4684 4479 1825 4785 4429 1760 4551 4410 1797 4769 4494 1878360 4751 4528 1456 4841 4439 1393 4609 4457 1427 4836 4525 1509450 4807 4500 1152 4885 4443 1090 4675 4453 1123 4893 4493 1205600 4888 4474 916 4933 4440 853 4758 4452 886 4966 4456 969750 4934 4425 806 4962 4411 742 4819 4447 775 5021 4425 859900 4967 4489 746 4992 4427 683 4861 4522 716 5051 4523 799

Table 2 Comparison of the FSIM values

120590119904

Barbara Boat Lena PirateOurs [21] [26] Ours [21] [26] Ours [21] [26] Ours [21] [26]

090 09874 09859 09873 09928 09921 09927 09830 09810 09829 09911 09902 09911120 09902 09893 09902 09943 09911 09941 09862 09864 09862 09931 09908 09930150 09924 09914 09924 09954 09949 09952 09888 09879 09889 09946 09940 09946180 09939 09922 09939 09962 09901 09959 09907 09896 09909 09956 09913 09956240 09960 09942 09929 09972 09949 09941 09934 09911 09910 09969 09948 09944300 09973 09953 09817 09978 09941 09834 09955 09931 09820 09977 09950 09849360 09979 09956 09589 09981 09931 09629 09964 09939 09629 09982 09947 09658450 09984 09954 09137 09984 09927 09235 09973 09939 09248 09985 09944 09280600 09988 09956 08427 09985 09931 08631 09979 09940 08660 09988 09942 08697750 09991 09956 07928 09987 09932 08198 09984 09943 08246 09990 09944 08287900 09992 09962 07602 09989 09935 07916 09987 09958 07979 09990 09952 08021

parameter derived by Gunturk in [26] that is 119903 = [14120590119904]

For producing all the results shown in Figure 2 119875 = 16 Theranges of the absolute error maps shown here are uniformlylimited to [0 50] for better illustrating the difference of theperformance of the three methods

It is shown in Figure 2 that the proposed histogram-basedbilateral filter produces less error than the other twomethodswhen varying 120590

119904 Hence better accuracy is achieved in

approximating the standard bilateral filter Note that the errormaps in the fourth column show that Poriklirsquos method withoptimal box performs better than Gunturkrsquos method when120590119904is sufficiently large Especially noted in the fifth column

Gunturkrsquos method performs well with small 120590119904 but the result

images gradually become darker as 120590119904increases with fixed

119872 The performance of Gunturkrsquos bilateral filter can beimproved by increasing119872 However the computational costwill increase as wellThe numerical results on this experimentare also included in Tables 1 and 2

42 Quantitative Evaluation We quantitatively evaluate theproposed method in three aspects including the runningtime on our system with nonoptimized MATLAB codesthe quality in approximating the standard bilateral filteraccording to some previously established criteria and the

minimum number of boxes to guarantee sufficient accuracycompared with the minimum number of box bilateral filtersin Gunturkrsquos method

421 Computational Efficiency We test our method byvarying values of 119873 and 119875 and record the running timeExperiments show that the proposed method costs about236 s for a 512times512 grayscale image when119873 = 5 and119875 = 16And every additional histogram bin costs about 004 s when119873 = 5 and every additional box costs about 036 s when119875 = 16 The local histogram calculation costs 034 s eachtime on our system which is the most time-consuming partof the nonoptimized codes for every additional box Furtheracceleration of the local histogram calculation should be donefor more efficient implementation of the proposed method

Experiments show that the running time of the proposedmethod is about 01 s more than that of Gunturkrsquos methodwith 119873 = 119872 and 119875 = 16 It is because the sparseapproximation algorithm in the proposedmethod costs about01 s more than the linear problem solver in Gunturkrsquosalgorithm However the computation of any additional boxcosts as much time as an additional single-box bilateral filterAs a result the running time of the rest codes of the twoalgorithms is almost the same

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

8 Mathematical Problems in Engineering

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 95

10

15

20

25

30

35

40

45

50

120590s

PSN

R (d

B)

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 3 The PSNR values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

422 Approximation Accuracy The two previously estab-lished criteria are employed in quantitatively evaluating theapproximation quality in this paper Following the previouswork the PSNR is employed Recently Zhang et al proposea feature similarity index (FSIM) in [34] for image qualityassessment with reference It is one of the state-of-the-artmethods for predicting the similarity between the test andreference images In order to provide a more comprehensiveevaluation the FSIM is also applied for evaluating the qualityof the results

Given the result images of the standard bilateral filter withdifferent parameter settings the PSNR and FSIM values ofthe results by the methods to be evaluated are calculated

The PSNR and FSIM values on four standard test images ofthe proposed histogram-based method together with that ofPoriklirsquos and Gunturkrsquos methods are respectively listed inTables 1 and 2 where 120590

119903= 50 119875 = 16 and 119873 = 119872 = 5

The best scores among the three methods for each individual120590119904and each test image are shown in boldface We can see

from these two tables that our method outperforms the othertwo according to both criteria And it is more robust withrespect to the change of 120590

119904with a fixed119873 Besides Gunturkrsquos

bilateral filter performs well when 120590119904is small However both

PSNR and FSIM values of Gunturkrsquosmethod decrease quicklyas 120590119904increases when 119872 is fixed It is because the result

images become darker as 120590119904increases for a fixed119872 as can be

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 9: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Mathematical Problems in Engineering 9

1 2 3 4 5 6 7 8 9095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(a) 120590119903 = 25

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(b) 120590119903 = 50

1 2 3 4 5 6 7 8 9

095

0955

096

0965

097

0975

098

0985

099

0995

1

120590s

FSIM

PorikliGunturk M = 3

Gunturk M = 5

Gunturk M = 7

Gunturk M = 9

Ours N = 3

Ours N = 9

(c) 120590119903 = 100

Figure 4 The FSIM values of the results with respect to 120590119904 These results are calculated on ldquoLenardquo in approximating the Gaussian bilateral

filter where 119875 = 16

illustrated in Figure 2 Larger119872 is required for better qualityin approximating Gaussian bilateral filter with larger 120590

119904using

Gunturkrsquos methodIn order to provide a more intuitive illustration we

plot the PSNR and FSIM values on ldquoLenardquo respectivelyin Figures 3 and 4 with respect to 120590

119904 As can be seen in

these two figures the proposed histogram-based bilateralfilter has higher PSNR and FSIM values compared withthe other two methods over a large range of 120590

119904 Besides

the value of 119873 does not affect the performance too muchAs a result only a small number of boxes are sufficientfor a vast range of 120590

119904using the proposed method On the

contrary for a fixed 119872 the scores given by both principles

of Gunturkrsquos method decay quickly as 120590119904increases Using

larger119872 is helpful in producing satisfactory results howeveras discussed before the computational efficiency will bedegraded as a consequence Although small 120590

119904is sufficient

formost denoising applications large 120590119904is usually required in

many other applications including high-dynamic-range tonemapping [9] image enhancement [14] stereo vision [17] anddehazing [35] Consequently the computational cost will beunbearable for efficient implementation combining a largenumber of single-box bilateral filters

Furthermore as can be seen in Figures 3 and 4 ourhistogram-based bilateral filter is apparently more robustthan the other two methods with respect to 120590

119903 On the

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 10: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

10 Mathematical Problems in Engineering

2 4 6 8 10 12 140

10

20

30

40

M(N

)

120590s

GunturkOurs

Figure 5 Minimum number of boxes required to guarantee PSNRgt 40 dB where 119875 = 16 and 120590

119903= 50

contrary as the value of 120590119903increases the performance of

Poriklirsquos single-box bilateral filter becomes less stable withrespect to the change of 120590

119904

423 Minimum Number of Box For Gunturkrsquos methodlarger 119872 leads to better approximation accuracy Thussufficient single-box bilateral filters should be combinedto guarantee an acceptable accuracy Correspondingly asmentioned in the previous section sufficient boxes shouldalso be used in the proposed histogram-based bilateral filterFor the acceptable quality threshold it is often consideredas visually undistinguishable when PSNR ge 40 dB [21]We experiment on a standard test image namely ldquoLenardquoshown as Figure 1(c) In order to find out the minimum119873 for the proposed histogram-based bilateral filter andthe corresponding minimum 119872 for Gunturkrsquos method withrespect to the scale of the spatial kernel we vary the value of120590119904and keep other parameters unchanged For each given 120590

119904

we gradually increase both numbers and calculate the PSNRvalues of the results with respect to the results of the standardGaussian bilateral filter Then the minimum numbers whichenable the quality to exceed the acceptable threshold forboth algorithms can be obtained The minimum 119873 and theminimum 119872 with respect to 120590

119904are shown in Figure 5 It

is clearly seen that the minimum 119872 for Gunturkrsquos methodincreases as120590

119904increasesOn the contrary theminimum119873 for

the proposed method is much smaller than the minimum119872

for Gunturkrsquos method And it is nearly constant with respectto 120590119904 119875 = 16 and 120590

119903= 50 for both methods in this

experiment It is shown that the proposed histogram-basedbilateral filter is more efficient to obtain sufficient accuracyand the performance is more robust to the change of thespatial scale of the filter

Finally it is worth noting that when119873 = 1 the proposedhistogram-based bilateral filter is exactly the same as Poriklirsquossingle-box bilateral filter with optimal spatial parameter

5 Conclusions and Discussions

We have presented a method for approximating arbitraryspatial kernel using a fixed number of boxes based onsparse approximation techniques With applications to theacceleration of the bilateral filter the proposed method canbe leveraged for a broad class of constant-time bilateralfilters with arbitrary spatial and range kernels Once theparameter of the spatial kernel and the number of boxesare given the radiuses and the coefficients of the boxes aredetermined by the Batch-OMP algorithm Hence they can becomputed ahead of the filtering process The application tothe histogram-based 119874(1) bilateral filter is demonstrated inthis paper followed by a number of convictive experimentsResults tell that the proposed histogram-based bilateral filterhas better accuracy compared with other histogram-basedbilateral filters in approximating the standard bilateral filterMeanwhile the performance of the proposed histogram-based bilateral filter is robustwith respect to the parameters ofthe filter kernels And a small number of boxes are sufficientto achieve satisfactory accuracy for a large range of the spatialparameters With a very little more computational cost theaccuracy of the proposed histogram-based bilateral filter isbetter than the previous histogram-based ones

The proposed 119874(1) bilateral filter with arbitrary spatialand range kernels can be parallelized for real-time imple-mentation in GPUs Moreover it is possible for the proposedmethod to be extended to the bilateral grid 3-D cubic boxescan be used to approximate 3-D arbitrary spherical filterkernels in the augmented data space With the proposedmethod higher-dimensional manipulations are also possiblein this direction

Conflict of Interests

The authors declare that they have no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank Dr Jian Li for his insightfuldiscussion over the mathematical deductions and the imple-mentation of the algorithms This work is supported by theNational Natural Science Foundation of China under Grant90820302

References

[1] C Tomasi and R Manduchi ldquoBilateral filtering for gray andcolor imagesrdquo in Proceedings of the 6th IEEE InternationalConference on Computer Vision pp 839ndash846 January 1998

[2] S M Smith and J M Brady ldquoSUSANmdasha new approach tolow level image processingrdquo International Journal of ComputerVision vol 23 no 1 pp 45ndash78 1997

[3] L P Yaroslavsky Digital Picture ProcessingmdashAn IntroductionSpringer Berlin Germany 1985

[4] J-S Lee ldquoDigital image smoothing and the sigma filterrdquoComputer Vision Graphics and Image Processing vol 24 no 2pp 255ndash269 1983

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 11: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Mathematical Problems in Engineering 11

[5] M Elad ldquoOn the origin of the bilateral filter and ways toimprove itrdquo IEEE Transactions on Image Processing vol 11 no10 pp 1141ndash1151 2002

[6] E P Bennett J L Mason and L McMillan ldquoMultispectralbilateral video fusionrdquo IEEE Transactions on Image Processingvol 16 no 5 pp 1185ndash1194 2007

[7] M Zhang and B K Gunturk ldquoMultiresolution bilateral filteringfor image denoisingrdquo IEEE Transactions on Image Processingvol 17 no 12 pp 2324ndash2333 2008

[8] A Wong ldquoAdaptive bilateral filtering of image signals usinglocal phase characteristicsrdquo Signal Processing vol 88 no 6 pp1615ndash1619 2008

[9] FDurand and J Dorsey ldquoFast bilateral filtering for the display ofhigh-dynamic-range imagesrdquo in Proceedings of the 29th AnnualConference on Computer Graphics and Interactive Techniques(SIGGRAPH rsquo02) pp 257ndash266 San Antonio Tex USA July2002

[10] S Bae S Paris and F Durand ldquoTwo-scale tone managementfor photographic lookrdquo in Proceedings of the ACM SIGGRAPH(SIGGRAPH rsquo06) pp 637ndash645 Boston Mass USA August2006

[11] J Chen S Paris and F Durand ldquoReal-time edge-aware imageprocessing with the bilateral gridrdquoACMTransactions on Graph-ics vol 26 no 3 Article ID 1276506 pp 1ndash9 2007

[12] E Eisemann and F Durand ldquoFlash photography enhancementvia intrinsic relightingrdquo in Proceedings of the ACM SIGGRAPHpp 673ndash678 Los Angeles Calif USA August 2004

[13] M Elad ldquoRetinex by two bilateral filtersrdquo inProceedings of Scale-Space and PDE Methods in Computer Vision vol 3459 pp 217ndash229 Hofgeismar Germany April 2005

[14] B Zhang and J P Allebach ldquoAdaptive bilateral filter forsharpness enhancement and noise removalrdquo IEEE Transactionson Image Processing vol 17 no 5 pp 664ndash678 2008

[15] R Ramanath and W E Snyder ldquoAdaptive demosaickingrdquoJournal of Electronic Imaging vol 12 no 4 pp 633ndash642 2003

[16] J XiaoH ChengH Sawhney C Rao andM Isnardi ldquoBilateralfiltering-based optical flow estimation with occlusion detec-tionrdquo in Proceedings of the European Conference on ComputerVision (ECCV rsquo06) pp 211ndash224 May 2006

[17] Q Yang L Wang R Yang H Stewenius and D Nister ldquoStereomatching with color-weighted correlation hierarchical beliefpropagation and occlusion handlingrdquo IEEE Transactions onPattern Analysis andMachine Intelligence vol 31 no 3 pp 492ndash504 2009

[18] T Q Pham and L J van Vliet ldquoSeparable bilateral filtering forfast video preprocessingrdquo in Proceedings of the IEEE Interna-tional Conference on Multimedia and Expo (ICME rsquo05) pp 1ndash4Amsterdam Netherlands July 2005

[19] S Paris F Dur andA fast ldquoA fast approximation of the bilateralfilter using a signal processing approachrdquo in Proceedings of theEuropean Conference on Computer Vision (ECCV rsquo06) pp 829ndash836 Graz Austria May 2006

[20] B Weiss ldquoFast median and bilateral filteringrdquo in Proceedings ofthe ACM SIGGRAPH pp 519ndash526 Boston Mass USA August2006

[21] F Porikli ldquoConstant timeO(1) bilateral filteringrdquo in Proceedingsof the IEEE International Conference on Computer Vision andPattern Recognition (CVPR rsquo08) pp 1ndash8 Anchorage AlaskaUSA June 2008

[22] F Porikli ldquoIntegral histogram a fast way to extract histogramsin Cartesian spacesrdquo in Proceedings of the IEEE Computer

Society Conference on Computer Vision and Pattern Recognition(CVPR rsquo05) pp 829ndash836 San Diego Calif USA June 2005

[23] Q Yang K-H Tan and N Ahuja ldquoReal-time O(1) bilateralfilteringrdquo in Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition (CVPR rsquo09) pp 557ndash564 June 2009

[24] K N Chaudhury D Sage and M Unser ldquoFast O(1) bilateralfiltering using trigonometric range kernelsrdquo IEEE Transactionson Image Processing vol 20 no 12 pp 3376ndash3382 2011

[25] K N Chaudhury ldquoAcceleration of the shiftable O(1) algorithmfor bilateral filtering and nonlocal meansrdquo IEEE Transactions onImage Processing vol 22 no 4 pp 1291ndash1300 2013

[26] B K Gunturk ldquoFast bilateral filter with arbitrary range anddomain kernelsrdquo IEEETransactions on Image Processing vol 20no 9 pp 2690ndash2696 2011

[27] R Rubinstein M Zibulevsky and M Elad ldquoEfficient imple-mentation of the K-SVD algorithm using batch orthogonalmatching pursuitrdquo Tech RepCS-2008-08 Technion-ComputerScience Department 2008

[28] R Deriche ldquoRecursively implementing the gaussian and itsderivativesrdquo in Proceedings of IEEE International Conference onImage Processing (ICIP rsquo92) pp 263ndash267 1992

[29] Y C Pati R Rezaiifar and P S Krishnaprasad ldquoOrthogonalmatching pursuit recursive function approximation with appli-cations to wavelet decompositionrdquo in Proceedings of the 27thAsilomar Conference on Signals Systems amp Computers pp 40ndash44 November 1993

[30] G Davis S Mallat and M Avellaneda ldquoAdaptive greedyapproximationsrdquo Constructive Approximation vol 13 no 1 pp57ndash98 1997

[31] S S Chen D L Donoho and M A Saunders ldquoAtomicdecomposition by basis pursuitrdquo SIAM Review vol 43 no 1pp 129ndash159 2001

[32] D L Donoho and M Elad ldquoOptimally sparse representationin general (nonorthogonal) dictionaries via 1198711 minimizationrdquoProceedings of the National Academy of Sciences of the UnitedStates of America vol 100 no 5 pp 2197ndash2202 2003

[33] I F Gorodnitsky and B D Rao ldquoSparse signal reconstructionfrom limited data using FOCUSS a re-weighted minimumnorm algorithmrdquo IEEE Transactions on Signal Processing vol45 no 3 pp 600ndash616 1997

[34] L Zhang L Zhang X Mou and D Zhang ldquoFSIM a featuresimilarity index for image quality assessmentrdquo IEEE Transac-tions on Image Processing vol 20 no 8 pp 2378ndash2386 2011

[35] P Carr and R Hartley ldquoImproved single image dehazing usinggeometryrdquo in Proceedings of the Digital Image Computing Tech-niques and Applications (DICTA rsquo09) pp 103ndash110 December2009

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 12: Research Article Optimal (1) Bilateral Filter with ...downloads.hindawi.com › journals › mpe › 2014 › 289517.pdf · [ ]developsan( log ) algorithm for local histogram calculation,whichislaterusedtoderivean

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of