WARP_TRI

The WARP_TRI function returns an image array with a specified geometric correction applied. Images are warped using control (tie) points such that locations ( Xi, Yi ) are shifted to ( Xo, Yo ).

The irregular grid defined by ( Xo, Yo ) is triangulated using TRIANGULATE. Then the surfaces defined by ( Xo, Yo, Xi ) and ( Xo, Yo, Yi ) are interpolated using TRIGRID to get the locations in the input image of each pixel in the output image. Finally, INTERPOLATE is called to obtain the result. Linear interpolation is used by default. Smooth quintic interpolation is used if the QUINTIC keyword is set.

This routine is written in the IDL language. Its source code can be found in the file warp_tri.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = WARP_TRI( Xo, Yo, Xi, Yi, Image )

Arguments

Xo, Yo

Vectors containing the locations of the control (tie) points in the output image.

Xi, Yi

Vectors containing the location of the control (tie) points in the input image. Xi and Yi must be the same length as Xo and Yo .

Image

The image to be warped. May be any type of data.

Keywords

OUTPUT_SIZE

Set this keyword equal to a 2-element vector containing the size of the output image. If omitted, the output image is the same size as Image .

QUINTIC

Set this keyword to use smooth quintic interpolation. Quintic interpolation is slower but the derivatives are continuous across triangles, giving a more pleasing result than the default linear interpolation.

EXTRAPOLATE

Set this keyword to extrapolate outside the convex hull of the tie points. Setting this keyword implies the use of QUINTIC interpolation.

See Also

INTERPOLATE , TRIANGULATE , TRIGRID