Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

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

Document Table of Contents

Cubic Interpolation

The cubic interpolation algorithm (see Figure Cubic Interpolation) uses source image intensities at sixteen pixels in the neighborhood of the point (xS, yS) in the source image:

xS0 = int(xS) - 1; xS1 = xS0 + 1; xS2 = xS0 + 2; xS3 = xS0 + 3;

yS0 = int(yS) - 1; yS1 = yS0 + 1; yS2 = yS0 + 2;yS3 = yS0 + 3.

First, for each ySk the algorithm determines four cubic polynomials F0(x), F1( x), F2( x), and F3( x):

Fk( x) = akx3 + bkx2 + ckx + dk, 0 ≤ k ≤ 3

such that

Fk( xS0) = S(xS0, ySk); Fk(xS1) = S(xS1, ySk),

Fk( xS2) = S(xS2, ySk); Fk( xS3) = S(xS3, ySk).

In Figure Cubic Interpolation , these polynomials are shown by solid curves.

Then, the algorithm determines a cubic polynomial Fy(y) such that

Fy(yS0) = F0( xS), Fy(yS1) = F1(xS), Fy(yS2) = F2(xS), Fy( yS3) = F3( xS).

The polynomial Fy(y) is represented by the dashed curve in Figure Cubic Interpolation.

Finally, the sought intensity D(xD, yD) is set to the value Fy(yS).

To use the cubic interpolation, set the interpolation parameter to IPPI_INTER_CUBIC.

Cubic Interpolation