Newsgroups: sci.image.processing
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!howland.reston.ans.net!Germany.EU.net!Munich.Germany.EU.net!eso.org!st53.hq.eso.org!user
From: adorf@eso.org (Hans-Martin Adorf)
Subject: Re: Looking for accurate 2D interpolation algorithms.
X-Nntp-Posting-Host: st53
Message-ID: <adorf-1402951235270001@st53.hq.eso.org>
Sender: news@eso.org
Organization: ST-ECF/ESO
References: <3g4o9p$d8g@atom.ansto.gov.au> <AZ.95Jan27161712@saturn.analog.com> <3gk7jt$8fr@atom.ansto.gov.au> <BROCK.18.00308040@merak.com> <3gu0on$4a5@jhunix1.hcf.jhu.edu>
Date: Tue, 14 Feb 1995 12:35:27 +0100
Lines: 58

In article <3gu0on$4a5@jhunix1.hcf.jhu.edu>, steves@rad.jhu.edu (Steve
Schreiner) wrote:

> In article <BROCK.18.00308040@merak.com>
> BROCK@merak.com (Doug Brockelbank) writes:
> 
> > 
> > Have you tried using a Sinc function for image resampling.
> > It is based on convolving the image with a filter produced with Sin(x)
/ x.  
> > This is guaranteed to reproduce the original image exactly when the
source and 
> > destination grids are aligned.  It has been a few years since I used it, so 
> > forgive any errors in my response.  I found out about it in an article by 
> > Schlien (?) on image resampling in a book or journal about satellite imagry.
> > ---------------
> > brock@merak.com
> 
> 
> It is true that the sinc function is the ideal interpolation kernel. 
> However, it is unrealizable because of its infinite support. 
> Truncation of the kernel can be used, but causes problems.  A good
> discussion on interpolation is given in George Wolberg's book "Digital
> Image Warping" (I don't have the details of the reference in front of
> me - Email me if interested).  Depending upon whot you want to do, you
> can "do better" than truncating the sinc function.
> 
> Steve 

For regularly sampled, bandlimited data, I can recommend the
sinc-interpolation. More precisely, on a finite grid it's a discrete
Dirichlet-kernel interpolation. The implementation for odd-sized arrays is
easy: 

interpolated_frame = ffti(insert(fft(input_frame), empty_larger_frame))

The input_frame obviously is the regularly sampled input frame.
The empty_larger_frame is, as the name suggests, an empty complex frame,
into which the Fourier transform of the input frame is inserted, such that
the origins in both frames coincide. Then take the Fourier backtransform,
and possibly the real part of it. If everything is ok, the imaginary part
should be zero apart from rounding errors.

I use this interpolation all the time. If the input data is really
bandlimited, the interpolation is exact. For even-sized input frames, one
has to be careful  in treating the Nyquist frequencies correctly.

Hans-Martin Adorf

-- 
Hans-Martin Adorf
ST-ECF/ESO
Karl-Schwarzschild-Str. 2
D-85748 Garching b. Muenchen
Germany
Tel: +49-89-32006-261
Fax: +49-89-32006-480
Internet: adorf@eso.org
