comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 3D congrid without interpolation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 3D congrid without interpolation [message #53411 is a reply to message #53410] Fri, 13 April 2007 15:57 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 12 Apr 2007 15:40:07 -0700, mgalloy@gmail.com wrote:

> On Apr 12, 3:19 pm, David Fanning <n...@dfanning.com> wrote:
>> Humm. Hard for me to imagine what you are using to
>> do this that is interpolating anything for you.
>> CONGRID is normally used, but that won't interpolate
>> unless you explicitly tell it to.
>
> CONGRID interpolates 3-dimensional arrays by default. From the online
> help for the INTERP keyword for CONGRID:
>
> INTERP
> Set this keyword to force CONGRID to use linear interpolation when
> resizing a 1- or 2-dimensional array. CONGRID automatically uses
> linear interpolation if the input array is 3-dimensional. When the
> input array is 1- or 2-dimensional, the default is to employ nearest-
> neighbor sampling.

How is "nearest neighbor sampling" not interpolation? Does it
explicitly avoid knowledge of how the new array cell is positioned
w.r.t. the old one, and simply grab averages of nearby neighbors? Why
would this ever be preferable to a linear interpolation?

BTW, there has be a good deal of progress on interpolators, especially
for image data, which IDL hasn't taken advantage of. For example,
when downsizing, you need to take care to avoid moire artifacts and
aliasing.

Here's a classic comparison of various interpolators:

http://www.all-in-one.ee/~dersch/interpolator/interpolator.h tml

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Pasting subarray into array with compound assignment
Next Topic: Re: newbie's question for writing files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:40:28 PDT 2025

Total time taken to generate the page: 0.00603 seconds