Is there a bicubic interpolation function in scipy?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a bicubic interpolation function in scipy?

zhang chi
hi
   I want to use a bicubic interpolation function to process a image, is there a a bicubic interpolation function in scipy?

thank you very much.

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is there a bicubic interpolation function in scipy?

Stéfan van der Walt
2008/5/21 zhang chi <[hidden email]>:
>    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
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Is there a bicubic interpolation function in scipy?

David Huard
And if you like fortran, I wrote a python wrapper for the fortran implementation of the Akima bicubic interpolator (ACM 760).

David

2008/5/21 Stéfan van der Walt <[hidden email]>:
2008/5/21 zhang chi <[hidden email]>:
>    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
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user