[gdal-dev] resampling techniques in GDAL

Gregory, Matthew matt.gregory at oregonstate.edu
Tue Jun 16 18:52:14 EDT 2009


Hi all,

A recent post got me thinking about resampling techniques.  I've posted
a graphic to help illustrate my question.  

  http://www.fsl.orst.edu/lemma/sandbox/resample.png

In the graphic, assume the input image is the 3x3 grid with black
outlines and blue and yellow dot centers.  Assume the red outlined
pixels represent three different output resolutions of a single pixel
each having its center at the black dot.  

Using bilinear interpolation, each of these three output resolutions get
the same value (tested using gdalwarp) based on the four yellow cell
centers.  I understand why this is happening and realize this is the
expected behavior.  

My question, however, is whether or not there is a resampling technique
(inside or outside GDAL) that uses the proportional weights and values
of *all* input pixels touched by the output pixel.  At the finest
resolution in the illustration, this would be equivalent a nearest
neighbor resampling (ie. the output pixel is wholly contained within the
input pixel) and at the coarsest resolution, all nine input pixels would
contribute to the output value based on proportional area.  

This falls outside the traditional { nearest neighbor | bilinear
interpolation | cubic convolution } resampling techniques and there may
be a reason why this is a bad idea.  I can see that it might be
prohibitively slow for large output pixel resolutions but, to my way of
thinking, a potentially more accurate representation of the underlying
(finer-resolution) data.

matt


More information about the gdal-dev mailing list