Lanczos resampling
Lanczos filtering and Lanczos resampling are two applications of a certain mathematical formula. It can be used as a low-pass filter or used to smoothly interpolate the value of a digital signal between its samples. In the latter case, it maps each sample of the given signal to a translated and scaled copy of the Lanczos kernel, which is a sinc function windowed by the central lobe of a second, longer, sinc function. The sum of these translated and scaled kernels is then evaluated at the desired points. Lanczos resampling is typically used to increase the sampling rate of a digital signal, or to shift it by a fraction of the sampling interval. It is often used also for multivariate... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
Lanczos filtering and Lanczos resampling are two applications of a certain mathematical formula. It can be used as a low-pass filter or used to smoothly interpolate the value of a digital signal between its samples. In the latter case, it maps each sample of the given signal to a translated and scaled copy of the Lanczos kernel, which is a sinc function windowed by the central lobe of a second, longer, sinc function. The sum of these translated and scaled kernels is then evaluated at the desired points. Lanczos resampling is typically used to increase the sampling rate of a digital signal, or to shift it by a fraction of the sampling interval. It is often used also for multivariate interpolation, for example to resize or rotate a digital image. It has been considered the "best compromise" among several simple filters for this purpose. The filter was invented by Claude Duchon, who named it after Cornelius Lanczos due to Duchon's use of the sigma approximation in constructing the filter, a technique created by Lanczos. ===Lanczos kernel=== The effect of each input sample on the interpolated values is defined by the filter's reconstruction kernel , called the Lanczos kernel. It is the normalized sinc function , windowed (multiplied) by the Lanczos window, or sinc window, which is the central lobe of a horizontally stretched sinc function for . L(x) = \begin{cases} \operatorname{sinc}(x) \operatorname{sinc}(x/a) & \text{if}\ -a where \operatorname{sinc}(x) = \begin{cases} \displaystyle \frac{\sin(\pi x)}{\pi x} & \text{if}\ x \neq 0, \\ 1 & \text{otherwise}. \end{cases} Equivalently, L(x) = \begin{cases} 1 & \text{if}\ x = 0, \\ \dfrac{a \sin(\pi x) \sin(\pi x / a)}{\pi^2 x^2} & \text{if}\ -a \leq x The parameter is a positive integer, typically 2 or 3, which determines the size of the kernel. The Lanczos kernel has lobes: a positive one at the center, and alternating negative and positive lobes on each side. S(x) = \sum_{i=\lfloor x \rfloor - a + 1}^{\lfloor x \rfloor + a} s_{i} L(x - i), where is the filter size parameter, and \lfloor x \rfloor is the floor function. The bounds of this sum are such that the kernel is zero outside of them. == Multidimensional interpolation== Lanczos filter's kernel in two dimensions is L(x, y) = L(x)L(y). Since the kernel assumes negative values for , the interpolated signal can be negative even if all samples are positive. More generally, the range of values of the interpolated signal may be wider than the range spanned by the discrete sample values. In particular, there may be ringing artifacts just before and after abrupt changes in the sample values, which may lead to clipping artifacts. However, these effects are reduced compared to the (non-windowed) sinc filter. For a = 2 (a three-lobed kernel) the ringing is U(x) = \sum_{i\in \Z} L(x-i) of all integer-translated copies of the kernel is not always 1. Therefore, the Lanczos interpolation of a discrete signal with constant samples does not yield a constant function. This defect is most evident when . Also, for the interpolated signal has zero derivative at every integer argument. This is rather academic, since using a single-lobe kernel (a = 1) loses all the benefits of the Lanczos approach and provides a poor filter. There are many better single-lobe, bell-shaped windowing functions. The partition of unity can be introduced by a normalization, L'(x-i) = \frac{L(x-i)}{\sum_{j=1-a}^a L(x-j)} for 0\leq x . ==See also== Bicubic interpolation Bilinear interpolation Spline interpolation Nearest-neighbor interpolation Sinc filter ==External links== Anti-Grain Geometry examples: image_filters.cpp shows comparisons of repeatedly resampling an image with various kernels. imageresampler: A public domain image resampling class in C++ with support for several windowed Lanczos filter kernels.
Cite this
"Lanczos resampling". 1789507464. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1375116559 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy