Given a camera and a still scene, how can you reduce noise, what about near the edge, why is separability useful in practice,. To help you understand more about this issue, invite you to consult the lecture content "Linear filtering". Hope this is useful references for you. | Linear filtering Motivation: Noise reduction Given a camera and a still scene, how can you reduce noise? Take lots of images and average them! What’s the next best thing? Source: S. Seitz Answer: take lots of images, average them Let’s replace each pixel with a weighted average of its neighborhood The weights are called the filter kernel What are the weights for the average of a 3x3 neighborhood? Moving average 1 1 1 1 1 1 1 1 1 “box filter” Source: D. Lowe Defining convolution f Let f be the image and g be the kernel. The output of convolving f with g is denoted f * g. Source: F. Durand Convention: kernel is “flipped” MATLAB: conv2 vs. filter2 (also imfilter) Key properties Linearity: filter(f1 + f2 ) = filter(f1) + filter(f2) Shift invariance: same behavior regardless of pixel location: filter(shift(f)) = shift(filter(f)) Theoretical result: any linear shift-invariant operator can be represented as a convolution Properties in more detail Commutative: a * b = b * a Conceptually no difference between filter and signal Associative: a * (b * c) = (a * b) * c Often apply several filters one after another: (((a * b1) * b2) * b3) This is equivalent to applying one filter: a * (b1 * b2 * b3) Distributes over addition: a * (b + c) = (a * b) + (a * c) Scalars factor out: ka * b = a * kb = k (a * b) Identity: unit impulse e = [ , 0, 0, 1, 0, 0, ], a * e = a Annoying details 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 Annoying details 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 Annoying details What about near the edge? the filter window falls off the edge of the image need to . | Linear filtering Motivation: Noise reduction Given a camera and a still scene, how can you reduce noise? Take lots of images and average them! What’s the next best thing? Source: S. Seitz Answer: take lots of images, average them Let’s replace each pixel with a weighted average of its neighborhood The weights are called the filter kernel What are the weights for the average of a 3x3 neighborhood? Moving average 1 1 1 1 1 1 1 1 1 “box filter” Source: D. Lowe Defining convolution f Let f be the image and g be the kernel. The output of convolving f with g is denoted f * g. Source: F. Durand Convention: kernel is “flipped” MATLAB: conv2 vs. filter2 (also imfilter) Key properties Linearity: filter(f1 + f2 ) = filter(f1) + filter(f2) Shift invariance: same behavior regardless of pixel location: filter(shift(f)) = shift(filter(f)) Theoretical result: any linear shift-invariant operator can be represented as a convolution Properties in more detail Commutative: a * b = b *