Usenet.com

www.Usenet.com

Group Index

Sci Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Lanczos interpolation



[EMAIL PROTECTED] writes:
>I'm trying to find out why a Lanczos window is often used for sinc
>interpolation of digital images.  Why not some other window, such as a
>Hamming or Hanning window?  Does the Lanczos window have some magical
>properties that make it specially suitable for images?

The Lanczos window is mostly just a sinc function that is several times
wider than the "main" sinc function you're using as a reconstruction
filter.  Look at the frequency reponse of the two sync functions in the
frequency domain.  The "main" sinc function is always sinc(x) =
sin(pi*x)/(pi*x), and its frequency response is a box that extends from
-0.5 cycles/pixel to +0.5 cycles/pixel.  If you use a Lanczos window
that's 4 times wider than this (e.g. sinc(x/4)), so you get 8x8 input
points contributing to each output point, then the box is 1/4 as wide in
the frequency domain.  So the frequency response of the Lanczos window
is non-zero over [-0.125, +0.125].

Now, multiplying the two sinc functions together in the spatial domain
gives you a frequency response that is the convolution of the two boxes.
The convolution of a 1-unit-wide box with a 0.25-unit-wide box is
another box that's still basically 1 unit wide, but with edges that
slope linearly from 1 down to 0 over a space of 0.25 units.  In other
words, the overall frequency response is 1 up to +-0.375 cycles/pixel,
then drops smoothly to zero at +-0.625 cycles/pixel, and is zero above
that.  If you want an even faster transition, you just use a wider
Lanczos window.

In practice, of course, the Lanczos window is just the central lobe of a
sinc function, not a full sinc, so its frequency response is only an
approximation to a narrow box.  This only affects the shape of the
transition from 1 to zero of the overall frequency response.  To compare
Lanczos to some other window, look at the shape of their Fourier
transforms, and in particular how much energy they pass above the
desired cutoff frequency.

I'd guess that Hamming and Hanning windows of the same width as a
particular Lanczos window would probably work quite well.

        Dave



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.