Filtering vs Convolution 16-385 Computer Vision Filters we have - - PowerPoint PPT Presentation

filtering vs convolution
SMART_READER_LITE
LIVE PREVIEW

Filtering vs Convolution 16-385 Computer Vision Filters we have - - PowerPoint PPT Presentation

Filtering vs Convolution 16-385 Computer Vision Filters we have learned so far Gaussian filter The Box filter 1 2 1 1 1 1 1 1 2 4 2 1 1 1 9 16 1 2 1 1 1 1 Sobel filter Laplace filter 1 0 -1 0 1 0 2 0 -2


slide-1
SLIDE 1

Filtering vs Convolution

16-385 Computer Vision

slide-2
SLIDE 2

The ‘Box’ filter

1 1 1 1 1 1 1 1 1

Gaussian filter

1 2 1 2 4 2 1 2 1

1 16

Sobel filter

1

  • 1

2

  • 2

1

  • 1

1 1

  • 4

1 1

Laplace filter

1 9 Filters we have learned so far …

slide-3
SLIDE 3

Filtering vs Convolution

filtering convolution

What’s the difference?

h = g ⊗ f h = g f

filter image

  • utput

Credit: Steve Seitz

(cross-correlation)

h[m, n] = X

k,l

g[k, l]f[m + k, n + l]

h[m, n] = X

k,l

g[k, l]f[m − k, n − 1]

slide-4
SLIDE 4

Filtering vs Convolution

filtering convolution

filter flipped vertically and horizontally

h = g ⊗ f h = g f

filter image

  • utput

(cross-correlation)

h[m, n] = X

k,l

g[k, l]f[m + k, n + l]

h[m, n] = X

k,l

g[k, l]f[m − k, n − 1]

slide-5
SLIDE 5

Filtering vs Convolution

filtering convolution

filter flipped vertically and horizontally

h = g ⊗ f h = g f

filter image

  • utput

Suppose g is a Gaussian filter. How does convolution differ from filtering?

(cross-correlation)

1 2 1 2 4 2 1 2 1 1 16 Recall...

h[m, n] = X

k,l

g[k, l]f[m + k, n + l]

h[m, n] = X

k,l

g[k, l]f[m − k, n − 1]

slide-6
SLIDE 6

a b = b a . (((a b1) b2) b3) = a (b1 b2 b3) a ⇥ b = a ⇥ b = (a ⇥ b)

a (b + c) = (a b) + (a c) Commutative Associative Distributes over addition Scalars factor out Derivative Theorem of Convolution

slide-7
SLIDE 7

Derivative of Gaussian Input Output

Derivative Theorem of Convolution saved how many operations?

can precompute this

slide-8
SLIDE 8

Gaussian Output Input Smoothed input Derivative

Recall ...