Presentation is loading. Please wait.

Presentation is loading. Please wait.

Recap from Wednesday Spectra and Color Light capture in cameras and humans.

Similar presentations


Presentation on theme: "Recap from Wednesday Spectra and Color Light capture in cameras and humans."— Presentation transcript:

1 Recap from Wednesday Spectra and Color Light capture in cameras and humans

2 Ted Adelson’s checkerboard illusion

3 Motion illusion, rotating snakes

4 Sampling and Reconstruction
Most slides from James Hays, Alexei Efros and Steve Marschner

5 Sampling and Reconstruction

6 Sampled representations
How to store and compute with continuous functions? Common scheme for representation: samples write down the function’s values at many points [FvDFH fig.14.14b / Wolberg] © 2006 Steve Marschner • 6

7 Reconstruction Making samples back into a continuous function
for output (need realizable method) for analysis or processing (need mathematical method) amounts to “guessing” what the function did in between [FvDFH fig.14.14b / Wolberg] © 2006 Steve Marschner • 7

8 Aliasing in video https://www.youtube.com/watch?v=b_qJPmcNDVQ
Slide by Steve Seitz

9 Aliasing in images

10 What’s happening? Input signal: Plot as image:
x = 0:.05:5; imagesc(sin((2.^x).*x)) Alias! Not enough samples

11 Local Average in 2D What are the weights H? 90
90 ones, divide by 9. Note --- this averaging can take place at different places in the optical path: Light could be a little bit blurred as it comes in. The light sensor integrates over a region, it isn’t a point sample. © 2006 Steve Marschner • 11 Slide by Steve Seitz

12 Image filtering Let’s write this down as an equation. Assume the averaging window is (2k+1)x(2k+1): We can generalize this idea by allowing different weights for different neighboring pixels: This is called a cross-correlation operation and written: H is called the “filter,” “kernel,” or “mask.” © 2006 Steve Marschner • 12 Slide by Steve Seitz

13 Gaussian filtering A Gaussian kernel gives less weight to pixels further from the center of the window 90 1 2 4 Slide by Steve Seitz

14 Mean vs. Gaussian filtering
Slide by Steve Seitz

15 Convolution cross-correlation:
A convolution operation is a cross-correlation where the filter is flipped both horizontally and vertically before being applied to the image: It is written: Suppose H is a Gaussian or mean kernel. How does convolution differ from cross-correlation? Slide by Steve Seitz

16 Convolution is nice! Notation:
Convolution is a multiplication-like operation commutative associative distributes over addition scalars factor out identity: unit impulse e = […, 0, 0, 1, 0, 0, …] Conceptually no distinction between filter and signal Usefulness of associativity often apply several filters one after another: (((a * b1) * b2) * b3) this is equivalent to applying one filter: a * (b1 * b2 * b3) © 2006 Steve Marschner • 16

17 Filter’s let you extract useful building blocks!
Slide credit Fei Fei Li

18 Slide credit Fei Fei Li

19 Slide credit Fei Fei Li

20 Some matlab demos…

21

22

23

24

25

26

27

28

29

30

31

32

33 1.66 10.66 -2.6 -0.33

34

35

36

37

38

39

40

41

42

43

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

45 Box filter © 2006 Steve Marschner • 53

46 © 2006 Steve Marschner • 54

47 © 2006 Steve Marschner • 55

48 © 2006 Steve Marschner • 56

49 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 • 60

50 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? Better at salt’n’pepper noise Not convolution: try a region with 1’s and a 2, and then 1’s and a 3 © 2006 Steve Marschner • 61 Slide by Steve Seitz

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

52 © 2006 Steve Marschner • 63

53 © 2006 Steve Marschner • 64

54 © 2006 Steve Marschner • 65

55 © 2006 Steve Marschner • 66

56 © 2006 Steve Marschner • 67

57 © 2006 Steve Marschner • 68


Download ppt "Recap from Wednesday Spectra and Color Light capture in cameras and humans."

Similar presentations


Ads by Google