local lut upsampling for acceleration of edge-preserving

8
Local LUT Upsampling for Acceleration of Edge-Preserving Filtering Hiroshi Tajima, Teppei Tsubokawa, Yoshihiro Maeda, and Norishige Fukushima * Nagoya Institute of Technology, Japan * https://fukushima.web.nitech.ac.jp/en/ Keywords: Edge-preserving filtering, local LUT upsampling, acceleration, bilateral filtering, L 0 smoothing Abstract: Edge-preserving filters have been used in various applications in image processing. As the number of pixels of digital cameras has been increasing, the computational cost becomes higher, since the order of the filters depends on the image size. There are several acceleration approaches for the edge-preserving filtering; how- ever, most approaches reduce the dependency of filtering kernel size to the processing time. In this paper, we propose a method to accelerate the edge-preserving filters for high-resolution images. The method subsam- ples an input image and then performs the edge-preserving filtering on the subsampled image. Our method then upsamples the subsampled image with the guidance, which is the high-resolution input images. For this upsampling, we generate per-pixel LUTs for high-precision upsampling. Experimental results show that the proposed method has higher performance than the conventional approaches. 1 INTRODUCTION Edge-preserving filtering smooths images while maintaining the outline in the images. There are vari- ous edge-preserving filters for various purposes of im- age processing, such as bilateral filtering (Tomasi and Manduchi, 1998), non-local means filtering (Buades et al., 2005), DCT filtering (Yu and Sapiro, 2011), BM3D (Dabov et al., 2007), guided image fil- tering (He et al., 2010), domain transform filter- ing (Gastal and Oliveira, 2011), adaptive manifold fil- tering (Gastal and Oliveira, 2012), local Laplacian fil- tering (Paris et al., 2011), weighted least square fil- tering (Levin et al., 2004), and L 0 smoothing (Xu et al., 2011). The applications of the edge-preserving filters include noise removal (Buades et al., 2005), outline emphasis (Bae et al., 2006), high dynamic range imaging (Durand and Dorsey, 2002), haze re- moving (He et al., 2009), stereo matching (Hosni et al., 2013; Matsuo et al., 2015), free viewpoint imaging (Kodera et al., 2013), depth map enhance- ment (Matsuo et al., 2013). The computational cost of edge-preserving filter- ing is the main issue. There are several accelera- tion approaches for each filter, such as bilateral fil- tering (Durand and Dorsey, 2002; Yang et al., 2009; Adams et al., 2010; Chaudhury et al., 2011; Chaud- hury, 2011; Chaudhury, 2013; Sugimoto and Kamata, 2015; Sugimoto et al., 2016; Ghosh et al., 2018; Maeda et al., 2018b; Maeda et al., 2018a), non-local Subsampling Edge-preserving smoothing filter Reference Output Generating Local LUT Low-resolution Input Low-resolution Output Input Image Output Image Local LUT Figure 1: Local LUT upsampling: an input image is down- sampled and then the image is smoothed by arbitrary edge- preserving filtering. Next, we create per-pixel LUT by us- ing the correspondence between subsampled input and out- put images. Finally, we convert the input image into the approximated image by the LUT. means filtering (Adams et al., 2010; Fukushima et al., 2015), local Laplacian filtering (Aubry et al., 2014), DCT filtering (Fujita et al., 2015), guided image filter- ing (Murooka et al., 2018; Fukushima et al., 2018b) and weighted least square filtering (Min et al., 2014). The computational time of each filter, however, de- pends on image resolution, and it is rapidly increas- ing, e.g., smartphone’s cameras even have 12M pix- els. For such a high-resolution image, we require more acceleration techniques. Processing with subsampling and then upsam- pling is the most straightforward approach to ac- celerate image processing. This approach dramat- ically reduces processing time; however, the accu-

Upload: others

Post on 14-Mar-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Local LUT Upsampling for Acceleration of Edge-Preserving

Local LUT Upsampling for Acceleration of Edge-Preserving Filtering

Hiroshi Tajima, Teppei Tsubokawa, Yoshihiro Maeda, and Norishige Fukushima ∗

Nagoya Institute of Technology, Japan∗ https://fukushima.web.nitech.ac.jp/en/

Keywords: Edge-preserving filtering, local LUT upsampling, acceleration, bilateral filtering, L0 smoothing

Abstract: Edge-preserving filters have been used in various applications in image processing. As the number of pixelsof digital cameras has been increasing, the computational cost becomes higher, since the order of the filtersdepends on the image size. There are several acceleration approaches for the edge-preserving filtering; how-ever, most approaches reduce the dependency of filtering kernel size to the processing time. In this paper, wepropose a method to accelerate the edge-preserving filters for high-resolution images. The method subsam-ples an input image and then performs the edge-preserving filtering on the subsampled image. Our methodthen upsamples the subsampled image with the guidance, which is the high-resolution input images. For thisupsampling, we generate per-pixel LUTs for high-precision upsampling. Experimental results show that theproposed method has higher performance than the conventional approaches.

