際際滷

際際滷Share a Scribd company logo
Linear Filtering
 About modifying pixels based on
neighborhood. Local methods simplest.
 Linear means linear combination of
neighbors. Linear methods simplest.
 Useful to:
 Integrate information over constant regions.
 Scale.
 Detect changes.
 Fourier analysis.
 Many nice slides taken from Bill Freeman.
(Freeman)
(Freeman)
Correlation
Examples on white board  1D
Examples -2D
For example, lets take a vector like:
(1 2 3 2 3 2 1), and filter it with a filter like (1/3 1/3 1/3)
Ignoring the ends for the moment, we get a result like:
2 2 1/3 2 2/3 2 1/3 2. We can also graph the results
and see that the original vector is smoothed out.
Boundaries
 Zeros
 Repeat values
 Cycle
 Produce shorter result
 Examples
Correlation





N
N
i
i
x
I
i
F
x
I
F )
(
)
(
)
(

 

 




N
N
j
N
N
i
j
y
i
x
I
j
i
F
y
x
I
F )
,
(
)
,
(
)
,
(

For this notation, we index F from N to N.
Convolution
 Like Correlation with Filter Reversed
 Associative






N
N
i
i
x
I
i
F
x
I
F )
(
)
(
)
(
 

 





N
N
j
N
N
i
j
y
i
x
I
j
i
F
y
x
I
F )
,
(
)
,
(
)
,
(
1D
2D
Some Examples
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering.ppt
Filtering to reduce noise
 Noise is what were not interested in.
 Well discuss simple, low-level noise today:
Light fluctuations; Sensor noise;
Quantization effects; Finite precision
 Not complex: shadows; extraneous
objects.
 A pixels neighborhood contains
information about its intensity.
 Averaging noise reduces its effect.
Additive noise
 I = S + N. Noise doesnt depend on
signal.
 Well consider:
d
distribute
y
identicall
,
for
t
independen
,
tic.
determinis
0
)
(
with
j
i
j
i
j
i
i
i
i
i
i
n
n
n
n
n
n
s
n
E
n
s
I
Average Filter
 Mask with positive
entries, that sum 1.
 Replaces each pixel
with an average of
its neighborhood.
 If all weights are
equal, it is called a
BOX filter.
1
1
1
1
1 1
1
1
1
F
1/9
(Camps)
Averaging Filter and noise
reduction
 Example: try executing:
k=1; figure(1); hist(sum((1/k)*rand(k,1000)))
for different values of k.
 The average of noise is smaller than one example.
 This is intuitive
 Can be proven in many cases (some technical conditions:
noise must be independent, many samples.)
 Actually true for many real examples: Gaussian noise,
flipping a coin many times
Filtering reduces noise if signal
stable
 Suppose I(i) = I+n(i), I(i+1) = I+n(i+1)
I(i+2) = I+n(i+2).
 Average of I(i), I(i+1), I(i+2) = I +
average of n(i), n(i+1), n(i+2).
 When there is no noise, averaging
smooths the signal.
 So in real life, averaging does both.
Example: Smoothing by
Averaging
Smoothing as Inference About
the Signal
+ =
Nearby points tell more about the
signal than distant ones.
Neighborhood for
averaging.
Gaussian Averaging
 Rotationally
symmetric.
 Weights nearby
pixels more than
distant ones.
 This makes sense
as probabalistic
inference.
 A Gaussian gives a
good model of a fuzzy
blob
An Isotropic Gaussian
 The picture shows a
smoothing kernel
proportional to
(which is a reasonable
model of a circularly
symmetric fuzzy
blob)
  




 

 2
2
2
0
2
exp
2
1
)
,
(



y
x
y
x
G
Smoothing with a Gaussian
The effects of smoothing
Each row shows smoothing
with gaussians of different
width; each column shows
different realizations of
an image of gaussian noise.
Efficient Implementation
 Both, the BOX filter and the Gaussian
filter are separable:
 First convolve each row with a 1D filter
 Then convolve each column with a 1D
filter.
Box Filter











































0
0
0
3
1
3
1
3
1
0
0
0
0
3
1
0
0
3
1
0
0
3
1
0
9
1
9
1
9
1
9
1
9
1
9
1
9
1
9
1
9
1
Gaussian Filter
    












 

 2
2
2
2
2
2
2
0
2
exp
2
exp
2
1
2
exp
2
1
)
,
(







y
x
y
x
y
x
G
Smoothing as Inference About
the Signal: Non-linear Filters.
+ =
Whats the best
neighborhood for
inference?
Filtering to reduce noise:
Lessons
 Noise reduction is probabilistic
inference.
 Depends on knowledge of signal and
noise.
 In practice, simplicity and efficiency
important.
Filtering and Signal
 Smoothing also smooths signal.
 Matlab
 Removes detail
 Matlab
 This is good and bad:
- Bad: cant remove noise w/out blurring
shape.
- Good: captures large scale structure;
allows subsampling.
Subsampling
Matlab
Ad

Recommended

Lec05 filter
Lec05 filter
BaliThorat1
Lecture04
Lecture04
zukun
Filtering in digital signal and image processing
Filtering in digital signal and image processing
Indra Hermawan
Computer Vision - Image Filters
Computer Vision - Image Filters
Yoss Cohen
Module 3 Computer Vision Image restoration and segmentation
Module 3 Computer Vision Image restoration and segmentation
Ramesh Wadawadagi
Image restoration and enhancement techniques
Image restoration and enhancement techniques
Priyadharsini R
Image noise &image_filteringin digital image processing
Image noise &image_filteringin digital image processing
Hazhar Ahmed
Lecture 2-Filtering.pdf
Lecture 2-Filtering.pdf
TechEvents1
Digital Image restoration
Digital Image restoration
Md Shabir Alam
imge enhncement sptil filtering55555.pptx
imge enhncement sptil filtering55555.pptx
projectsall
chapter5-2 restoration and depredations.ppt
chapter5-2 restoration and depredations.ppt
Iftikhar70
Unit3 dip
Unit3 dip
Imran Khan
Spatial filtering
Spatial filtering
shabanam tamboli
A Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image Filtering
PaperkutsBooks
Image Restoration and Reconstruction in Digital Image Processing
Image Restoration and Reconstruction in Digital Image Processing
Sadia Zafar
Noise filtering
Noise filtering
Alaa Ahmed
Image_filtering (1).pptx
Image_filtering (1).pptx
wdwd10
Spatial filtering
Spatial filtering
Sanyam Agarwal
DIP -Unit 3 ppt.pptx
DIP -Unit 3 ppt.pptx
1DA20CS085Nithyashre
2. filtering basics
2. filtering basics
Atul Kumar Jha
05_Spatial_Filtering.ppt
05_Spatial_Filtering.ppt
pawankamal3
Image denoising algorithms
Image denoising algorithms
Mohammad Sunny
Digital Image Processing UNIT-2.ppt
Digital Image Processing UNIT-2.ppt
durgakru
smoothing filters gaussion and median filters comparing.ppt
smoothing filters gaussion and median filters comparing.ppt
Ahmed R. A. Shamsan
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
Kalyan Acharjya
A SURVEY : On Image Denoising and its Various Techniques
A SURVEY : On Image Denoising and its Various Techniques
IRJET Journal
Module 31
Module 31
UllasSS1
Computer vision - images and image filtering
Computer vision - images and image filtering
Wael Badawy
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD

More Related Content

Similar to Filtering.ppt (20)

Digital Image restoration
Digital Image restoration
Md Shabir Alam
imge enhncement sptil filtering55555.pptx
imge enhncement sptil filtering55555.pptx
projectsall
chapter5-2 restoration and depredations.ppt
chapter5-2 restoration and depredations.ppt
Iftikhar70
Unit3 dip
Unit3 dip
Imran Khan
Spatial filtering
Spatial filtering
shabanam tamboli
A Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image Filtering
PaperkutsBooks
Image Restoration and Reconstruction in Digital Image Processing
Image Restoration and Reconstruction in Digital Image Processing
Sadia Zafar
Noise filtering
Noise filtering
Alaa Ahmed
Image_filtering (1).pptx
Image_filtering (1).pptx
wdwd10
Spatial filtering
Spatial filtering
Sanyam Agarwal
DIP -Unit 3 ppt.pptx
DIP -Unit 3 ppt.pptx
1DA20CS085Nithyashre
2. filtering basics
2. filtering basics
Atul Kumar Jha
05_Spatial_Filtering.ppt
05_Spatial_Filtering.ppt
pawankamal3
Image denoising algorithms
Image denoising algorithms
Mohammad Sunny
Digital Image Processing UNIT-2.ppt
Digital Image Processing UNIT-2.ppt
durgakru
smoothing filters gaussion and median filters comparing.ppt
smoothing filters gaussion and median filters comparing.ppt
Ahmed R. A. Shamsan
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
Kalyan Acharjya
A SURVEY : On Image Denoising and its Various Techniques
A SURVEY : On Image Denoising and its Various Techniques
IRJET Journal
Module 31
Module 31
UllasSS1
Computer vision - images and image filtering
Computer vision - images and image filtering
Wael Badawy
Digital Image restoration
Digital Image restoration
Md Shabir Alam
imge enhncement sptil filtering55555.pptx
imge enhncement sptil filtering55555.pptx
projectsall
chapter5-2 restoration and depredations.ppt
chapter5-2 restoration and depredations.ppt
Iftikhar70
A Presentation on various techniques used in Image Filtering
A Presentation on various techniques used in Image Filtering
PaperkutsBooks
Image Restoration and Reconstruction in Digital Image Processing
Image Restoration and Reconstruction in Digital Image Processing
Sadia Zafar
Noise filtering
Noise filtering
Alaa Ahmed
Image_filtering (1).pptx
Image_filtering (1).pptx
wdwd10
2. filtering basics
2. filtering basics
Atul Kumar Jha
05_Spatial_Filtering.ppt
05_Spatial_Filtering.ppt
pawankamal3
Image denoising algorithms
Image denoising algorithms
Mohammad Sunny
Digital Image Processing UNIT-2.ppt
Digital Image Processing UNIT-2.ppt
durgakru
smoothing filters gaussion and median filters comparing.ppt
smoothing filters gaussion and median filters comparing.ppt
Ahmed R. A. Shamsan
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
Kalyan Acharjya
A SURVEY : On Image Denoising and its Various Techniques
A SURVEY : On Image Denoising and its Various Techniques
IRJET Journal
Module 31
Module 31
UllasSS1
Computer vision - images and image filtering
Computer vision - images and image filtering
Wael Badawy

Recently uploaded (20)

Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
List View Components in Odoo 18 - Odoo 際際滷s
List View Components in Odoo 18 - Odoo 際際滷s
Celine George
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Celine George
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
KaryanaTantri21
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
List View Components in Odoo 18 - Odoo 際際滷s
List View Components in Odoo 18 - Odoo 際際滷s
Celine George
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Celine George
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
KaryanaTantri21
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
Ad

Filtering.ppt

  • 1. Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest. Useful to: Integrate information over constant regions. Scale. Detect changes. Fourier analysis. Many nice slides taken from Bill Freeman.
  • 4. Correlation Examples on white board 1D Examples -2D
  • 5. For example, lets take a vector like: (1 2 3 2 3 2 1), and filter it with a filter like (1/3 1/3 1/3) Ignoring the ends for the moment, we get a result like: 2 2 1/3 2 2/3 2 1/3 2. We can also graph the results and see that the original vector is smoothed out.
  • 6. Boundaries Zeros Repeat values Cycle Produce shorter result Examples
  • 7. Correlation N N i i x I i F x I F ) ( ) ( ) ( N N j N N i j y i x I j i F y x I F ) , ( ) , ( ) , ( For this notation, we index F from N to N.
  • 8. Convolution Like Correlation with Filter Reversed Associative N N i i x I i F x I F ) ( ) ( ) ( N N j N N i j y i x I j i F y x I F ) , ( ) , ( ) , ( 1D 2D
  • 24. Filtering to reduce noise Noise is what were not interested in. Well discuss simple, low-level noise today: Light fluctuations; Sensor noise; Quantization effects; Finite precision Not complex: shadows; extraneous objects. A pixels neighborhood contains information about its intensity. Averaging noise reduces its effect.
  • 25. Additive noise I = S + N. Noise doesnt depend on signal. Well consider: d distribute y identicall , for t independen , tic. determinis 0 ) ( with j i j i j i i i i i i n n n n n n s n E n s I
  • 26. Average Filter Mask with positive entries, that sum 1. Replaces each pixel with an average of its neighborhood. If all weights are equal, it is called a BOX filter. 1 1 1 1 1 1 1 1 1 F 1/9 (Camps)
  • 27. Averaging Filter and noise reduction Example: try executing: k=1; figure(1); hist(sum((1/k)*rand(k,1000))) for different values of k. The average of noise is smaller than one example. This is intuitive Can be proven in many cases (some technical conditions: noise must be independent, many samples.) Actually true for many real examples: Gaussian noise, flipping a coin many times
  • 28. Filtering reduces noise if signal stable Suppose I(i) = I+n(i), I(i+1) = I+n(i+1) I(i+2) = I+n(i+2). Average of I(i), I(i+1), I(i+2) = I + average of n(i), n(i+1), n(i+2). When there is no noise, averaging smooths the signal. So in real life, averaging does both.
  • 30. Smoothing as Inference About the Signal + = Nearby points tell more about the signal than distant ones. Neighborhood for averaging.
  • 31. Gaussian Averaging Rotationally symmetric. Weights nearby pixels more than distant ones. This makes sense as probabalistic inference. A Gaussian gives a good model of a fuzzy blob
  • 32. An Isotropic Gaussian The picture shows a smoothing kernel proportional to (which is a reasonable model of a circularly symmetric fuzzy blob) 2 2 2 0 2 exp 2 1 ) , ( y x y x G
  • 33. Smoothing with a Gaussian
  • 34. The effects of smoothing Each row shows smoothing with gaussians of different width; each column shows different realizations of an image of gaussian noise.
  • 35. Efficient Implementation Both, the BOX filter and the Gaussian filter are separable: First convolve each row with a 1D filter Then convolve each column with a 1D filter.
  • 37. Gaussian Filter 2 2 2 2 2 2 2 0 2 exp 2 exp 2 1 2 exp 2 1 ) , ( y x y x y x G
  • 38. Smoothing as Inference About the Signal: Non-linear Filters. + = Whats the best neighborhood for inference?
  • 39. Filtering to reduce noise: Lessons Noise reduction is probabilistic inference. Depends on knowledge of signal and noise. In practice, simplicity and efficiency important.
  • 40. Filtering and Signal Smoothing also smooths signal. Matlab Removes detail Matlab This is good and bad: - Bad: cant remove noise w/out blurring shape. - Good: captures large scale structure; allows subsampling.