Lecture 4: Image pyramids PS1 due at midnight PS2 out, due next - - PowerPoint PPT Presentation

lecture 4 image pyramids ps1 due at midnight ps2 out due
SMART_READER_LITE
LIVE PREVIEW

Lecture 4: Image pyramids PS1 due at midnight PS2 out, due next - - PowerPoint PPT Presentation

Lecture 4: Image pyramids PS1 due at midnight PS2 out, due next Tues. No Thursday office hours this week If you're on the waitlist, submit your PS1 via email to the course staff. Today Image pyramids Texture We want


slide-1
SLIDE 1

Lecture 4: Image pyramids

slide-2
SLIDE 2
  • PS1 due at midnight
  • PS2 out, due next Tues.
  • No Thursday office hours this week
  • If you're on the waitlist, submit your PS1

via email to the course staff.

slide-3
SLIDE 3

Today

  • Image pyramids
  • Texture
slide-4
SLIDE 4

We want scale and translation invariance.

Source: Torralba, Freeman, Isola

slide-5
SLIDE 5

Image pyramids

Source: Torralba, Freeman, Isola

slide-6
SLIDE 6

Gaussian Pyramid

1/2 1/2 1/2 1/2

Source: Torralba, Freeman, Isola

slide-7
SLIDE 7

Subsampling and aliasing

1/2 1/2

Source: Torralba, Freeman, Isola

slide-8
SLIDE 8

Aliasing

Both waves fit the same samples. We “perceive” the red wave when the actual input was the blue wave.

Source: Torralba, Freeman, Isola

slide-9
SLIDE 9

The Gaussian pyramid

[1, 4, 6, 4, 1] [1, 4, 6, 4, 1] [1 4 6 4 1]

Source: Torralba, Freeman, Isola

For each level

  • 1. Blur input image with a Gaussian filter
slide-10
SLIDE 10

The Gaussian pyramid

For each level

  • 1. Blur input image with a Gaussian filter
  • 2. Downsample image

Source: Torralba, Freeman, Isola

slide-11
SLIDE 11

256×256 128×128 64×64 32×32

The Gaussian pyramid

2 2 2

Source: Torralba, Freeman, Isola

slide-12
SLIDE 12

512×512 256×256 128×128 64×64 32×32

The Gaussian pyramid

(original image)

Source: Torralba, Freeman, Isola

slide-13
SLIDE 13

The Gaussian pyramid

g0 g1 g2

g1 = G0g0

[1, 4, 6, 4, 1] [1, 4, 6, 4, 1]

Source: Torralba, Freeman, Isola

slide-14
SLIDE 14

The Gaussian pyramid

g0 g1 g2

g1 = G0g0

[1, 4, 6, 4, 1] [1, 4, 6, 4, 1]

Source: Torralba, Freeman, Isola

slide-15
SLIDE 15

The Gaussian pyramid

g0 g1 g2

g1 = G0g0

[1, 4, 6, 4, 1] [1, 4, 6, 4, 1]

g2 = G1g1 g2 = G1G0g0

g0 g2 g1

=

x

G0 G1G0 I

Source: Torralba, Freeman, Isola

slide-16
SLIDE 16

The Gaussian pyramid

For each level

  • 1. Blur input image with a Gaussian filter
  • 2. Downsample image

Source: Torralba, Freeman, Isola

slide-17
SLIDE 17

The Laplacian Pyramid

Compute the difference between upsampled Gaussian pyramid level k+1 and Gaussian pyramid level k. Recall that this approximates the blurred Laplacian.

+

  • Source: Torralba, Freeman, Isola
slide-18
SLIDE 18

The Laplacian Pyramid

Gaussian pyramid

Source: Torralba, Freeman, Isola

slide-19
SLIDE 19

The Laplacian Pyramid

Gaussian pyramid Laplacian pyramid

Source: Torralba, Freeman, Isola

slide-20
SLIDE 20

The Laplacian Pyramid

Blurring and downsampling: Upsampling and blurring: (blur) (Downsampling by 2)

Source: Torralba, Freeman, Isola

slide-21
SLIDE 21

Upsampling

= Insert zeros 64x64 128x128 128x128

Source: Torralba, Freeman, Isola

slide-22
SLIDE 22

The Laplacian Pyramid

Blurring and downsampling: Upsampling and blurring: (blur) (Downsampling by 2) (Upsampling by 2) (blur)

Source: Torralba, Freeman, Isola

slide-23
SLIDE 23

The Laplacian Pyramid

Gaussian pyramid Laplacian pyramid

l0 g2 l1

=

x

Source: Torralba, Freeman, Isola

slide-24
SLIDE 24

The Laplacian Pyramid

Gaussian residual Laplacian pyramid

Can we invert the 
 Laplacian Pyramid?

Source: Torralba, Freeman, Isola

slide-25
SLIDE 25

The Laplacian Pyramid

Gaussian pyramid Laplacian pyramid

Source: Torralba, Freeman, Isola

slide-26
SLIDE 26

The Laplacian Pyramid

Gaussian pyramid Laplacian pyramid

Analysis/Encoder Synthesis/Decoder

Source: Torralba, Freeman, Isola

slide-27
SLIDE 27

Laplacian pyramid applications

  • Texture synthesis
  • Image compression
  • Noise removal
  • Computing image features (e.g., SIFT)

Source: Torralba, Freeman, Isola

slide-28
SLIDE 28

