Geoscience Reference
In-Depth Information
near
Nearest neighbor resampling (default, fastest algorithm, worst interpolation
quality).
bilinear
bilinear resampling.
cubic
cubic resampling.
cubicspline
cubic spline resampling.
lanczos
Lanczos windowed sinc resampling.
average
average resampling, computes the average of all non-NODATA contributing
pixels. (from GDAL 1.10.0)
mode
selects the value which appears most often of all the sampled points. (fromGDAL
1.10.0)
Categorical data such as land covermaps require a special care to avoid introducing
meaningless interpolated values (see also Sect. 3.2 ) . Nearest neighbor and mode
(a maximum voting technique, introduced since GDAL version 1.10) resampling are
valid for categorical raster datasets. Continuous field datasets can also be interpolated
with bilinear, cubic, cubicspline, lanczos and average interpolation, that can provide
smoother results. Still, many users prefer a simple nearest neighbor. This method is
fast and retains the original values in the image. Still, you must be aware that the
resulting image can have a distorted geometry, due to mis-located pixels.
To illustrate the different resampling methods, we have resampled both a real and
a synthetic image. The real image is the lena image with 256
256 pixels, shown
on the left in Fig. 8.2 a. To show the effect of upsampling, we first reduced the spatial
resolution to 128
×
128 pixels with a nearest neighbor method before upsampling to
the original size of 256
×
16 pixels
with a chess board pattern as shown in the center figure. On the right, a transect is
shown corresponding to the pixel values for the center row of the synthetic image.
The resampling methods bilinear and cubicspline result in smoother results.
Contrast is remained using the methods near, cubic, lanczos and mode. Especially
the mode tends to preserve the edges, with some artifacts in the corners. Particular
to the lanczos resampling are the overshoots at the edges. Notice that due to the
sequence of the chosen chess pattern, the center row for the average upsampling is
constant for all columns.
A similar experiment is performed for downsampling. The original image on the
left in Fig. 8.3 a contains 128
×
256 pixels. The synthetic image consists of 16
×
128 pixels, which is already a downsampled version
of the original lena image. The synthetic image in the center contains 16
×
16
pixels. These images are reduced with a factor of two (rows and columns) with
×
 
Search WWH ::




Custom Search