[SciPy-User] Difference in quality from different interpolation orders
Chris Weisiger
cweisiger at msg.ucsf.edu
Thu Jun 16 11:59:06 EDT 2011
On Thu, Jun 16, 2011 at 8:52 AM, Zachary Pincus <zachary.pincus at yale.edu>wrote:
> Hi Chris,
>
> Interpolation is by definition making up data, so there's no clear way to
> evaluate "error induced" in the general case -- it depends on the image. You
> could decimate and then magnify a test image (using ndimage.zoom) and
> compare the that to the original to get a sense of the error from using
> different interpolators, say... but that's not really authoritative either
> since you're testing a roundtrip. Or you could just downsample the test
> image (not using any low-pass filtering; just do 'smaller =
> larger[::2,::2]') and try interpolating that back up to the original size.
> Or do the roundtrip the other direction...
>
> Personally, I find that the higher-order spline filters in ndimage are
> prone to ringing artifacts at any sort of sharp edges, so I use order=1
> almost exclusively. If your micrographs are bandlimited by the optics to
> something below the sensor's Nyquist frequency, you should be fine with the
> higher order filters. For ringing, though, it seems that visual inspection
> is a pretty good way to check the results.
>
>
Okay, thanks for that information. Interesting that higher-order
interpolations could actually make the problem worse. I'd assumed that
"higher order == more accurate" would hold true, but I guess it makes sense
that for sharply discontinuous inputs, that breaks down.
I'm still very much inexperienced when it comes to scientific programming;
I've only really done application programming and graphical work before.
There's a lot of new background knowledge I have to get for many of these
projects...
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110616/3acb2315/attachment.html>
More information about the SciPy-User
mailing list