Image Blending

Source: Torralba, Freeman, Isola

slide-29
SLIDE 29

Image Blending

Source: Torralba, Freeman, Isola

slide-30
SLIDE 30

Image Blending

IA IB m I I = m * IA + (1 − m) * IB

Source: Torralba, Freeman, Isola

slide-31
SLIDE 31

Image Blending with the Laplacian Pyramid

Source: Torralba, Freeman, Isola

slide-32
SLIDE 32

Image Blending with the Laplacian Pyramid

Source: Torralba, Freeman, Isola

slide-33
SLIDE 33

+ =

Simple blend With Laplacian pyr.

Source: A. Efros

slide-34
SLIDE 34

Photo credit: Chris Cameron

Source: A. Efros

slide-35
SLIDE 35

Image Blending (PS2 problem)

  • Build Laplacian pyramid for both images: LA, LB
  • Build Gaussian pyramid for mask: G
  • Build a combined Laplacian pyramid:
  • Collapse L to obtain the blended image

Source: Torralba, Freeman, Isola

slide-36
SLIDE 36

Image pyramids

Gaussian Pyr. Laplacian Pyr. And many more: steerable filters, wavelets, … convolutional networks!

Source: Torralba, Freeman, Isola

slide-37
SLIDE 37

Orientations

Source: Torralba, Freeman, Isola

slide-38
SLIDE 38

Steerable Pyramid

Source: Torralba, Freeman, Isola

Oriented gradient

slide-39
SLIDE 39

Linear Image Transforms

Fourier transform Gaussian pyr. Laplacian pyr. Steerable pyr.

Source: Torralba, Freeman, Isola

slide-40
SLIDE 40

Source: Torralba, Freeman, Isola

slide-41
SLIDE 41

Texture

Stationary Stochastic

Source: Torralba, Freeman, Isola

slide-42
SLIDE 42

Texture analysis

What we’d like: are they made of the same “stuff”. Are these textures similar?

True (infinite) texture Analysis “Same” or “different”

Source: A. Efros

slide-43
SLIDE 43

Human vision is sensitive to the difference of some types of elements and appears to be “numb” on other types of differences.

Béla Julesz

How do humans analyze texture?

Source: A. Efros

slide-44
SLIDE 44

Pre-attentive texture discrimination

Bela Julesz, "Textons, the Elements of Texture Perception, and their Interactions". Nature 290: 91-97. March, 1981.

Source: Torralba, Freeman, Isola

slide-45
SLIDE 45

Pre-attentive texture discrimination

Bela Julesz, "Textons, the Elements of Texture Perception, and their Interactions". Nature 290: 91-97. March, 1981.

Source: Torralba, Freeman, Isola

slide-46
SLIDE 46

Pre-attentive texture discrimination

Bela Julesz, "Textons, the Elements of Texture Perception, and their Interactions". Nature 290: 91-97. March, 1981.

This texture pair is pre-attentively indistinguishable. Why?

Source: A. Efros

slide-47
SLIDE 47

Search Experiment I

The subject is told to detect a target element in a number of background elements. In this example, the detection time is independent of the number of background elements.

Source: A. Efros

slide-48
SLIDE 48

Search Experiment II

Here detection time is proportional to the number of background elements, and thus suggests that the subject is doing element-by-element scrutiny.

Source: A. Efros

slide-49
SLIDE 49

Heuristic

Julesz then conjectured the following: Human vision operates in two distinct modes:

  • 1. Preattentive vision

parallel, instantaneous (~100--200ms), without scrutiny, independent of the number of patterns, covering a large visual field.

  • 2. Attentive vision

serial search by focal attention in 50ms steps limited to small aperture.

Source: A. Efros

slide-50
SLIDE 50

Julesz Conjecture

Textures cannot be spontaneously discriminated if they have the same first-order and second-order statistics and differ only in their third-order or higher-order statistics. (later proved wrong)

Source: A. Efros

slide-51
SLIDE 51

1st order statistics differ

5% white 20% white

Source: A. Efros

slide-52
SLIDE 52

2nd order statistics differ

10% white

Source: A. Efros

slide-53
SLIDE 53

How can we represent texture in natural images?

  • Idea 1: Record simple statistics (e.g., mean, std.) of absolute

filter responses

Source: A. Efros

slide-54
SLIDE 54

Can you match the texture to the response?

Mean abs. responses

Filters A B C 1 2 3

Source: A. Efros

slide-55
SLIDE 55

How can we represent texture in natural images?

  • Generalize this to “orientation histogram”
  • Idea 2: Marginal histograms of filter responses
  • One histogram per filter

Source: A. Efros

slide-56
SLIDE 56

Steerable filter decomposition

Filter bank Input image

Source: A. Efros

slide-57
SLIDE 57

Filter response histograms

Source: A. Efros

slide-58
SLIDE 58

Texture synthesis

Start with a noise image as output. Main loop:

  • Match pixel histogram of output image to input
  • Decompose input/output images using a Steerable Pyramid
  • Match subband histograms of input and output pyramids
  • Reconstruct input and output images (collapse the pyramids)

Heeger, Bergen, Pyramid-based texture analysis/synthesis, SIGGRAPH 1995

Source: A. Efros

slide-59
SLIDE 59

Source: A. Efros

slide-60
SLIDE 60

Source: A. Efros

slide-61
SLIDE 61

Source: A. Efros

slide-62
SLIDE 62