[SciPy-user] Bilinear Interpolation

Scott Sinclair sinclaird at ukzn.ac.za
Wed Sep 27 09:45:43 CDT 2006


Ryan May wrote:
> Ok, if I select the 4 points surrounding the location of interest, 
> interp2d gives me the value I get with manually calculating a bilinear 
> interpolation.  However if I use the whole field (or even 9 points 
> instead of 4), I get a different answer.  I _know_ I wouldn't expect 
> this for bilinear interpolation, and it would seem to imply that even 
> _linear_ B-splines uses the information from additional points.  Am I 
> missing something here, or are the methods just not truly equivalent?
>   

The two are equivalent when there are only 4 surrounding points (as 
you've found). Bilinear interpolation is simply linear interpolation, 
first in one and then in a second (perpendicular) direction, from what I 
understand the method uses 4 known points by definition.

Spline interpolation is a different animal. Here you are trying to find 
the "smoothest" (actually minimum bending energy) function that can be 
constructed to fit *exactly* through *all* of the known data using a set 
of basis functions which may be linear (or cubic etc...). Then you 
evaluate the value of that function at your unknown location.

Cheers,
Scott


More information about the SciPy-user mailing list