filtering vs convolution
play

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


  1. Filtering vs Convolution 16-385 Computer Vision

  2. 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 1 -4 1 0 1 0 1 0 -1

  3. Filtering vs Convolution output filter image filtering X h = g ⊗ f h [ m, n ] = g [ k, l ] f [ m + k, n + l ] (cross-correlation) k,l What’s the difference? X h [ m, n ] = g [ k, l ] f [ m − k, n − 1] convolution h = g � f k,l Credit: Steve Seitz

  4. Filtering vs Convolution output filter image filtering X h = g ⊗ f h [ m, n ] = g [ k, l ] f [ m + k, n + l ] (cross-correlation) k,l filter flipped vertically and horizontally X h [ m, n ] = g [ k, l ] f [ m − k, n − 1] convolution h = g � f k,l

  5. Filtering vs Convolution output filter image filtering X h = g ⊗ f h [ m, n ] = g [ k, l ] f [ m + k, n + l ] (cross-correlation) k,l filter flipped vertically and horizontally X h [ m, n ] = g [ k, l ] f [ m − k, n − 1] convolution h = g � f k,l Recall... Suppose g is a Gaussian filter. 1 2 1 How does convolution differ from filtering? 1 2 4 2 16 1 2 1

  6. Commutative a � b = b � a . Associative ((( a � b 1 ) � b 2 ) � b 3 ) = a � ( b 1 � b 2 � b 3 ) Distributes over addition a � ( b + c ) = ( a � b ) + ( a � c ) Scalars factor out � a ⇥ b = a ⇥ � b = � ( a ⇥ b ) Derivative Theorem of Convolution

  7. can precompute this Derivative Theorem of Convolution Input saved how many operations? Derivative of Gaussian Output

  8. Recall ... Input Gaussian Smoothed input Derivative Output

Recommend


More recommend