[Numpy-discussion] nd_image.affine_transform edge effects

Travis Oliphant oliphant@ee.byu....
Fri Mar 23 09:56:43 CDT 2007

James Turner wrote:

>By the way, ringing at sharp edges is an intrinsic feature of higher-
>order spline interpolation, right? I believe this kind of interpolant
>is really intended for smooth (band-limited) data. I'm not sure why
>the pre-filtering makes a difference though; I don't yet understand
>well enough what the pre-filter actually does.
Yes, ringing at edges is an intrinsic feature of higher-order spline 
interpolation.   Eventually, the spline interpolant becomes a 
band-limited sinc-interpolator which will assume that edges are really 
points sampled from a sinc.  So, if you re-sample at different points 
you get the "ringing" effect.  But, you shouldn't see a lot of ringing 
below order 7.

The pre-filter obtains the spline-interpolation coefficients.  The 
spline assumes the continuous function represented by the samples at x_i is

f(x,y) = sum(c_ij beta^o(x-x_i) beta^o(y-y_i))

The "pre-filter" is computing the coefficients c_ij.  You then evaluate 
at any point you like using the continuous function implied by the 
spline.   The function beta^o is a spline function and depends on the 
order of the spline.

>I'm not sure what people normally do in computer graphics, since I'm
>working more with natural band-limited images, but in the case of
>Stefan's "rotate_artifacts" example, wouldn't it be appropriate to
>use the 1st- or 0th-order spline instead of the 2nd order? If your
>real-life data are smooth enough, however, then in theory the
>ringing with higher orders should go away.
Yes, that is true.  But, you really shouldn't see much ringing with a 
3rd order spline, though.

I studied these splines for a while, but my memory can fail me.  You can 
look at the papers of M. Unser for much more information.  Here is a 
link to a good review paper.



More information about the Numpy-discussion mailing list