Re: subpixel image movement by bicubic interpolation?, [message #11880] |
Thu, 04 June 1998 00:00 |
Wayne Landsman
Messages: 117 Registered: January 1997
|
Senior Member |
|
|
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
the
line in bilinear.pro that reads
return, interpolate(p, ix, jy)
with
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
has
only been available since V5.0.)
The IDL Astronomy Library has the procedure RINTER which is equivalent
to
INTERPOLATE with CUBIC = -0.5. Although slower, RINTER() has two
possible
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
applied
the same array, then some values can be pre-computed and stored in
Common.
RINTER is available at http://idlastro.gsfc.nasa.gov/ftp/pro/image
Wayne Landsman landsman@mpb.gsfc.nasa.gov
|
|
|