1 INTRODUCTION

Edge-preserving filtering smooths images whilemaintaining the outline in the images. There are vari-ous edge-preserving filters for various purposes of im-age processing, such as bilateral filtering (Tomasi andManduchi, 1998), non-local means filtering (Buadeset al., 2005), DCT filtering (Yu and Sapiro, 2011),BM3D (Dabov et al., 2007), guided image fil-tering (He et al., 2010), domain transform filter-ing (Gastal and Oliveira, 2011), adaptive manifold fil-tering (Gastal and Oliveira, 2012), local Laplacian fil-tering (Paris et al., 2011), weighted least square fil-tering (Levin et al., 2004), and L0 smoothing (Xuet al., 2011). The applications of the edge-preservingfilters include noise removal (Buades et al., 2005),outline emphasis (Bae et al., 2006), high dynamicrange imaging (Durand and Dorsey, 2002), haze re-moving (He et al., 2009), stereo matching (Hosniet al., 2013; Matsuo et al., 2015), free viewpointimaging (Kodera et al., 2013), depth map enhance-ment (Matsuo et al., 2013).

The computational cost of edge-preserving filter-ing is the main issue. There are several accelera-tion approaches for each filter, such as bilateral fil-tering (Durand and Dorsey, 2002; Yang et al., 2009;Adams et al., 2010; Chaudhury et al., 2011; Chaud-hury, 2011; Chaudhury, 2013; Sugimoto and Kamata,2015; Sugimoto et al., 2016; Ghosh et al., 2018;Maeda et al., 2018b; Maeda et al., 2018a), non-local

Subsampling

Edge-preservingsmoothing filter

Reference Output

GeneratingLocal LUT

Low-resolution Input

Low-resolution Output

Input Image Output ImageLocal LUT

Figure 1: Local LUT upsampling: an input image is down-sampled and then the image is smoothed by arbitrary edge-preserving filtering. Next, we create per-pixel LUT by us-ing the correspondence between subsampled input and out-put images. Finally, we convert the input image into theapproximated image by the LUT.

means filtering (Adams et al., 2010; Fukushima et al.,2015), local Laplacian filtering (Aubry et al., 2014),DCT filtering (Fujita et al., 2015), guided image filter-ing (Murooka et al., 2018; Fukushima et al., 2018b)and weighted least square filtering (Min et al., 2014).The computational time of each filter, however, de-pends on image resolution, and it is rapidly increas-ing, e.g., smartphone’s cameras even have 12M pix-els. For such a high-resolution image, we requiremore acceleration techniques.

Processing with subsampling and then upsam-pling is the most straightforward approach to ac-celerate image processing. This approach dramat-ically reduces processing time; however, the accu-

Page 2: Local LUT Upsampling for Acceleration of Edge-Preserving

racy of the approximation is also significantly de-creased. Subsampling loses high-frequency and largeedges in images; hence, the resulting images alsolose the information. Different from super-resolutionproblems, subsampling/upsampling for accelerationcan utilize a high-resolution input image as a guid-ance signal. Joint bilateral upsampling (Kopf et al.,2007) and guided image upsampling (He and Sun,2015) utilize the high-resolution image for high-quality upsampling as extensions of joint bilateral fil-tering (Petschnigg et al., 2004; Eisemann and Durand,2004). However, both upsampling are specific for ac-celerating bilateral filtering and guided image filter-ing. Note that More specific upsampling, e.g., depthmap upsampling (Fukushima et al., 2016), improvethe upsampling quality.

In this paper, we propose a method to acceler-ate arbitrary edge-preserving filters by using subsam-pling and upsampling with guidance high-resolutionimages. We named the proposed method local LUTupsampling. Figure 1 indicates the overview of theproposed method. In the proposed, edge-preservingfiltering, which has the highest cost in the processing,is performed in the downsampled domain for acceler-ation. Then our method utilizes high-resolution infor-mation for accurate upsampling.

2 RELATED WORKIn this section, we review two edge-preserving fil-

ters used in the section of experimental results, i.e.,bilateral filtering and L0 smoothing. Also, we intro-duce guided image upsampling, which is an accelera-tion method for edge-preserving filtering.

2.1 Bilateral FilteringBilateral filtering is a standard edge-preserving filter-ing, and it is one of the finite impulse response (FIR)filters. The processing of the bilateral filter for an in-put image III can be expressed as:

