Developer Reference

  • 2021
  • 03/26/2021
  • Public Content
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 (
x
S
,
y
S
) in the source image:
x
S0
= int(
x
S
) - 1;
x
S1
=
x
S0
+ 1;
x
S2
=
x
S0
+ 2;
x
S3
=
x
S0
+ 3;
y
S0
= int(
y
S
) - 1;
y
S1
=
y
S0
+ 1;
y
S2
=
y
S0
+ 2;
y
S3
=
y
S0
+ 3;
First, the intensity values are interpolated along the
x
-axis to produce four intermediate results
I
0
,
I
1
,
I
2
,
I
3
:
Then the intensity
D
(
x
D
,
y
D
) is computed by interpolating the intermediate values
I
k
along the
y
-axis:
Here
a
i
and
b
k
are the coefficients defined as
a
i
=
L
(
x
S
-
x
Si
),
b
k
=
L
(
y
S
-
y
Si
),
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 (
x
S
,
y
S
) in the source image:
x
S0
= int(
x
S
) - 2;
x
S1
=
x
S0
+ 1;
x
S2
=
x
S0
+ 2;
x
S3
=
x
S0
+ 3;
x
S3
=
x
S0
+ 4;
x
S3
=
x
S0
+ 5;
y
S0
= int(
y
S
) - 2;
y
S1
=
y
S0
+ 1;
y
S2
=
y
S0
+ 2;
y
S3
=
y
S0
+ 3;
y
S2
=
y
S0
+ 4;
y
S2
=
y
S0
+ 5;
First, the intensity values are interpolated along the
x
-axis to produce six intermediate results
I
0
,
I
1
, ...
I
5
:
Then the intensity
D
(
x
D
,
y
D
) is computed by interpolating the intermediate values
I
k
along the
y
-axis:
Here
a
i
and
b
k
are the coefficients defined as
a
i
=
L
(
x
S
-
x
Si
),
b
k
=
L
(
y
S
-
y
Si
),
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).

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.