Recap of Friday Sampling and Reconstruction Aliasing and

  • Slides: 41
Download presentation
Recap of Friday Sampling and Reconstruction Aliasing and how to prevent it (blur /

Recap of Friday Sampling and Reconstruction Aliasing and how to prevent it (blur / low pass filters) Linear filtering and convolution

Linear Filtering (See Szeliski 3. 2) Slides from Alexei Efros, Fei Li, Steve Marschner,

Linear Filtering (See Szeliski 3. 2) Slides from Alexei Efros, Fei Li, Steve Marschner, and others CS 129: Computational Photography James Hays, Brown, Spring 2011

Slide credit Fei Li

Slide credit Fei Li

Slide credit Fei Li

Slide credit Fei Li

Slide credit Fei Li

Slide credit Fei Li

Slide credit Fei Li

Slide credit Fei Li

1. 66 -0. 33 10. 66 -2. 6

1. 66 -0. 33 10. 66 -2. 6

A gallery of filters • Box filter – Simple and cheap • Tent filter

A gallery of filters • Box filter – Simple and cheap • Tent filter – Linear interpolation • Gaussian filter – Very smooth antialiasing filter • B-spline cubic – Very smooth © 2006 Steve Marschner • 39

Box filter © 2006 Steve Marschner • 40

Box filter © 2006 Steve Marschner • 40

© 2006 Steve Marschner • 41

© 2006 Steve Marschner • 41

© 2006 Steve Marschner • 42

© 2006 Steve Marschner • 42

© 2006 Steve Marschner • 43

© 2006 Steve Marschner • 43

Effects of reconstruction filters • For some filters, the reconstruction process winds up implementing

Effects of reconstruction filters • For some filters, the reconstruction process winds up implementing a simple algorithm • Box filter (radius 0. 5): nearest neighbor sampling – box always catches exactly one input point – it is the input point nearest the output point – so output[i, j] = input[round(x(i)), round(y(j))] x(i) computes the position of the output coordinate i on the input grid • Tent filter (radius 1): linear interpolation – tent catches exactly 2 input points – weights are a and (1 – a) – result is straight-line interpolation from one point to the next © 2006 Steve Marschner • 44

Properties of filters • Degree of continuity • Impulse response • Interpolating or no

Properties of filters • Degree of continuity • Impulse response • Interpolating or no • Ringing, or overshoot interpolating filter used for reconstruction © 2006 Steve Marschner • 45

Ringing, overshoot, ripples • Overshoot – caused by negative filter values • Ripples –

Ringing, overshoot, ripples • Overshoot – caused by negative filter values • Ripples – constant in, non-const. out – ripple free when: © 2006 Steve Marschner • 46

Yucky details • What about near the edge? – the filter window falls off

Yucky 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 vary filter near edge © 2006 Steve Marschner • 47

Median filters • A Median Filter operates over a window by selecting the median

Median filters • A Median Filter operates over a window by selecting the median intensity in the window. • What advantage does a median filter have over a mean filter? • Is a median filter a kind of convolution? Slide by Steve Seitz © 2006 Steve Marschner • 48

Comparison: salt and pepper noise Slide by Steve Seitz © 2006 Steve Marschner •

Comparison: salt and pepper noise Slide by Steve Seitz © 2006 Steve Marschner • 49