[GRASS-dev] bilinear and bicubic raster interpolation

Markus Metz markus.metz.giswork at googlemail.com
Sat Oct 16 13:17:25 EDT 2010


In i.rectify, I have implemented the interpolation methods available
in r.proj, and while testing discovered an offset of one cell (row +
1, col + 1 from source to target) between the source and target
imagery after rectifying (40+ automatically collected GCPs, order=1,
sub-pixel RMS errors, source image not distorted). I corrected this
offset in i.rectify and suggest that all modules using
Rast_interp_linear/Rast_interp_bilinear/Rast_interp_cubic/Rast_interp_bicubic
should be checked. I am pretty sure that at least r.proj needs this
fix (if a one-cell shift is something to worry about). I think this
kind of correction is also done in r.resamp.interp.

Explanations in
https://trac.osgeo.org/grass/browser/grass/trunk/imagery/i.rectify/nearest.c#L23
https://trac.osgeo.org/grass/browser/grass/trunk/imagery/i.rectify/bilinear.c#L35
https://trac.osgeo.org/grass/browser/grass/trunk/imagery/i.rectify/cubic.c#L36

Markus M


More information about the grass-dev mailing list