Lanczos resampling

From Wikipedia, the free encyclopedia

Incipit of a piece by Gaspar Sanz. Original, low quality scansion with JPEG artifacts. Open the picture to see the details.
Enlarge
Incipit of a piece by Gaspar Sanz. Original, low quality scansion with JPEG artifacts. Open the picture to see the details.
The same image magnified at 500% with Lanczos algorithm. JPEG artifacts were removed changing image's transfer function. Open the picture to see the details.
Enlarge
The same image magnified at 500% with Lanczos algorithm. JPEG artifacts were removed changing image's transfer function. Open the picture to see the details.

Lanczos resampling (aka Lanczos2 and Lanczos3) is a method used to make a digital bitmap image larger or smaller by resampling it, which is to say, by assigning sample points in the original bitmap and performing a transform on those points, depending on the pixel values closest to any given point.

Lanczos uses a windowed product of sinc functions as a convolution kernel for image resampling. In one dimension, its formula is given by: L(x) = \begin{cases} \frac{2 \sin(\pi x) \sin \left( \frac{\pi}{2} x \right)}{\pi^2 x^2} & -2 < x < 2, x \ne 0 \\ 1 & x = 0 \\ 0 & otherwise \end{cases}.

Lanczos kernel. Note that the function obtains negative values.
Enlarge
Lanczos kernel. Note that the function obtains negative values.

Currently it is one of the best digital image resizing kernels, though it is known to leave "echoes" on some types of image. Named after Cornelius Lanczos, because he showed how to use Fourier series and Chebyshev polynomials for various problems where it was not used before.

[edit] Applications

The Lanczos resampling kernel is known to be used in:

[edit] See also

[edit] External links

In other languages