Top Banner
Ted Adelson’s checkerboard illusion
62

Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Dec 16, 2015

Download

Documents

Antonia Knight
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Ted Adelson’s checkerboard illusion

Page 2: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Motion illusion, rotating snakes

Page 3: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Slides from Alexei Efros, Fei Fei Li, Steve Marschner, and others

Sampling and Reconstruction 2

CS 195g: Computational Photography

James Hays, Brown, Spring 2010

Page 4: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Detailed Recap of Wednesday

Page 5: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Slide credit Fei Fei Li

Page 6: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Slide credit Fei Fei Li

Page 7: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Slide credit Fei Fei Li

Page 8: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Slide credit Fei Fei Li

Page 9: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 10: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 11: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 12: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 13: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 14: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 15: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 16: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 17: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 18: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 19: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 20: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 21: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 22: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 23: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 24: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 25: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 26: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 27: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 28: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 29: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 30: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 31: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 32: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 33: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Page 34: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Image half-sizing

This image is too big tofit on the screen. Howcan we reduce it?

How to generate a half-sized version?

Page 35: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Image sub-sampling

Throw away every other row and

column to create a 1/2 size image- called image sub-sampling

1/4

1/8

Slide by Steve Seitz

Page 36: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Image sub-sampling

1/4 (2x zoom) 1/8 (4x zoom)

Aliasing! What do we do?

1/2

Slide by Steve Seitz

Page 37: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Gaussian (lowpass) pre-filtering

G 1/4

G 1/8

Gaussian 1/2

Solution: filter the image, then subsample• Filter size should double for each ½ size reduction. Why?

Slide by Steve Seitz

Page 38: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Subsampling with Gaussian pre-filtering

G 1/4 G 1/8Gaussian 1/2

Slide by Steve Seitz

Page 39: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Compare with...

1/4 (2x zoom) 1/8 (4x zoom)1/2

Slide by Steve Seitz

Page 40: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Gaussian (lowpass) pre-filtering

G 1/4

G 1/8

Gaussian 1/2

Solution: filter the image, then subsample• Filter size should double for each ½ size reduction. Why?• How can we speed this up? Slide by Steve Seitz

Page 41: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Image Pyramids

Known as a Gaussian Pyramid [Burt and Adelson, 1983]• In computer graphics, a mip map [Williams, 1983]• A precursor to wavelet transform

Slide by Steve Seitz

Page 42: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

A bar in the big images is a hair on the zebra’s nose; in smaller images, a stripe; in the smallest, the animal’s nose

Figure from David Forsyth

Page 43: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

What are they good for?

Improve Search• Search over translations

– Like project 1

– Classic coarse-to-fine strategy

• Search over scale– Template matching

– E.g. find a face at different scales

Pre-computation• Need to access image at different blur levels• Useful for texture mapping at different resolutions (called

mip-mapping)

Page 44: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

Gaussian pyramid construction

filter mask

Repeat• Filter• Subsample

Until minimum resolution reached • can specify desired number of levels (e.g., 3-level pyramid)

The whole pyramid is only 4/3 the size of the original image!Slide by Steve Seitz

Page 45: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 45

Continuous convolution: warm-up• Can apply sliding-window average to a continuous

function just as well– output is continuous– integration replaces summation

Page 46: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 46

Continuous convolution

• Sliding average expressed mathematically:

– note difference in normalization (only for box)

• Convolution just adds weights

– weighting is now by a function– weighted integral is like weighted average– again bounds are set by support of f(x)

Page 47: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 47

One more convolution

• Continuous–discrete convolution

– used for reconstruction and resampling

Page 48: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 48

Reconstruction

Page 49: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 49

Resampling

• Changing the sample rate– in images, this is enlarging and reducing

• Creating more samples:– increasing the sample rate– “upsampling”– “enlarging”

• Ending up with fewer samples:– decreasing the sample rate– “downsampling”– “reducing”

Page 50: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 50

Resampling

• Reconstruction creates a continuous function– forget its origins, go ahead and sample it

Page 51: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 51

Cont.–disc. convolution in 2D

• same convolution—just two variables now

– loop over nearby pixels, average using filter weight

– looks like discrete filter,but offsets are not integersand filter is continuous

– remember placement of filterrelative to grid is variable

Page 52: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 52

A gallery of filters

• Box filter– Simple and cheap

• Tent filter– Linear interpolation

• Gaussian filter– Very smooth antialiasing

filter

• B-spline cubic– Very smooth

Page 53: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 53

Box filter

Page 54: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 54

Page 55: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 55

Page 56: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 56

Page 57: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 57

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

Page 58: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 58

Properties of filters

• Degree of continuity

• Impulse response

• Interpolating or no

• Ringing, or overshoot

interpolating filter used for reconstruction

Page 59: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 59

Ringing, overshoot, ripples

• Overshoot– caused by

negative filtervalues

• Ripples– constant in,

non-const. out– ripple free when:

Page 60: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 60

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

Page 61: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 61

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

Page 62: Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.

© 2006 Steve Marschner • 62

Comparison: salt and pepper noise

Slide by Steve Seitz