Lánczos Interpolation Explained (2022) (mazzo.li)

🤖 AI Summary
This piece is an in-depth explainer of Lánczos interpolation — the popular image-resampling method used alongside linear and cubic filters — that traces the technique back to its foundations in signal processing. The author frames interpolation as convolution of discrete samples with an interpolation kernel, shows how ideal reconstruction comes from convolving with sinc (which perfectly reconstructs band-limited signals per the Shannon–Nyquist theorem), and demonstrates why Lánczos often gives the sharp, non-blocky upscales and downscales people prefer in practice. Technically, sinc(πξt) is the unique ideal interpolator because its Fourier spectrum is flat up to ξ/2, so sampling at rate ξ uniquely determines band-limited signals. Two practical problems follow: sinc has infinite support (requiring all samples for each output) and it produces Gibbs ringing on non‑bandlimited signals. Lánczos resolves these by effectively windowing/truncating sinc to finite support (making the kernel computationally feasible and reducing long-range artifacts) while preserving much of sinc’s low‑pass behavior. The method is separable for 2D images (apply 1D kernel across axes), and its main trade-off is kernel width: larger windows approach ideal reconstruction but cost more compute and can increase ringing, while smaller windows are cheaper but smoother.
Loading comments...
loading comments...