Interpolation Methods
When a visualization undergoes a geometric transformation, the location of each transformed pixel may not map directly to a center of a pixel location in the output visualization as shown in the following figure.
When the transformed pixel center does not directly coincide with a pixel in the output visualization, the pixel value must be determined using some form of interpolation. The appearance and quality of the output image is determined by the amount of error created by the chosen interpolation method. Note the differences in the line edges between the following two interpolated images.
There are a variety of possible interpolation methods available when using geometric transforms in IDL. Interpolation methods include:
Nearest-neighbor interpolation — Assigns the value of the nearest pixel to the pixel in the output visualization. This is the fastest interpolation method but the resulting image may contain jagged edges.
Linear interpolation — Surveys the 2 closest pixels, drawing a line between them and designating a value along that line as the output pixel value.
Bilinear interpolation — Surveys the 4 closest pixels, creates a weighted average based on the nearness and brightness of the surveyed pixels and assigns that value to the pixel in the output image.
Use cubic convolution if a higher degree of accuracy is needed. However, with still images, the difference between images interpolated with bilinear and cubic convolution methods is usually undetectable.
Trilinear interpolation — Surveys the 8 nearest pixels occurring along the x, y, and z dimensions, creates a weighted average based on the nearness and brightness of the surveyed pixels and assigns that value to the pixel in the output image.
Cubic Convolution interpolation — Approximates a sinc interpolation by using cubic polynomial waveforms instead of linear waveforms when resampling a pixel. With a one-dimension source, this method surveys 4 neighboring pixels. With a two-dimension source, the method surveys 16 pixels. Interpolation of three-dimension sources is not supported. This interpolation method results in the least amount of error, thus preserving the highest amount of fine detail in the output image. However, cubic interpolation requires more processing time.
Note
The IDL Reference Guide details the interpolation options available for each geometric transformation function.

