From b5e2b01620855da10722afc2021f08fa1a4c68ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Thu, 16 Aug 2012 19:16:17 +0200 Subject: [PATCH] Add doc string to bilinear_interpolation --- skimage/transform/_project.pyx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/skimage/transform/_project.pyx b/skimage/transform/_project.pyx index 282411eb..245f63cf 100644 --- a/skimage/transform/_project.pyx +++ b/skimage/transform/_project.pyx @@ -12,6 +12,22 @@ from libc.math cimport ceil, floor cdef inline double bilinear_interpolation(double* image, int rows, int cols, double r, double c, char mode, double cval=0): + """Bilinear interpolation at a given position in the image. + + Parameters + ---------- + image : double array + Input image. + rows, cols: int + Shape of image. + r, c : int + Position at which to interpolate. + mode : {'C', 'W', 'M'} + Wrapping mode. Constant, Wrap or Mirror. + cval : double + Constant value to use for constant mode. + + """ cdef double dr, dc cdef int minr, minc, maxr, maxc @@ -34,7 +50,7 @@ cdef inline double get_pixel(double* image, int rows, int cols, int r, int c, Parameters ---------- - image : array of dtype double + image : double array Input image. rows, cols: int Shape of image.