Remap is a general-purpose program for remapping (scaling, rotation, translation) and resampling (nearest-neighbor, bilinear, kernel, sinc) images. It can, for example, rotate an image by 45 degrees, scale it up by 1.23 in the X direction, and run a 3x4 kernel over it in just one run:
remap in.img out.img -rotate 45 -scale 1.23 1 -kernel 3x4
In interferometry, we use remap to resample the second complex image to line up with the first. The default interpolation scheme is bilinear; you can also use an 8x8 sinc kernel by passing the
-sincoption.
In general, you can achieve a more accurate resampling of your data with more computer time; but we must remember that each resampling degrades the resolution of the data.
Remap implements three resampling strategies:
![]() Nearest-Neighbor [-near] |
![]() Bilinear [-bilin] |
![]() 8-Point Sinc [-sinc] |
Nearest-neighbor takes the nearest input pixel and copies it to the output. It is the fastest resampling method. It does not blur sharp edges, but it cannot shift images by a non-integral number of pixels.
Bilinear resampling takes a linear weighted average of 4 surrounding input points to generate an output point. It is slightly slower than nearest-neighbor resampling, and allows a sub-pixel shift. It tends to blur sharp edges in the input, however.
8-point Sinc resampling takes a Fourier-weighted average of the nearest 64 input pixels to generate a single output pixel. It is several times slower than the other methods, but allows for fine sub-pixel shifts without blurring sharp edges. An infinite- point sinc resampling is theoretically lossless for band-limited signals; but it doesn't work out quite so nicely in the real world.
Remap is automatically called by register_sic. You can also run it by itself.
Back to main interferometry page.
Last Updated: September 1, 1998
If you have any questions, please feel free to email olawlor@acm.org