Overview of Interpolation Modes

In geometric transformations, the grid of input image pixels is not necessarily mapped onto the grid of pixels in the output image. Therefore, to compute the pixel intensities in the output image, the geometric transform functions need to interpolate the intensity values of several input pixels that are mapped to a certain neighborhood of the output pixel.

Geometric transformations can use various interpolation algorithms. When calling the geometric transform functions of the Intel IPP, the application code specifies the interpolation mode (that is, the type of interpolation algorithm) by using the parameter interpolation. The library supports the following main interpolation modes:

- nearest neighbor interpolation (interpolation = IPPI_INTER_NN)

- linear interpolation (interpolation = IPPI_INTER_LINEAR)

- cubic interpolation (interpolation = IPPI_INTER_CUBIC)

- supersampling (interpolation = IPPI_INTER_SUPER)

- interpolation with Lanczos window function (interpolation = IPPI_INTER_LANCZOS).

- interpolation with two-parameter cubic filters (interpolation can be set to one of the IPPI_INTER_CUBIC2P_BSPLINE, IPPI_INTER_CUBIC2P_CATMULLROM, IPPI_INTER_CUBIC2P_B05C03).

For certain functions, the above main interpolation modes can be combined with additional smoothing of edges to which the borders of the original image are transformed. To use this option, set the parameter interpolation to the bitwise OR of the edge smooting flag and the desired interpolation mode. For example, in order to rotate an image with cubic interpolation and smooth the rotated image edges, pass the following value to ippiRotate():

interpolation = IPPI_INTER_CUBIC | IPPI_SMOOTH_EDGE.

Interpolation with edge smoothing option can be used only in those geometric transform functions where this option is explicitly listed in the parameters definition section.

For the function ResizeSqrPixel the listed above modes can be combined with the additional antialiasing option to remove various artefacts of image compression. To use this feature, set the parameter interpolation to the bitwise OR of IPPI_ANTIALIASING and the desired interpolation mode. Antialiasing does not work with supersampling and nearest neighbor interpolation modes.

Table Interpolation Modes Supported by Image Geometric Transform Functions lists the supported interpolation modes for the main geometric transform functions that use interpolation.

Interpolation Modes Supported by Image Geometric Transform Functions
Function Base Name NN Lin Cub CR La3 SS AA ES
ResizeSqrPixel x x x x *) x x x x **)
Remap x x x x x n/a n/a x
Rotate x x x x   n/a n/a x
RotateCenter x x x x   n/a n/a x
Shear x x x x   n/a n/a x
WarpAffine x x x x   n/a n/a x
WarpAffineBack x x x     n/a n/a  
WarpAffineQuad x x x     n/a n/a x
WarpPerspective x x x     n/a n/a x
WarpPerspectiveBack x x x     n/a n/a  
WarpPerspectiveQuad x x x     n/a n/a x
WarpBilinear x x x     n/a n/a x
WarpBilinearBack x x x     n/a n/a  
WarpBilinearQuad x x x     n/a n/a x

*) The function ippiResizeSqrPixel additionally supports two variants of the interpolation with two-parameter cubic filters.

**) The function ippiResizeSqrPixel supports two variants of the edge smoothing (see function description).

Here NN - nearest neighbor interpolation, Lin - linear interpolation, Cub - cubic interpolation, CR - Catmull-Rom spline, La3 - interpolation with Lanczos window, SS - super sampling interpolation, AA - antialiasing, ES - edge smoothing.

The sections that follow provide more details on each interpolation mode.


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.