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

ID 790148
Date 6/24/2024
Public

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

Document Table of Contents

Lanczos Interpolation

This method is based on the 2-lobed or 3-lobed Lanczos window function as the interpolation function.

Interpolation with the 2-lobed Lanczos Window Function

The interpolation algorithm uses source image intensities at 16 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, the intensity values are interpolated along the x-axis to produce four intermediate results I0, I1, I2, I3:



Then the intensity D( xD, yD) is computed by interpolating the intermediate values Ik along the y-axis:



Here ai and bk are the coefficients defined as

ai = L(xS- xSi), bk = L(yS- ySi),

where L(x) is the Lanczos windowed sinc function:



To use this interpolation, use the ippiResizeLanczos function.

Interpolation with the 3-lobed Lanczos Window Function

The interpolation algorithm uses source image intensities at 36 pixels in the neighborhood of the point (xS, yS) in the source image:

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

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

First, the intensity values are interpolated along the x-axis to produce six intermediate results I0, I1, ... I5:



Then the intensity D( xD, yD) is computed by interpolating the intermediate values Ik along the y-axis:



Here ai and bk are the coefficients defined as

ai = L(xS- xSi), bk = L(yS- ySi),

where L(x) is the Lanczos windowed sinc function:



To use this interpolation, set the interpolation parameter to IPPI_INTER_LANCZOS, or use the functions with the Lanczos suffix (pass interpolation=ippLanczos to GetSize functions).