fixing the gaussian blur the bilateral filter
play

Fixing the Gaussian Blur: the Bilateral Filter Sylvain Paris MIT - PowerPoint PPT Presentation

A Gentle Introduction A Gentle Introduction to Bilateral Filtering to Bilateral Filtering and its Applications and its Applications Fixing the Gaussian Blur: the Bilateral Filter Sylvain Paris MIT CSAIL Blur Comes from Blur Comes


  1. A Gentle Introduction A Gentle Introduction to Bilateral Filtering to Bilateral Filtering and its Applications and its Applications “Fixing the Gaussian Blur”: the Bilateral Filter Sylvain Paris – MIT CSAIL

  2. Blur Comes from Blur Comes from Averaging across Edges Averaging across Edges * output input * * Same Gaussian kernel everywhere.

  3. Bilateral Filter Bilateral Filter [Aurich 95, Smith 97, Tomasi 98] No Averaging across Edges No Averaging across Edges * output input * * The kernel shape depends on the image content.

  4. Bilateral Filter Definition: Bilateral Filter Definition: an Additional Edge Term an Additional Edge Term Same idea: weighted average of pixels . new not new new ( ) 1 ( ) ∑ = − − [ ] || || | | p q BF I G G I I I σ σ p p q q s r W ∈ q S p normalization space weight range weight factor I

  5. Illustration a 1D Image Illustration a 1D Image • 1D image = line of pixels • Better visualized as a plot pixel intensity pixel position

  6. Gaussian Blur and Bilateral Filter Gaussian Blur and Bilateral Filter Gaussian blur p ( ) ∑ = − [ ] || || p q GB I G I q σ p q ∈ q S space space Bilateral filter [Aurich 95, Smith 97, Tomasi 98] p ( ) 1 ( ) range ∑ = − − [ ] || || | | BF I G p q G I I I σ σ p p q q s r W q ∈ q S p space range normalization space

  7. Bilateral Filter on a Height Field Bilateral Filter on a Height Field ( ) 1 ( ) ∑ = − − [ ] || || | | p q BF I G G I I I σ σ p p q q s r W ∈ q S p p p p p q q output input reproduced from [Durand 02]

  8. Space and Range Parameters Space and Range Parameters ( ) 1 ( ) ∑ = − − [ ] || || | | BF I G p q G I I I σ σ p p q q s r W ∈ q S p • space σ s : spatial extent of the kernel, size of the considered neighborhood. • range σ r : “minimum” amplitude of an edge

  9. Influence of Pixels Influence of Pixels Only pixels close in space and in range are considered. space range p p

  10. Exploring the Parameter Space Exploring the Parameter Space σ r = ∞ σ r = 0.1 σ r = 0.25 (Gaussian blur) input σ s = 2 σ s = 6 σ s = 18

  11. Varying the Range Parameter Varying the Range Parameter σ r = ∞ σ r = 0.1 σ r = 0.25 (Gaussian blur) input σ s = 2 σ s = 6 σ s = 18

  12. input

  13. σ r = 0.1

  14. σ r = 0.25

  15. σ r = ∞ (Gaussian blur)

  16. Varying the Space Parameter Varying the Space Parameter σ r = ∞ σ r = 0.1 σ r = 0.25 (Gaussian blur) input σ s = 2 σ s = 6 σ s = 18

  17. input

  18. σ s = 2

  19. σ s = 6

  20. σ s = 18

  21. How to Set the Parameters How to Set the Parameters Depends on the application. For instance: • space parameter: proportional to image size – e.g., 2% of image diagonal • range parameter: proportional to edge amplitude – e.g., mean or median of image gradients • independent of resolution and exposure

  22. A Few A Few More Advanced More Advanced Remarks Remarks

  23. Bilateral Filter Crosses Thin Lines Bilateral Filter Crosses Thin Lines • Bilateral filter averages across features thinner than ~2 σ s • Desirable for smoothing: more pixels = more robust • Different from diffusion that stops at thin lines close-up kernel

  24. Iterating the Bilateral Filter Iterating the Bilateral Filter = [ ] I BF I + ( 1 ) ( ) n n • Generate more piecewise-flat images • Often not needed in computational photo.

  25. input

  26. 1 iteration

  27. 2 iterations

  28. 4 iterations

  29. Bilateral Filtering Color Images Bilateral Filtering Color Images input For gray-level images intensity difference ( ) 1 ( ) ∑ = − − [ ] || || | | p q BF I G G I I I σ σ p p q q s r W ∈ q S p scalar output For color images color difference ( ) 1 ( ) ∑ = − − [ ] || || || || BF I G p q G C C C σ σ p p q q s r W ∈ q S p 3D vector (RGB, Lab) The bilateral filter is The bilateral filter is extremely easy to adapt to your need. extremely easy to adapt to your need.

  30. Hard to Compute Hard to Compute ( ) 1 ( ) ∑ • Nonlinear = − − [ ] || || | | BF I G p q G I I I σ σ p p q q W s r ∈ q S p • Complex, spatially varying kernels – Cannot be precomputed, no FFT… • Brute-force implementation is slow > 10min

  31. Questions? Questions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend