You are on page 1of 16

12.

1, 10/04/13

▪ Introduction
▪ Nearest Neighbor
▪ Bilinear Interpolation
▪ Bicubic Interpolation

IMAGE RESAMPLING

2/3/2020 1:12 PM Image Resampling, SHM 1


Introduction
Digital image are made in a (distorted) grid pattern (integer row
and column locations), with each grid cell or pixel containing a
digital number (DN) representing the lightness or darkness at its
corresponding ground location.
• When a digital image is acquired, no attempt is made to have the
pixels line up with any particular map projection coordinates.
• It is therefore necessary to perform resampling to obtain a digital
sample at an intermediate (i.e., fractional) row, column location.
• Resampling involves interpolation between existing pixels (DNs) to
synthesize pixels that correspond to fractional locations.
• Determination of the appropriate fractional locations is often result
of a coordinate transformation.

2/3/2020 1:12 PM Image Resampling, SHM 2


Techniques for Image Resampling
There are several techniques available for resampling digital
images, although three particular ones are by far, most preva-
lent.
▪ They are known as
• nearest-neighbor interpolation,
• bilinear interpolation, and
• bicubic interpolation.

▪ Other, more computationally intensive techniques are generally not


employed since they tend to be sensitive to sensor noise which
exists in digital imagery.

2/3/2020 1:12 PM Image Resampling, SHM 3


Nearest-neighbor
∙ ∙ ∙ ∙ interpolation

∙ ∙ ∙ ∙
Visualization of

∙ ∙ ∙ ∙
Techniques for Image
∙ ∙ ∙ ∙ Resampling
Bilinear
∙ ∙ ∙ ∙ interpolation ∙ ∙ ∙ ∙

∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙

∙ ∙
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙

∙ ∙ ∙ ∙ Bicubic ∙ ∙ ∙ ∙
interpolation
2/3/2020 1:12 PM Image Resampling, SHM 4
Nearest Neighbor
The DN chosen will be that of the image pixel whose center is
closest to the center of the grid cell.
• From a computational standpoint, all that is required is to round off
the fractional row and column values to the nearest integer value.

A pixel is superimposed at a
fractional location (R = 619.71,
C = 493.39).
Rounding these values to the
nearest integer yields 620 and
493 for the row and column
indices.
The resampled value is 56.

2/3/2020 1:12 PM Image Resampling, SHM 5


Bilinear Interpolation
The four surrounding pixels are selected, and linear interpolati-
on is performed in two directions (row wise, and then column
wise).
First, linearly interpolated values
DN1 and DN2 are computed along
rows 619 and 620, respectively.
DN1 = 0.39(68 - 62) + 62 = 64.34
DN2 = 0.39(59 – 56) + 56 = 57.17 R = 619.71,
C = 493.39
Second, a linear interpolation is
performed in the column directi-
on, yielding the result (DN) as
Finally, since DNs are generally integers,
DN = 0.71(57.17 – 64.34) + 64.34
the value of DN is rounded to 59.
= 59.25 • The value differs from the DN value of 56
obtained by using the nearest-neighbor method.

2/3/2020 1:12 PM Image Resampling, SHM 6


Results of
Nearest Neighbor Resampling vs
Bilinear Interpolation

Analysis ?
2/3/2020 1:12 PM Image Resampling, SHM 7
Bicubic Interpolation / Cubic Convolution
Explanation of this technique requires a little background in
sampling theory.
▪ First, an assumption is made that the original signal has been sam-
pled above the Nyquist rate, which is generally satisfied for imaging
sensors.
• The Nyquist rate is the sampling frequency required to faithfully record
the highest (spatial) frequency (/resolution) content of the scene.
▪ Given this assumption, the “sinc” function allows an (almost) exact
reconstruction of the original scene.
• If the images had an infinite num-
ber of rows and columns, and
• all pixels were used for the inter-
polation,
(radian) the sinc function would yield a per-
fect reconstruction.
2/3/2020 1:12 PM Image Resampling, SHM 8
Cubic Spline Interpolation (1)
Practically dictates that interpolations be carried out using only
small neighborhoods surrounding the interpolated pixel.
▪ A cubic spline approximation to the sinc function is the form gene-
rally used for bicubic interpolation.
Note that the cubic spline
most nearly approximates
the sinc function, whereas
bilinear and nearest-neighbor
interpolation are less f1(x)
consistent approximations.
f3(x)
f2(x)

2/3/2020 1:12 PM Image Resampling, SHM 9


Cubic Spline Interpolation (2)
The functional relationship :
f1(x) = (a + 2)x3 – (a + 3)x2 +1 for 0 ≤ x ≤ 1 (E-4)
f2(x) = ax3 – 5ax2 + 8ax – 4a for 1 ≤ x ≤ 2 (E-5)
f3(x) = 0 for x ≥ 2 (E-6)
where :
a = free parameter equal to slope of weighting function at x = 1
(generally a = -0.5 yields best results),
x = absolute value of difference between whole-number row or
column and fractional row or column.
The computational process is analogous to that of bilinear
interpolation in that it performed first along the rows and then
down the single, fractional column.

2/3/2020 1:12 PM Image Resampling, SHM 10


The Computation of Cubic Spline Interpolation (1)
The computation are conveniently expressed in matrix form :
d11 d12 d13 d14   c1 
d d 22 d 23 d 24  c2 
rDc  r1 r2 r3 r4  21 (E - 7)
d 31 d 32 d 33 d 34  c3 
  
d 41 d 42 d 43 d 44  c4 
where :
r and c vectors consist of coefficients derived from Eqs. (E-4) and (E-5), and
D matrix contains the digital numbers from 4 X 4 neighborhood surrounding
in the interpolated pixel.

• Interpolating across the rows (based on the fractional column position) is


done by forming the product Dc.
• Subsequently, r is multiplied by the product to obtain the final interpolated
value. (Interpolating across the columns)

2/3/2020 1:12 PM Image Resampling, SHM 11


R = 619.71, TABLE E-2
C = 493.39 Column interpolation weight matrix C computed for example
of Fig. E-1. Slope value of a = -0.5 was used.

58 54 65 65   0.07256 
53 62 68 58   0.70873 
rDc   0.02986 0.27662 0.82633  0.07309  60.66
51 56 59 53   0.41022 
  
52 45 50 49   0.04639 

The resultant value of 60.66 is then rounded to 61, the nearest integer.
▪ Note that again this DN value differs from both the 56 of nearest-neighbor
interpolation, and the 59 of bilinear interpolation.
2/3/2020 1:12 PM Image Resampling, SHM 12
Comparison of the Three Methods
Advantage Disadvantage
The fastest in terms of computational The resultant appearance can
time. be somewhat jagged or blocky,
Nearest- since a continuous interpolation
neighbor Not modifying the original data image, is not being performed.
which is important if remote-sensing
image classification will be performed.
The smoother appearance of the result Edges in the scene are slightly
(some high-frequency detail is filtered less distinct.
Bilinear out).
Slower than nearest-neighbor
Faster than bicubic interpolation. interpolation
The most rigorous resampling technique The slowest in terms of
on the basis of signal processing theory. computational time.
Bicubic It achieves the smooth appearance
without sacrificing a much high-
frequency (edge) detail.

2/3/2020 1:12 PM Image Resampling, SHM 13


2/3/2020 1:12 PM Image Resampling, SHM 14
(low resolution image) (nearest-neighbor resampling)

(bilinear resampling) (bicubic resampling)

2/3/2020 1:12 PM Image Resampling, SHM 15


References
• Wolf, P.R., and B.A. Dewitt, 2000. Elements of Photogrammetry : with
Application in GIS, 3rd ed., McGraw-Hill, New York, 608p.
• Internet browsing.

Aknowledgements

2/3/2020 1:12 PM Image Resampling, SHM 16

You might also like