[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subpixel image movement by bicubic interpolation?,

Dyer Lytle wrote:

> So I thought I'd ask if anyone has a sub-pixel image movement
> routine based on bicubic interpolation that they would be willing
> to share.
The INTERPOLATE keyword has a /CUBIC keyword.    I would simply replace
line in bilinear.pro that reads

 return, interpolate(p, ix, jy)


 return, interpolate(p, ix, jy, CUBIC = -0.5)

I definitely prefer using a value of -0.5 for CUBIC, for reasons
discussed in
this group about a year ago.   (Note that the option to set CUBIC = -0.5
only been  available since V5.0.)

The IDL Astronomy Library has the procedure RINTER which is equivalent
INTERPOLATE with  CUBIC = -0.5.   Although slower, RINTER() has two
advantages: (1) one can optionally obtain the X and Y derivatives at the
reference points, which is useful if you are trying to estimate errors
introduced by the interpolation, (2) if repeated interpolation is to be
the same array, then some values can be pre-computed and stored in
RINTER is available at http://idlastro.gsfc.nasa.gov/ftp/pro/image

Wayne Landsman                      landsman@mpb.gsfc.nasa.gov