JJJppp =∑qqq∈Nppp fbf(ppp,qqq)IIIqqq

∑qqq∈Nppp fbf(ppp,qqq), (1)

where JJJ is an output image of the bilateral filter, ppp andqqq are target and reference pixels, respectively. Nppp is aset of the neighboring pixel of the target pixel ppp. fbfrepresents a weight function, and it is defined as:

fbf(ppp,qqq)=exp(‖ppp−qqq‖2

2−2σ2

s

)exp(‖IIIppp−IIIqqq‖2

2−2σ2

c

), (2)

where ‖ppp− qqq‖22 and ‖IIIppp− IIIqqq‖2

2 show the differenceof the spatial distance and luminance value betweenthe target pixel and the reference pixel, respectively.σs and σc are smoothing parameters for the Gaussian

distributions of the spatial distance and luminance dif-ference, respectively. The bilateral filter smooths im-ages with the range weight in addition to the spatialweight. As a result, a large weight is given to a refer-ence pixel whose distance and luminance from targetpixel is close.

2.2 L0 Smoothing

L0 smoothing can emphasize rough edges and can re-duce fine edges. The L0 smoothing smooths weakedge-parts in images more strongly than the bilateralfiltering. Therefore, it is useful for extracting edgesand generating non-photorealistic effects. An outputis obtained by solving the following equation:

minJ,h,v

{∑ppp(JJJppp−IIIppp)

2+λC(h,v)

+β((∂xJJJppp−hp)2+(∂yJJJppp−vp)

2)}, (3)

where III and JJJ are input and output images, respec-tively. hp, vp are auxiliary variables correspondingto ∂xJJJppp and ∂yJJJppp, where ppp is a target pixel coordi-nate, respectively. C(h,v) is the number of ppp that|hp|+ |vp| 6= 0, and β is determined from the gradi-ent of (h,v). In order to solve Eq. (3), it is dividedinto two sub-problems. The first is computing JJJ. Ex-cluding the term not including JJJ from Eq. (3), the fol-lowing equation is obtained:

E=∑p

(JJJp−IIIp)

2+β((∂xJJJp−hp)2+(∂yJJJp−vp)

2). (4)

JJJ is obtained by minimizing equation (4). In thismethod, derivative operators are diagonalized afterthe fast Fourier transform (FFT) for speedup:

JJJ=F −1(

F (III)+β(F (∂x)∗F (h)+F (∂y)

∗F (v))F (III)+β(F (∂x)

∗F (∂x)+F (∂y)∗F (∂y))

), (5)

where F is the FFT operator and ∗ denotes the com-plex conjugate. The second is computing (h,v). Theobjective function for (h,v) is defined as follows:

E ′=∑p

minhp,vp{(hp−∂xJJJppp)

2+(vp−∂yJJJppp)2+

λ

βH(|hp|+|vp|)}, (6)

where HHH(|hp|+ |vp|) is a binary function returning 1,if |hp|+ |vp| 6= 0 and 0 otherwise. When Eq. (6) isrewritten to the function Ep of each pixel ppp, the fol-lowing expression is obtained.

Ep = (hp−∂xJJJppp)2+(vp−∂yJJJppp)

2+λ

βH(|hp|+|vp|), (7)

which reaches its minimum E∗p under the condition:

(hp,vp)=

