Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image...
Transcript of Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image...
![Page 1: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/1.jpg)
Prof. Dr. Anderson Rocha
Microsoft Research Faculty Fellow Affiliate Member, Brazilian Academy of Sciences
Reasoning for Complex Data (Recod) Lab. Institute of Computing, University of Campinas (Unicamp)
Campinas, SP, Brazil
[email protected] http://www.ic.unicamp.br/~rocha
MC851 - Projetos em Computação Visão Computacional
Aula #4
![Page 2: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/2.jpg)
Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James Hayes, Derek Hoiem, Alexei Efros, Steve Seitz, David Forsyth and many others. Many thanks to all of these authors.
Reading: Szeliski, Chapter 3, Secs. 3.2
![Page 3: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/3.jpg)
Filtering
• Image filters in spa0al domain – Filter is a mathema0cal opera0on of a grid of numbers
– Smoothing, sharpening, measuring texture
• Templates and Image Pyramids – Filtering is a way to match a template to the image
– Detec0on, coarse-‐to-‐fine registra0on
![Page 4: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/4.jpg)
Image filtering
• Image filtering: compute func0on of local neighborhood at each posi0on
• Really important! – Enhance images
• Denoise, resize, increase contrast, etc. – Extract informa0on from images
• Texture, edges, dis0nc0ve points, etc. – Detect paHerns
• Template matching
![Page 5: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/5.jpg)
1 1 1
1 1 1
1 1 1
Slide credit: David Lowe (UBC)
],[g ⋅⋅
Example: box filter
![Page 6: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/6.jpg)
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Credit: S. Seitz
],[],[],[,
lnkmflkgnmhlk
++=∑
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
![Page 7: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/7.jpg)
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 10
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
Credit: S. Seitz
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 8: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/8.jpg)
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 10 20
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
Credit: S. Seitz
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 9: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/9.jpg)
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 10 20 30
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
Credit: S. Seitz
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 10: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/10.jpg)
0 10 20 30 30
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
Credit: S. Seitz
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 11: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/11.jpg)
0 10 20 30 30
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
Credit: S. Seitz
?
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 12: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/12.jpg)
0 10 20 30 30
50
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1
1 1 1
1 1 1
],[g ⋅⋅
Credit: S. Seitz
?
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 13: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/13.jpg)
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 10 20 30 30 30 20 10
0 20 40 60 60 60 40 20
0 30 60 90 90 90 60 30
0 30 50 80 80 90 60 30
0 30 50 80 80 90 60 30
0 20 30 50 50 60 40 20
10 20 30 30 30 30 20 10
10 10 10 0 0 0 0 0
[.,.]h[.,.]f
Image filtering 1 1 1 1 1 1 1 1 1 ],[g ⋅⋅
Credit: S. Seitz
],[],[],[,
lnkmflkgnmhlk
++=∑
![Page 14: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/14.jpg)
What does it do? • Replaces each pixel with
an average of its neighborhood
• Achieve smoothing effect (remove sharp features)
1 1 1
1 1 1
1 1 1
Slide credit: David Lowe (UBC)
],[g ⋅⋅
Box Filter
![Page 15: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/15.jpg)
Smoothing with box filter
![Page 16: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/16.jpg)
One more on board…
![Page 17: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/17.jpg)
Prac0ce with linear filters
0 0 0
0 1 0
0 0 0
Original
?
Source: D. Lowe
![Page 18: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/18.jpg)
Prac0ce with linear filters
0 0 0
0 1 0
0 0 0
Original Filtered (no change)
Source: D. Lowe
![Page 19: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/19.jpg)
Prac0ce with linear filters
0 0 0
1 0 0
0 0 0
Original
?
Source: D. Lowe
![Page 20: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/20.jpg)
Prac0ce with linear filters
0 0 0
1 0 0
0 0 0
Original Shifted left By 1 pixel
Source: D. Lowe
![Page 21: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/21.jpg)
Prac0ce with linear filters
Original
1 1 1 1 1 1 1 1 1
0 0 0 0 2 0 0 0 0 - ?
(Note that filter sums to 1)
Source: D. Lowe
![Page 22: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/22.jpg)
Prac0ce with linear filters
Original
1 1 1 1 1 1 1 1 1
0 0 0 0 2 0 0 0 0 -
Sharpening filter - Accentuates differences with local average
Source: D. Lowe
![Page 23: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/23.jpg)
Sharpening
Source: D. Lowe
![Page 24: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/24.jpg)
Other filters
-1 0 1
-2 0 2
-1 0 1
Vertical Edge (absolute value)
Sobel
![Page 25: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/25.jpg)
Other filters
-1 -2 -1
0 0 0
1 2 1
Horizontal Edge (absolute value)
Sobel
![Page 26: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/26.jpg)
• Weight contribu0ons of neighboring pixels by nearness
0.003 0.013 0.022 0.013 0.003 0.013 0.059 0.097 0.059 0.013 0.022 0.097 0.159 0.097 0.022 0.013 0.059 0.097 0.059 0.013 0.003 0.013 0.022 0.013 0.003
5 x 5, σ = 1
Slide credit: Christopher Rasmussen
Important filter: Gaussian
![Page 27: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/27.jpg)
Smoothing with Gaussian filter
![Page 28: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/28.jpg)
Smoothing with box filter
![Page 29: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/29.jpg)
Gaussian filters • Remove “high-‐frequency” components from the image (low-‐pass filter) – Images become smoother
• Convolu0on with self is another Gaussian – So can smooth with small-‐width kernel, repeat, and get same result as larger-‐width kernel would have
– Convolving two 0mes with Gaussian kernel of width σ is same as convolving once with kernel of width
• Separable kernel – Factors into product of two 1D Gaussians
Source: K. Grauman
�p2
![Page 30: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/30.jpg)
How big should the filter be? • Values at edges should be near zero • Rule of thumb for Gaussian: set filter half-‐width to about 3 σ
Prac0cal maHers
![Page 31: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/31.jpg)
Prac0cal maHers • What about near the edge?
– the filter window falls off the edge of the image – need to extrapolate – methods:
• clip filter (black) • wrap around • copy edge • reflect across edge
Source: S. Marschner
![Page 32: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/32.jpg)
Prac0cal maHers
– methods (MATLAB): • clip filter (black): imfilter(f, g, 0) • wrap around: imfilter(f, g, ‘circular’) • copy edge: imfilter(f, g, ‘replicate’) • reflect across edge: imfilter(f, g, ‘symmetric’)
Source: S. Marschner
Q?
![Page 33: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/33.jpg)
Prac0cal maHers • What is the size of the output? • MATLAB: filter2(g, f, shape)
– shape = ‘full’: output size is sum of sizes of f and g – shape = ‘same’: output size is same as f – shape = ‘valid’: output size is difference of sizes of f and g
f
g g
g g
f
g g
g g
f
g g
g g
full same valid
Source: S. Lazebnik
![Page 34: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/34.jpg)
Class Implementa0on Gaussian Filter!
Laplacian Filter!
A. Oliva, A. Torralba, P.G. Schyns, “Hybrid Images,” SIGGRAPH 2006
Gaussian unit impulse Laplacian of Gaussian
![Page 35: Prof. Dr. Anderson Rocharocha/teaching/2013s1/mc851/aulas/20… · Aula #4. Pixels and Image Filters This lecture slides were made based on slides of several researchers such as James](https://reader035.fdocumentos.tips/reader035/viewer/2022081402/605acff604cfc322b208296b/html5/thumbnails/35.jpg)
Take-‐home messages • Image is a matrix of numbers
• Linear filtering is sum of dot product at each posi0on – Can smooth, sharpen, translate (among many other uses)
• Be aware of details for filter size, extrapola0on, cropping
1 1 1
1 1 1
1 1 1
0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.99
0.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.91
0.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.92
0.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.95
0.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.85
0.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.33
0.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.74
0.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.93
0.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.99
0.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.97
0.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93
=