Image Sub-Sampling and Pyramids
Image Sub-Sampling and Pyramids
Pyramids
Today
► Sub-Sampling
► Image Pyramids
► Applications of Pyramids
Source: S. Seitz
Image sub-sampling
1/8
1/4
Source: F. Durand
Wagon-wheel effect
► To avoid aliasing:
sampling rate ≥ 2 * max frequency in the image
► said another way: ≥ two samples per cycle
This minimum sampling rate is called the Nyquist rate Source: L. Zhang
Good and Bad Sampling
Good sampling:
•Sample often or,
•Sample wisely
Bad sampling:
•Aliasing!
Even worse for synthetic images
Aliasing
► When downsampling by a factor of two
Original image has frequencies that are too high
G 1/8
G 1/4
Gaussian 1/2
Source: S. Seitz
Upsampling
► This image is too small for this screen:
► How can we make it 10 times as big?
► Simplest approach:
repeat each row
and column 10 times
► (“Nearest neighbor
interpolation”)
Image interpolation
d = 1 in this
example
1 2 3 4 5
d = 1 in this
example
1 2 3 4 5
1 d = 1 in this
example
1 2 2.5 3 4 5
blur
F00
subsample blur
F11
subsample
FF22
…
F00* H F11* H
Gaussian pyramids
[Burt and Adelson, 1983]
Source: S. Seitz
Gaussian pyramids
[Burt and Adelson, 1983]
High resolution
Space Required for Pyramids
Constructing a pyramid by
taking every second pixel
leads to layers that badly
misrepresent the top layer
Decimation
Expansion
Interpolation Results
The Gaussian Pyramid
62
37
The Gaussian Pyramid
Low resolution G4 (G3 * gaussian) 2
blur down-sample
G3 (G2 * gaussian) 2
down-sam
blur ple
G2 (G1 * gaussian) 2
dow
n-sa
mple
blur
G1 (G0 * gaussian) 2
do
wn
-s
am
G0 Image
ple
blur
High resolution
Pyramids at Same Resolution
The Laplacian Pyramid
Li Gi expand(Gi 1 )
Gaussian Pyramid Gi Li expand(Gi 1 ) Laplacian Pyramid
Gn Ln Gn
expa
nd
G2 exp
and- = L2
G1 L1
ex
pa -
nd =
G0 L0
- =
Applications of Image Pyramids
53
Image Blending
Pyramid blending of Regions
Horror Photo
© prof. dmartin
Facial Feature Blending
61
Matlab resources for pyramids (with tutorial)
http://www.cns.nyu.edu/~eero/software.html
62
Why use these representations?
► Handle real-world size variations with a
constant-size vision algorithm.
► Remove noise
► Analyze texture
► Recognize objects
► Label image features
63
63
Acknowledgements
►I have planned and made this course material
from the courses taught by following
computer vision experts.
Steve Seitz, Washington University
Richard Szeliski, Microsoft Research
Noah Snavely, Cornell University
Sirinavasa Narasimhan, Carnegie Mellon University
Antonio Torralba, MIT
Michael Black, Brown University