Download presentation
Presentation is loading. Please wait.
1
Image Resampling & Interpolation
CS5670: Computer Vision Noah Snavely Image Resampling & Interpolation
2
Image Scaling This image is too big to fit on the screen. How can we generate a half-sized version? Source: S. Seitz
3
Image sub-sampling 1/8 1/4 Throw away every other row and column to create a 1/2 size image - called image sub-sampling Source: S. Seitz
4
Image sub-sampling 1/2 1/4 (2x zoom) 1/8 (4x zoom)
Why does this look so crufty? Source: S. Seitz
5
Image sub-sampling – another example
Source: F. Durand
6
Even worse for synthetic images
Source: L. Zhang
7
Aliasing Occurs when your sampling rate is not high enough to capture the amount of detail in your image Can give you the wrong signal/image—an alias To do sampling right, need to understand the structure of your signal/image Enter Monsieur Fourier… “But what is the Fourier Transform? A visual introduction.” 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
8
Wagon-wheel effect (See Source: L. Zhang
9
Nyquist limit – 2D example
Good sampling Bad sampling
10
Aliasing When downsampling by a factor of two How can we fix this?
Original image has frequencies that are too high How can we fix this?
11
Gaussian pre-filtering
Solution: filter the image, then subsample Source: S. Seitz
12
Subsampling with Gaussian pre-filtering
Solution: filter the image, then subsample Source: S. Seitz
13
Compare with... 1/2 1/4 (2x zoom) 1/8 (4x zoom) Source: S. Seitz
14
Gaussian pre-filtering
Solution: filter the image, then subsample F1 F2 … blur subsample blur subsample F0 H * F1 H *
15
{ … F0 F0 H * Gaussian pyramid F1 F1 H * F2 blur subsample blur
17
Gaussian pyramids [Burt and Adelson, 1983]
In computer graphics, a mip map [Williams, 1983] A precursor to wavelet transform Gaussian Pyramids have all sorts of applications in computer vision Source: S. Seitz
18
Gaussian pyramids [Burt and Adelson, 1983]
How much space does a Gaussian pyramid take compared to the original image? Source: S. Seitz
19
Gaussian Pyramid
20
Questions?
21
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”)
22
Image interpolation Recall that a digital images is formed as follows:
d = 1 in this example 1 2 3 4 5 Recall that a digital images is formed as follows: It is a discrete point-sampling of a continuous function If we could somehow reconstruct the original function, any new image could be generated, at any resolution and scale Adapted from: S. Seitz
23
Image interpolation Recall that a digital images is formed as follows:
d = 1 in this example 1 2 3 4 5 Recall that a digital images is formed as follows: It is a discrete point-sampling of a continuous function If we could somehow reconstruct the original function, any new image could be generated, at any resolution and scale Adapted from: S. Seitz
24
Image interpolation What if we don’t know ? Guess an approximation:
1 d = 1 in this example 1 2 2.5 3 4 5 What if we don’t know ? Guess an approximation: Can be done in a principled way: filtering Convert to a continuous function: Reconstruct by convolution with a reconstruction filter, h Adapted from: S. Seitz
25
Image interpolation “Ideal” reconstruction
Nearest-neighbor interpolation Linear interpolation Gaussian reconstruction Source: B. Curless
26
Reconstruction filters
What does the 2D version of this hat function look like? performs linear interpolation (tent function) performs bilinear interpolation Often implemented without cross-correlation E.g., Better filters give better resampled images Bicubic is common choice Cubic reconstruction filter
27
Image interpolation Original image: x 10
Nearest-neighbor interpolation Bilinear interpolation Bicubic interpolation
28
Image interpolation Also used for resampling
29
Raster-to-vector graphics
30
Depixelating Pixel Art
31
Modern methods From Romano, et al: RAISR: Rapid and Accurate Image Super Resolution,
32
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.