{(0,0) ((∂xJJJppp)

2+(∂yJJJppp)2≤λ/β)

(∂xJJJppp,∂yJJJppp) (otherwise.)(8)

Page 3: Local LUT Upsampling for Acceleration of Edge-Preserving

Algorithm 1 L0 Gradient Minimization

Input: image I, smoothing weight λ, parameters β0,βmax, and rate κ

Initialization: J← I,β← β0, i← 0repeat

With J(i), solve for h(i)p and v(i)p in Eq. (8)With h(i) and v(i), solver for J(i+1) with Eq. (5)β← κβ, i++

until β≥ βmaxOutput: result image J

After computing the minimum energy E∗p for eachpixel ppp, calculating ∑p E∗p becomes the global opti-mum for Eq. (6). The alternating minimization al-gorithm is sketched in Algorithm 1. Parameter β isautomatically adapted for each iteration. β is startingfrom a small value β0, and then it is multiplied by κ

each time.

2.3 Guided Image Upsampling

We now summarize guided image upsampling. Theupsampling is an extension of the guided image filter-ing. The filtering converts local patches in an inputimage by a linear transformation of a guidance im-age. Let the guide signal be G, and it is possible to beG = I, where I is an input image. The output patch Jpppshould be satisfied for the following relation:

Jppp = akkkGppp +bkkk,∀ppp ∈ ωkkk, (9)

where kkk indicates a center position of a rectangularpatch ωkkk, and ppp indicates a position of a pixel in thepatch. akkk and bkkk are coefficients for the linear trans-formation. The equation represents the coefficientslinearly convert the guide signals in a patch.

The coefficients are calculated by a linear regres-sion of the input signal I and Eq. (9),

arg minakkk,bkkk

= ∑ppp∈ωkkk

((akkkJppp +bkkk− Ippp)2 + εa2

kkk). (10)

The coefficients are estimated as follows:

akkk =covkkk(G, I)

varkkk(G)+ ε, bkkk = Ikkk−akkkGkkk, (11)

where ε indicates a parameter of smoothing degree.·kkk, covkkk and varkkk indicate the mean, variance, and co-variance values of the patch kkk. The coefficients areoverlapping in the output signals; thus, these coeffi-cients are averaged;

aiii =1|ω| ∑

kkk∈ωppp

akkk, biii =1|ω| ∑

kkk∈ωppp

bkkk, (12)

where | · | indicates the number of elements in the set.Finally, the output is calculated as follows:

Jiii = aiiiGiii + biii. (13)

For color filtering, let input, output and guidancesignals be III = {I1, I2, I3}, Jn (n = 1,2,3), and GGG, re-spectively. The per-channel output is defined as:

Jnppp = aaan

pppTGGGppp + bn

ppp, (14)

aaanppp =

1|ω| ∑

kkk∈ωppp

aaankkk, bn

ppp =1|ω| ∑

kkk∈ωppp

bnkkk. (15)

The coefficients aaankkk, bn

kkk are obtained as follows:

aaankkk =

covkkk(GGG, In)

varkkk(GGG)+ εEEE, bn

kkk = Inkkk −aaan

kkkTGGGkkk, (16)

where EEE is an identity matrix. When the output sig-nal is a color image, covkkk is the covariance matrix ofthe patch in I and GGG. Also, varkkk is the variance ofthe R, G, and B components, which will be covari-ance matrix, in the patch of GGG. The division of thematrix is calculated by multiplying the inverse matrixof the denominator from the left. We use box filteringfor the calculation of per pixel mean, variance, andcovariance. The fast implementation of the box filter-ing (Fukushima et al., 2018a) accelerates the filtering.

The guided image upsampling is an extensionof guided image filtering and the upsampling is ex-pressed as:

Jnppp = S−1

s (Ss(aaanppp)

TGGGppp +S−1

s (Ss(bnppp)), (17)

where S(·) and S−1(·) indicate subsampling and up-sampling operators, respectively. The upsamplingcomputes coefficients of aaappp and bppp in the subsampleddomain, and then upsamples the coefficients. Noticethat we should keep high-resolution signal of GGG.

The coefficients in the downsampled domain iscomputed as follows:

¯aaa′nppp↓ := S(aaanppp),

¯b′nppp↓ := S(bnppp), (18)

¯aaa′nppp↓ =1|ω′| ∑

kkk↓∈ω′ ppp

aaankkk↓, ¯bn

ppp↓ =1|ω′| ∑

kkk↓∈ω′ ppp

bnkkk↓, (19)

aaa′nkkk↓ =covkkk↓(GGG

′′′, I′n)

varkkk↓(GGG′′′)+ εEEE

, b′nkkk↓ =¯I′nkkk↓ −a′nkkk↓

TGGG′′′kkk↓ ,

(20)where ppp↓ indicates pixel coordinate in the downsam-pled domain. Also, aaa′ and b′ are coefficients in thedownsampled domain, respectively GGG′ := S(GGG) andI′ := S(I) represent downsampled input and guidanceimages, respectively. The filtering radius is reducedaccording to the rate of subsampling; thus, ω′ indi-cates a small rectangular patch, which is reshaped tofit the rate of subsampling.

Page 4: Local LUT Upsampling for Acceleration of Edge-Preserving

3 PROPOSED METHOD

We propose an upsampling method guided by a high-resolution image for various edge-preserving filter-ing. The proposed method generates a per-pixel look-up table (LUT), which maps pixel values of the in-put image to that of the output image of the edge-preserving filtering. If we have the result of edge-preserving filtering, we can easily transform the inputimage into the edge-preserving result by one-to-onemapping. We generate the mapping function in thesubsampled image domain for acceleration. The pro-posed method generates per-pixel LUTs for the func-tion from the correspondence between a subsampledinput and its filtering result.

Luminance values are highly correlated betweenpixels and its neighboring region in the image. Also,the correlation between the output of edge-preservingfiltering and the input image becomes high. There-fore, in this method, a LUT for each pixel is createdfrom a pair of low-resolution input and output im-ages. Then, we refer the subsampled LUT to gen-erate the high-resolution edge-preserving image. Ini-tially, an input image III is subsampled to generate alow-resolution input image III↓:

III↓ = Ss(III), (21)

where Ss is a subsampling operator. Then, edge-preserving filter is applied for III↓ and the output JJJ↓is obtained as follows:

JJJ↓ = F(III↓), (22)

where F is an operator of arbitrary edge-preservingfiltering. Then, we count frequency of one-to-onemapping between the images JJJ↓ and III↓. Let fppp(s, t)be a frequency map on a pixel ppp, where s and t are anintensity value on image III↓ and JJJ↓, respectively. Thefrequency is counted by gathering around a pixel. Themap f is defined as follows:

fppp(s, t) = ∑qqq∈Wppp

δ(Sc(IIIqqq↓),s)δ(Sc(JJJqqq↓), t), (23)

Sc(x) = bx/lc (24)

where δ(a,b) indicates the Kronecker delta function.ppp = (x,y) indicates a pixel position in the images ofIII↓ and JJJ↓. qqq is a neighboring pixel around ppp. Wpppindicates the set including qqq. Sc(x) is a quantizationfunction, which is divided by l. The output valueshave 256/l candidates. The redaction also acceleratesthe processing. We call the number of intensity can-didates as the number of bins.

Next, we determine a local LUT on a pixel ppp.With the simplest solution, we select the maximum

0

32

64

96

128

0 32 64 96 128

Output

Input

(a) Frequency map

0

32

64

96

128

0 32 64 96 128Output

Input

(b) Winner-takes-all

0

32

64

96

128

0 32 64 96 128

Output

Input

(c) Dynamic programming

Figure 2: Frequency map fppp(s, t) and its results of winner-takes-all and dynamic programming approaches for localLUT on ppp. The number of bins is 128, i.e., quantizationlevel is l = 2. The radius is r = 20 for visibility of thisfigure. In the experiment, small radius setting, e.g., r = 2,3have better performance.

frequency argument from the f by the winner-takes-all approach (WTA). The LUT under the downsam-pled domain is defined as follows:

Tppp↓[s] = arg maxt

f (s, t) (25)

The operator [·] is an array operator in programminglanguages, such as C programming language. Wecannot determine the value where f (s, t) = 0|∀t . Inthis case, we linearly interpolate the values by thenearest non-zero values around s. For boundary con-dition, we set Tppp↓[0] = 0 and Tppp↓[255] = 255, whenf (s, t) = 0|∀t . The solution cannot keep monotonicityfor the LUT. The fact sometimes generates negativeedges.

To keep the monotonicity, we can solve the prob-lem by using dynamic programming (DP). We assumethat Tppp[0] = 0 and Tppp[n] >= Tppp[n]. We define a costfunction C(s, t) for the DP under this condition:

C(s, t)=max(C(s−1, t−1)+O,C(s−1, t)),C(s, t−1)

)+ f (s, t)

(26)

where C(0,0) = f (0,0), C(s, t) = 0 (s < 0∨ t < 0).The parameter O represent an offset value to enforcediagonal matching. The cost function can be recur-sively updated. After filling the cost function, then

Page 5: Local LUT Upsampling for Acceleration of Edge-Preserving

(a) artificial (3072×2048) (b) tree (6088×4550) (c) bridge (2749×4049)

(d) cathedral (2000 ×3008)

(e) fireworks (3136×2352)

Figure 3: High-resolution test images.

we trace back the function to determine a solid pass.

Tppp↓ = arg DPpppaaassssss

C(s, t), (27)

where pppaaassssss shows the tracing back pass of the costmatrix C by using DP. Figure 2 shows the frequencymap and the resulting LUTs obtained by WTA andDP. After WTA and DP, the matrix indicates one-to-one mapping. We call this per-pixel LUT Tppp as localLUT.

The LUT has three-dimensional information, suchas n, ppp=(x,y); however, all elements are subsampled.It has not enough to map an input image into a high-resolution image. Therefore, we upsample the LUTby using tri-linear upsampling. The upsampling is de-fined as follows:

Tppp = S−1c (S−1

s (Tppp↓)), (28)

where S−1c and S−1

s is upsampling operator for the in-tensity and spatial domain, respectively. ppp indicatesthe image coordinate of pixel in the upsampled do-main.

Finally, the output image is referred from the localLUT and input intensity IIIppp. The output is defined by:

JJJppp = Tppp[IIIppp]. (29)

4 EXPERIMENTAL RESULTS

We approximated two edge-preserving filters,such as iterative bilateral filtering and L0 smoothingby subsampling based acceleration methods. Thesefilters can mostly smooth images; however, the com-putational cost is high. We compared the proposedmethod of the local LUT upsampling with the conven-tional method of the cubic upsampling and guided im-age upsampling by approximation accuracy and com-putational time. Also, we compared the proposedmethod with naıve implementation, which does notsubsample images, in computational time. We uti-lized high-resolution test images, which are shownin Fig. 31. We used two metrics of PSNR andSSIM (Wang et al., 2004) for accuracy evaluation,and we regarded the results of the naıve filtering asground truth results. We implemented the proposedmethod by C++ with OpenMP parallelization. Wealso used Intel IPP for the cubic upsampling, whichis optimized by AVX/AVX2. For guided image up-sampling, we also optimized by AVX/AVX2 withOpenCV functions. For downsampling in the pro-

1http://imagecompression.info

Page 6: Local LUT Upsampling for Acceleration of Edge-Preserving

posed method, we use the nearest neighbor down-sampling. This downsampling has better performancethan the cubic interpolation for our method. Weused OpenCV and Intel IPP for the operation withcv::INTER NN option. The used computer was In-tel Core i7 6700 (3.40 GHz) and compiled by VisualStudio 2017. We used r = 3 for local LUT upsam-pling, r = 10, iteration = 10, σs = 10,σc = 20 foriterative bilateral filtering, and λ = 0.01 and κ = 1.5for L0 smoothing.

Figures 4, 5, and 6 show the PSNR/SSIM accu-racy and computational time of iterative bilateral fil-tering and L0smoothing for large images. The param-eters of the proposed method are l = 2 and downsam-pling ratio is 8×8. The computational time is an aver-age of 10 trails. The local LUT upsampling has dras-tically higher PSNR than the cubic interpolation foreach image. Guided image upsampling is slower andlower PSNR than the proposed method. The compu-tation time of the local LUT is ×100 faster than thenaıve implementation; however, the cubic upsamplingis×10000 faster. Notice that the code of the proposedmethod is not vectorized, such as AVX/AVX2; thus,the proposed can speed up by programming, while In-tel’s code fully optimizes the cubic upsampling. Wenow optimize the code for the proposed method whilereviewing period.

Figures 7 and 8 show the relationship betweenspatial/range subsampling ratio and PSNR for itera-tive bilateral filtering and L0smoothing. The resultshows that 1/4 range downsampling (64 bin) and8× 8 spatial downsampling do not notable decreasethe PSNR quality.

Figures 9 and 10 show the trade-off between thePSNR accuracy and computational time by changingthe resizing ratio from 1/16 to 1/1024. We also changethe number of bins for local LUT upsampling. Theseresults show that the proposed method has the besttrade-off than the cubic interpolation and guided im-age upsampling.

Figures 11 and 12 depict input image and resultsof each upsampling method for iterative bilateral fil-tering and L0 smoothing, respectively.

5 CONCLUSIONS

In this paper, we proposed an acceleration method foredge-preserving filtering with image upsampling. Wecall the upsampling as local LUT upsampling. Thelocal LUT upsampling has higher approximation ac-curacy than the conventional approaches of cubic andguided image upsampling. Also, the local LUT up-sampling accelerates ×100 faster than the naıve im-plementation.

20

25

30

35

40

artificial tree bridge cathedral fireworks

PSN

R [

dB

]

cubic upsampling guided upsampling local LUT

(a) Bilateral filtering

20

25

30

35

40

artificial tree bridge cathedral fireworks

PSN

R [

dB

]

cubic upsampling guided upsampling local LUT

(b) L0 smoothing

Figure 4: Approximation accuracy of PSNR for each imageand method.

0.7

0.8

0.9

1.0

artificial tree bridge cathedral fireworks

SSIM

cubic upsampling guided upsampling local LUT

(a) Bilateral filtering

0.7

0.8

0.9

1.0

artificial tree bridge cathedral fireworks

SSIM

cubic upsampling guided upsampling local LUT

(b) L0 smoothing

Figure 5: Approximation accuracy of SSIM for each imageand method.

1

10

100

1000

10000

100000

1000000

artificial tree bridge cathedral fireworks

Tim

e [

ms]

cubic upsampling guided upsampling

local LUT naive

(a) Bilateral filtering

1

10

100

1000

10000

100000

artificial tree bridge cathedral fireworks

Tim

e [

ms]

cubic upsampling guided upsamplinglocal LUT naive

(b) L0 smoothing

Figure 6: Computational time for each image and method.

ACKNOWLEDGEMENTSThis work was supported by JSPS KAKENHI(JP17H01764, 18K18076).

REFERENCES

Adams, A., Baek, J., and Davis, M. A. (2010). Fast high-dimensional filtering using the permutohedral lattice.Computer Graphics Forum, 29(2):753–762.

Aubry, M., Paris, S., Hasinoff, S. W., Kautz, J., and Durand,F. (2014). Fast local laplacian filters: Theory and ap-plications. ACM Transactions on Graphics, 33(5).

Bae, S., Paris, S., and Durand, F. (2006). Two-scale tonemanagement for photographic look. ACM Transac-tions on Graphics, pages 637–645.

Buades, A., Coll, B., and Morel, J. M. (2005). A non-localalgorithm for image denoising. In Proc. Computer Vi-sion and Pattern Recognition (CVPR).

Chaudhury, K. N. (2011). Constant-time filtering usingshiftable kernels. IEEE Signal Processing Letters,18(11):651–654.

Chaudhury, K. N. (2013). Acceleration of the shiftable o(1)algorithm for bilateral filtering and nonlocal means.IEEE Transactions on Image Processing, 22(4):1291–1300.

Page 7: Local LUT Upsampling for Acceleration of Edge-Preserving

15

20

25

30

35

0 32 64 96 128

PSN

R [

dB

]

number of bins

subsampling rate : 1024

subsampling rate : 256

subsampling rate : 64

subsampling rate : 16

Figure 7: Bilateral filtering result: PSNR w.r.t. the numberof bins with changing resizing ratio.

20

25

30

35

40

0 32 64 96 128

PSN

R [

dB

]

number of bins

subsampling rate : 1024

subsampling rate : 256

subsampling rate : 64

subsampling rate : 16

Figure 8: L0 smoothing result: PSNR w.r.t. the number ofbins with changing resizing ratio.

Chaudhury, K. N., Sage, D., and Unser, M. (2011).Fast o(1) bilateral filtering using trigonometric rangekernels. IEEE Transactions on Image Processing,20(12):3376–3382.

Dabov, K., Foi, A., Katkovnik, V., and Egiazarian, K.(2007). Image denoising by sparse 3-d transform-domain collaborative filtering. IEEE Transactions onimage processing, 16(8):2080–2095.

Durand, F. and Dorsey, J. (2002). Fast bilateral filteringfor the display of high-dynamic-range images. ACMTransactions on Graphics, 21(3):257–266.

Eisemann, E. and Durand, F. (2004). Flash photography en-hancement via intrinsic relighting. ACM Transactionson Graphics, 23(3):673–678.

Fujita, S., Fukushima, N., Kimura, M., and Ishibashi, Y.(2015). Randomized redundant dct: Efficient denois-ing by using random subsampling of dct patches. InProc. ACM SIGGRAPH Asia 2015 Technical Briefs.

Fukushima, N., Fujita, S., and Ishibashi, Y. (2015). Switch-ing dual kernels for separable edge-preserving fil-tering. In Proc. IEEE International Conference onAcoustics, Speech and Signal Processing (ICASSP).

Fukushima, N., Maeda, Y., Kawasaki, Y., Nakamura, M.,Tsumura, T., Sugimoto, K., and Kamata, S. (2018a).Efficient computational scheduling of box and gaus-sian fir filtering for cpu microarchitecture. In Proc.Asia-Pacific Signal and Information Processing As-sociation Annual Summit and Conference (APSIPA),2018.

Fukushima, N., Sugimoto, K., and Kamata, S. (2018b).

15

20

25

30

35

40

0 1000 2000 3000 4000 5000 6000 7000

PSN

R [

dB

]

Time [ms]

cubic upsamplingguided upsamplingnumber of bins : 32number of bins : 64number of bins : 128

Figure 9: Resizing and changing the number of bins perfor-mance in PSNR w.r.t. computational time (bilateral filter).Local LUT samples 32, 64, and 128 bins, respectively.

20

25

30

35

40

45

0 5000 10000 15000 20000

PSN

R [

dB

]

Time [ms]

cubic upsampling

guided upsampling

number of bins : 32

number of bins : 64

number of bins : 128

Figure 10: Resizing and changing the number of bins per-formance in PSNR w.r.t. computational time (L0 smooth-ing). Local LUT samples 32, 64, and 128 bins, respectively.

Guided image filtering with arbitrary window func-tion. In Proc. IEEE International Conference onAcoustics, Speech and Signal Processing (ICASSP).

Fukushima, N., Takeuchi, K., and Kojima, A. (2016). Self-similarity matching with predictive linear upsamplingfor depth map. In Proc. 3DTV-Conference.

Gastal, E. S. L. and Oliveira, M. M. (2011). Domaintransform for edge-aware image and video processing.ACM Transactions on Graphics, 30(4).

Gastal, E. S. L. and Oliveira, M. M. (2012). Adaptive man-ifolds for real-time high-dimensional filtering. ACMTransactions on Graphics, 31(4).

Ghosh, S., Nair, P., and Chaudhury, K. N. (2018). Opti-mized fourier bilateral filtering. IEEE Signal Process-ing Letters, 25(10):1555–1559.

He, K. and Sun, J. (2015). Fast guided filter. CoRR,abs/1505.00996.

He, K., Sun, J., and Tang, X. (2009). Single image hazeremoval using dark channel prior. In Proc. ComputerVision and Pattern Recognition (CVPR).

He, K., Sun, J., and Tang, X. (2010). Guided image fil-tering. In Proc. European Conference on ComputerVision (ECCV).

Hosni, A., Rhemann, C., Bleyer, M., Rother, C., andGelautz, M. (2013). Fast cost-volume filtering forvisual correspondence and beyond. IEEE Transac-tions on Pattern Analysis and Machine Intelligence,35(2):504–511.

Page 8: Local LUT Upsampling for Acceleration of Edge-Preserving

(a) Input (b) Naıve (c) Cubic (d) Guided Upsampling (e) Local LUT

Figure 11: Results of iterative bilateral filtering.

(a) Input (b) Naıve (c) Cubic (d) Guided Upsampling (e) Local LUT

Figure 12: Results of L0 smoothing.

Kodera, N., Fukushima, N., and Ishibashi, Y. (2013). Fil-ter based alpha matting for depth image based render-ing. In Proc. IEEE Visual Communications and ImageProcessing (VCIP).

Kopf, J., Cohen, M. F., Lischinski, D., and Uyttendaele, M.(2007). Joint bilateral upsampling. ACM Transactionson Graphics, 26(3).

Levin, A., Lischinski, D., and Weiss, Y. (2004). Coloriza-tion using optimization. ACM Transactions on Graph-ics, 23(3):689–694.

Maeda, Y., Fukushima, N., and Matsuo, H. (2018a). Ef-fective implementation of edge-preserving filtering oncpu microarchitectures. Applied Sciences, 8(10).

Maeda, Y., Fukushima, N., and Matsuo, H. (2018b). Taxon-omy of vectorization patterns of programming for firimage filters using kernel subsampling and new one.Applied Sciences, 8(8).

Matsuo, T., Fujita, S., Fukushima, N., and Ishibashi, Y.(2015). Efficient edge-awareness propagation viasingle-map filtering for edge-preserving stereo match-ing. In Proc. SPIE, volume 9393.

Matsuo, T., Fukushima, N., and Ishibashi, Y. (2013).Weighted joint bilateral filter with slope depth com-pensation filter for depth map refinement. In Proc.International Conference on Computer Vision Theoryand Applications (VISAPP).

Min, D., Choi, S., Lu, J., Ham, B., Sohn, K., and Do,M. N. (2014). Fast global image smoothing based onweighted least squares. IEEE Transactions on ImageProcessing, 23(12):5638–5653.

Murooka, Y., Maeda, Y., Nakamura, M., Sasaki, T., andFukushima, N. (2018). Principal component analysisfor acceleration of color guided image filtering. In

Proc. International Workshop on Frontiers of Com-puter Vision (IW-FCV).

Paris, S., Hasinoff, S. W., and Kautz, J. (2011). Locallaplacian filters: Edge-aware image processing witha laplacian pyramid. pages 68:1–68:12.

Petschnigg, G., Agrawala, M., Hoppe, H., Szeliski, R., Co-hen, M., and Toyama, K. (2004). Digital photographywith flash and no-flash image pairs. ACM Transac-tions on Graphics, 23(3):664–672.

Sugimoto, K., Fukushima, N., and Kamata, S. (2016).Fast bilateral filter for multichannel images via soft-assignment coding. In Proc. Asia-Pacific Signal andInformation Processing Association Annual Summitand Conference (APSIPA).

Sugimoto, K. and Kamata, S. (2015). Compressive bilat-eral filtering. IEEE Transactions on Image Process-ing, 24(11):3357–3369.

Tomasi, C. and Manduchi, R. (1998). Bilateral filtering forgray and color images. In Proc. International Confer-ence on Computer Vision (ICCV), pages 839–846.

Wang, Z., Bovik, A. C., Sheikh, H. R., and Simoncelli, E. P.(2004). Image quality assessment: from error visi-bility to structural similarity. IEEE Transactions onImage Processing, 13(4):600–612.

Xu, L., Lu, C., Xu, Y., and Jia, J. (2011). Image smoothingvia l0 gradient minimization. ACM Transactions onGraphics.

Yang, Q., Tan, K. H., and Ahuja, N. (2009). Real-time o(1) bilateral filtering. In Proc. Computer Vision andPattern Recognition (CVPR), pages 557–564.

Yu, G. and Sapiro, G. (2011). Dct image denoising: A sim-ple and effective image denoising algorithm. ImageProcessing On Line, 1:1.