[SciPy-user] Is there a bicubic interpolation function in scipy?

Stéfan van der Walt stefan at sun.ac.za
Wed May 21 03:54:25 EDT 2008


2008/5/21 zhang chi <zhangchipr at gmail.com>:
>    I want to use a bicubic interpolation function to process a image, is
> there a a bicubic interpolation function in scipy?

There are a couple of options available.  In ndimage, you can specify
an `order` parameter to most functions, which determines the order of
the splines used for interpolation, e.g.

x = np.array([1,2,3.])
ndimage.zoom(x,5/3.,order=1)

In `scipy.interpolate`, you also have `interp2d` and
SmoothBivariateSpline (with kx=1,ky=1).

Furthermore, if you need C code I can provide you with either ctypes
or cython examples.

Regards
Stéfan



More information about the SciPy-User mailing list