na ve image smoothing gaussian blur
play

Nave Image Smoothing: Gaussian Blur Sylvain Paris MIT CSAIL - PowerPoint PPT Presentation

A Gentle Introduction A Gentle Introduction to Bilateral Filtering to Bilateral Filtering and its Applications and its Applications Nave Image Smoothing: Gaussian Blur Sylvain Paris MIT CSAIL Notation and Definitions Notation and


  1. A Gentle Introduction A Gentle Introduction to Bilateral Filtering to Bilateral Filtering and its Applications and its Applications Naïve Image Smoothing: Gaussian Blur Sylvain Paris – MIT CSAIL

  2. Notation and Definitions Notation and Definitions y • Image = 2D array of pixels x • Pixel = intensity (scalar) or color (3D vector) • I p = value of image I at position: p = ( p x , p y ) • F [ I ] = output of filter F applied to image I

  3. Strategy for Smoothing Images Strategy for Smoothing Images • Images are not smooth because adjacent pixels are different. • Smoothing = making adjacent pixels look more similar. • Smoothing strategy pixel → average of its neighbors

  4. output square neighborhood average Box Average Box Average input

  5. Equation of Box Average Equation of Box Average ∑ = − [ ] ( ) BA I B I p q σ p q ∈ S q intensity at result at pixel q pixel p sum over all pixels q normalized box function 0

  6. Square Box Generates Defects Square Box Generates Defects • Axis-aligned streaks • Blocky results output input

  7. Box Profile Box Profile pixel weight pixel position unrelated related unrelated pixels pixels pixels

  8. Strategy to Solve these Problems Strategy to Solve these Problems • Use an isotropic ( i.e. circular) window. • Use a window with a smooth falloff. box window Gaussian window

  9. output per-pixel multiplication average * Gaussian Blur Gaussian Blur input

  10. input

  11. box average

  12. Gaussian blur

  13. Equation of Gaussian Blur Equation of Gaussian Blur Same idea: weighted average of pixels . ( ) ∑ = − [ ] || || GB I G I p q σ p q ∈ S q normalized Gaussian function 1 0

  14. ⎛− ⎞ 2 1 x ⎜ ⎟ = Gaussian Profile Gaussian Profile ( ) exp G x ⎜ ⎟ σ σ σ π 2 ⎝ 2 ⎠ 2 pixel weight pixel position unrelated uncertain related uncertain unrelated pixels pixels pixels pixels pixels

  15. Spatial Parameter Spatial Parameter ( ) ∑ = − [ ] || || GB I G I input p q σ p q ∈ S q size of the window small σ large σ limited smoothing strong smoothing

  16. How to set σ How to set σ • Depends on the application. • Common strategy: proportional to image size – e.g. 2% of the image diagonal – property: independent of image resolution

  17. Properties of Gaussian Blur Properties of Gaussian Blur • Weights independent of spatial location – linear convolution – well-known operation – efficient computation (recursive algorithm, FFT…)

  18. Properties of Gaussian Blur Properties of Gaussian Blur input • Does smooth images • But smoothes too much: edges are blurred . – Only spatial distance matters output – No edge term ( ) ∑ = − [ ] || || GB I G I p q σ p q ∈ S space q

Recommend


More recommend