18CSE390T
Computer Vision
U1 - S4 - SLO-1 - Sampling and Aliasing
Gaussian Pyramids
• Very useful for representing images
• Image Pyramid is built by using multiple copies of image at different
scales.
• Each level in the pyramid is ¼ of the size of previous level
• The highest level is of the highest resolution
• The lowest level is of the lowest resolution
Gaussian Pyramids
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
Convolution
0 0 0
* 0 1 0
0 0 0
Convolution
0 0 0
* 0 0 1
0 0 0
Sampling
• 1 Dimensional:
• Sampling in 1D takes a continuous function and replaces it with a vector of
values, consisting of the function’s values at a set of sample points.
• We’ll assume that these sample points are on a regular grid, and can place one
at each integer for convenience.
Sampling
• 2 Dimensional:
• Sampling in 2D does the same thing, only in 2D.
• We’ll assume that these sample points are on a regular grid, and can place one
at each integer point for convenience.
Fourier Transform
Nyquist Theorem
• In order for a band-limited (i.e., one with a zero power spectrum for
frequencies f > B) baseband ( f > 0) signal to be reconstructed fully, it
must be sampled at a rate f 2B.
• A signal sampled at f = 2B is said to be Nyquist sampled, and f =2B is
called the Nyquist frequency.
• No information is lost if a signal is sampled at the Nyquist frequency,
and no additional information is gained by sampling faster than this
rate.
Smoothing as low-pass filtering
• The message of the NT is that high frequencies lead to trouble with
sampling.
• Solution: suppress high frequencies before sampling. multiply the FT
of the signal with something that suppresses high frequencies or
convolve with a low-pass filter
• A filter whose FT is a box is bad, because the filter kernel has infinite support
• Common solution: use a Gaussian
• multiplying FT by Gaussian is equivalent to convolving image with Gaussian.
Sampling without smoothing
• Top row shows the images, sampled at every second pixel to get the
next;
• Bottom row shows the magnitude spectrum of these images.
Gaussian filtering
G x, y
1
exp
x2 y2
2 2
2 2
H i, j
1
exp
i k 12 j k 12
2 2
2 2
where H i, j is 2k 1 2k 1 array
Sampling with smoothing
• Top row shows the images. We get the next image by smoothing the
image with a Gaussian with sigma 1 pixel, then sampling at every
second pixel to get the next
• Bottom row shows the magnitude spectrum of these images.
Sampling with smoothing
• Top row shows the images. We get the next image by smoothing the
image with a Gaussian with sigma 1.4 pixels, then sampling at every
second pixel to get the next
• Bottom row shows the magnitude spectrum of these images.