# A Gentle Introduction to Bilateral Filtering and its Applications

47 slides
2.11 MB
472 views

## Presentation Transcript

1

Course Evaluationshttp://www.siggraph.org/courses_evaluation 4 Random Individuals will win an ATI Radeontm HD2900XT

2

A Gentle Introduction to Bilateral Filtering and its ApplicationsFrom Gaussian blur to bilateral filter – S. Paris Applications – F. Durand Link with other filtering techniques – P. Kornprobst Implementation – S. Paris Variants – J. Tumblin Advanced applications – J. Tumblin Limitations and solutions – P. KornprobstBREAK

3

A Gentle Introduction to Bilateral Filtering and its ApplicationsRecap Sylvain Paris – MIT CSAIL

4

Decomposition into Large-scale and Small-scale Layersinputsmoothed (structure, large scale)residual (texture, small scale)edge-preserving: Bilateral Filter

5

Weighted Average of PixelsDepends on spatial distance and intensity difference Pixels across edges have almost influencespacerangenormalizationspacerangepq

6

A Gentle Introduction to Bilateral Filtering and its ApplicationsEfficient Implementations of the Bilateral Filter Sylvain Paris – MIT CSAIL

7

OutlineBrute-force Implementation Separable Kernel [Pham and Van Vliet 05] Box Kernel [Weiss 06] 3D Kernel [Paris and Durand 06]

8

Brute-force ImplementationFor each pixel p For each pixel q Compute 8 megapixel photo: 64,000,000,000,000 iterations! V E R Y S L O W ! More than 10 minutes per image

9

ComplexityComplexity = “how many operations are needed, how this number varies” S = space domain = set of pixel positions | S | = cardinality of S = number of pixels In the order of 1 to 10 millions Brute-force implementation:

10

Better Brute-force ImplementationIdea: Far away pixels are negligible For each pixel p For each pixel q such that || p – q || < cte  sslooking at all pixelslooking at neighbors only

11

DiscussionComplexity: Fast for small kernels: ss ~ 1 or 2 pixels BUT: slow for larger kernelsneighborhood area

12

OutlineBrute-force Implementation Separable Kernel [Pham and Van Vliet 05] Box Kernel [Weiss 06] 3D Kernel [Paris and Durand 06]

13

Separable KernelStrategy: filter the rows then the columns Two “cheap” 1D filters instead of an “expensive” 2D filter[Pham and Van Vliet 05]

14

DiscussionComplexity: Fast for small kernels (<10 pixels) Approximation: BF kernel not separable Satisfying at strong edges and uniform areas Can introduce visible streaks on textured regions

15

input

16

brute-force implementation

17

separable kernel mostly OK, some visible artifacts (streaks)

18

OutlineBrute-force Implementation Separable Kernel [Pham and Van Vliet 05] Box Kernel [Weiss 06] 3D Kernel [Paris and Durand 06]

19

Box KernelBilateral filter with a square box window The bilateral filter can be computed only from the list of pixels in a square neighborhood.[Weiss 06][Yarovlasky 85]box window

20

Box KernelIdea: fast histograms of square windows[Weiss 06]input: full histogram is knownupdate: add one line, remove one lineTracking one window

21

Box KernelIdea: fast histograms of square windows[Weiss 06]input: full histograms are knownupdate: add one line, remove one line, add two pixels, remove two pixelsTracking two windows at the same time

22

DiscussionComplexity: always fast Only single-channel images Exploit vector instructions of CPU Visually satisfying results (no artifacts) 3 passes to remove artifacts due to box windows (Mach bands)1 iteration3 iterations

23

input

24

brute-force implementation

25

box kernel visually different, yet no artifacts

26

OutlineBrute-force Implementation Separable Kernel [Pham and Van Vliet 05] Box Kernel [Weiss 06] 3D Kernel [Paris and Durand 06]

### Browse More Presentations

Last Updated: 8th March 2018