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 -4 1 0 1 0 1 0 -1
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
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
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
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
can precompute this Derivative Theorem of Convolution Input saved how many operations? Derivative of Gaussian Output
Recall ... Input Gaussian Smoothed input Derivative Output
Recommend
More recommend