Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Image Geometry Transforms

This chapter describes the Intel® IPP image processing functions that perform geometric operations of resizing, rotating, warping and remapping an image.

Most functions performing geometric transform of an image use an interpolation algorithm to resample the image. The type of interpolation method to be used is passed to the function in the interpolation parameter for rotate, warp, and remap. For resize transform, the interpolation type is part of the function name.

The following interpolation algorithms are used:

  • nearest neighbor
  • linear interpolation
  • cubic convolution
  • supersampling
  • interpolation using Lanczos window function
  • interpolation with two-parameter cubic filters
  • optional edge smoothing of the destination image.

The nearest neighbor algorithm is the fastest, while other methods yield higher quality results, but are slower.

Use one of the following constant identifiers for the applicable interpolation methods:

IPPI_INTER_NN/ippNearest

Nearest neighbor interpolation.

IPPI_INTER_LINEAR/ippLinear

Linear interpolation.

IPPI_INTER_CUBIC

Cubic interpolation.

IPPI_INTER_LANCZOS/ippLanczos

Interpolation using 3-lobed Lanczos window function.

IPPI_INTER_CUBIC2P_BSPLINE

Interpolation using B-spline.

IPPI_INTER_CUBIC2P_CATMULLROM

Interpolation using Catmull-Rom spline.

IPPI_INTER_CUBIC2P_B05C03

Interpolation using special cubic filter.

ippSuper

Supersampling interpolation.

ippCubic

Interpolation with two-parameter cubic filters.

For certain functions, you can combine the above interpolation algorithms with additional smoothing (antialiasing) of edges to which the original image borders are transformed. To use this edge smoothing, set the parameter interpolation to the bitwise OR of IPPI_SMOOTH_EDGE or IPPI_SUBPIXEL_EDGE and the desired interpolation mode, or use the special function flags.

CAUTION:

You can use interpolation with edge smoothing option only in those geometric transform functions where this option is explicitly listed in the parameters definition section.

See appendix B “Interpolation in Image Geometric Transform Functions” for more information on the interpolation algorithms that are used in the library.

Super Sampling mode of resize transform has several limitations. It can be used only:

  • for reducing image size

  • for full images resize, while other interpolation modes can be used for full and tiled images for better speed/memory performance.