SlideShare a Scribd company logo
1 of 31
A Gentle Introduction
to Bilateral Filtering
and its Applications
“Fixing the Gaussian Blur”:
the Bilateral Filter
Sylvain Paris – MIT CSAIL
Blur Comes from
Averaging across Edges
*
*
*
input output
Same Gaussian kernel everywhere.
Bilateral Filter
No Averaging across Edges
*
*
*
input output
The kernel shape depends on the image content.
[Aurich 95, Smith 97, Tomasi 98]
space weight
not new
range weight
I
new
normalization
factor
new
Bilateral Filter Definition:
an Additional Edge Term
   





S
I
I
I
G
G
W
I
BF
q
q
q
p
p
p q
p |
|
||
||
1
]
[ r
s 

Same idea: weighted average of pixels.
Illustration a 1D Image
• 1D image = line of pixels
• Better visualized as a plot
pixel
intensity
pixel position
space
Gaussian Blur and Bilateral Filter
space range
normalization
Gaussian blur
   





S
I
I
I
G
G
W
I
BF
q
q
q
p
p
p q
p |
|
||
||
1
]
[ r
s 

Bilateral filter
[Aurich 95, Smith 97, Tomasi 98]
space
space
range
p
p
q
q
 




S
I
G
I
GB
q
q
p q
p ||
||
]
[ 
q
p
Bilateral Filter on a Height Field
output input
   





S
I
I
I
G
G
W
I
BF
q
q
q
p
p
p q
p |
|
||
||
1
]
[ r
s 

p
reproduced
from [Durand 02]
Space and Range Parameters
• space s : spatial extent of the kernel, size of
the considered neighborhood.
• range r : “minimum” amplitude of an edge
   





S
I
I
I
G
G
W
I
BF
q
q
q
p
p
p q
p |
|
||
||
1
]
[ r
s 

Influence of Pixels
p
Only pixels close in space and in range are considered.
space
range
s = 2
s = 6
s = 18
r = 0.1 r = 0.25
r = 
(Gaussian blur)
input
Exploring the Parameter Space
s = 2
s = 6
s = 18
r = 0.1 r = 0.25
r = 
(Gaussian blur)
input
Varying the Range Parameter
input
r = 0.1
r = 0.25
r = 
(Gaussian blur)
s = 2
s = 6
s = 18
r = 0.1 r = 0.25
r = 
(Gaussian blur)
input
Varying the Space Parameter
input
s = 2
s = 6
s = 18
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
A Few
More Advanced
Remarks
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
Iterating the Bilateral Filter
• Generate more piecewise-flat images
• Often not needed in computational photo.
]
[ )
(
)
1
( n
n I
BF
I 

input
1 iteration
2 iterations
4 iterations
Bilateral Filtering Color Images
   





S
I
I
I
G
G
W
I
BF
q
q
q
p
p
p q
p |
|
||
||
1
]
[ r
s 

   





S
G
G
W
I
BF
q
q
q
p
p
p C
C
C
q
p ||
||
||
||
1
]
[ r
s 

For gray-level images
For color images
intensity difference
color difference
The bilateral filter is
extremely easy to adapt to your need.
scalar
3D vector
(RGB, Lab)
input
output
Hard to Compute
• Nonlinear
• Complex, spatially varying kernels
– Cannot be precomputed, no FFT…
• Brute-force implementation is slow > 10min
   





S
I
I
I
G
G
W
I
BF
q
q
q
p
p
p q
p |
|
||
||
1
]
[ r
s 

Questions?

More Related Content

Similar to A Gentle Introduction to Bilateral Filtering and its Applications: "Fixing the Gaussian Blur

image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptxNaveenKumar5162
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filteringDeepikaT13
 
Computer Vision - Image Filters
Computer Vision - Image FiltersComputer Vision - Image Filters
Computer Vision - Image FiltersYoss Cohen
 
03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatial03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatialElsayed Hemayed
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.pptAJAYMALIK97
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam tamboli
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptShabanamTamboli1
 
1536 graphics & graphical programming
1536 graphics & graphical  programming1536 graphics & graphical  programming
1536 graphics & graphical programmingDr Fereidoun Dejahang
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainA B Shinde
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIPbabak danyal
 

Similar to A Gentle Introduction to Bilateral Filtering and its Applications: "Fixing the Gaussian Blur (20)

Lect14 lines+circles
Lect14 lines+circlesLect14 lines+circles
Lect14 lines+circles
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptx
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
Computer Vision - Image Filters
Computer Vision - Image FiltersComputer Vision - Image Filters
Computer Vision - Image Filters
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
 
03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatial03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatial
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 
unit-3.ppt
unit-3.pptunit-3.ppt
unit-3.ppt
 
1536 graphics & graphical programming
1536 graphics & graphical  programming1536 graphics & graphical  programming
1536 graphics & graphical programming
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
Module 31
Module 31Module 31
Module 31
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
channel_mzhazbay.pdf
channel_mzhazbay.pdfchannel_mzhazbay.pdf
channel_mzhazbay.pdf
 

Recently uploaded

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

A Gentle Introduction to Bilateral Filtering and its Applications: "Fixing the Gaussian Blur

  • 1. A Gentle Introduction to Bilateral Filtering and its Applications “Fixing the Gaussian Blur”: the Bilateral Filter Sylvain Paris – MIT CSAIL
  • 2. Blur Comes from Averaging across Edges * * * input output Same Gaussian kernel everywhere.
  • 3. Bilateral Filter No Averaging across Edges * * * input output The kernel shape depends on the image content. [Aurich 95, Smith 97, Tomasi 98]
  • 4. space weight not new range weight I new normalization factor new Bilateral Filter Definition: an Additional Edge Term          S I I I G G W I BF q q q p p p q p | | || || 1 ] [ r s   Same idea: weighted average of pixels.
  • 5. Illustration a 1D Image • 1D image = line of pixels • Better visualized as a plot pixel intensity pixel position
  • 6. space Gaussian Blur and Bilateral Filter space range normalization Gaussian blur          S I I I G G W I BF q q q p p p q p | | || || 1 ] [ r s   Bilateral filter [Aurich 95, Smith 97, Tomasi 98] space space range p p q q       S I G I GB q q p q p || || ] [ 
  • 7. q p Bilateral Filter on a Height Field output input          S I I I G G W I BF q q q p p p q p | | || || 1 ] [ r s   p reproduced from [Durand 02]
  • 8. Space and Range Parameters • space s : spatial extent of the kernel, size of the considered neighborhood. • range r : “minimum” amplitude of an edge          S I I I G G W I BF q q q p p p q p | | || || 1 ] [ r s  
  • 9. Influence of Pixels p Only pixels close in space and in range are considered. space range
  • 10. s = 2 s = 6 s = 18 r = 0.1 r = 0.25 r =  (Gaussian blur) input Exploring the Parameter Space
  • 11. s = 2 s = 6 s = 18 r = 0.1 r = 0.25 r =  (Gaussian blur) input Varying the Range Parameter
  • 12. input
  • 16. s = 2 s = 6 s = 18 r = 0.1 r = 0.25 r =  (Gaussian blur) input Varying the Space Parameter
  • 17. input
  • 21. 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
  • 23. 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 • Generate more piecewise-flat images • Often not needed in computational photo. ] [ ) ( ) 1 ( n n I BF I  
  • 25. input
  • 29. Bilateral Filtering Color Images          S I I I G G W I BF q q q p p p q p | | || || 1 ] [ r s            S G G W I BF q q q p p p C C C q p || || || || 1 ] [ r s   For gray-level images For color images intensity difference color difference The bilateral filter is extremely easy to adapt to your need. scalar 3D vector (RGB, Lab) input output
  • 30. Hard to Compute • Nonlinear • Complex, spatially varying kernels – Cannot be precomputed, no FFT… • Brute-force implementation is slow > 10min          S I I I G G W I BF q q q p p p q p | | || || 1 ] [ r s  