Rename matrix transform function and remove from pxd

This commit is contained in:
Johannes Schönberger
2012-08-20 22:48:35 +02:00
parent b5e2b01620
commit 53472b8e07
2 changed files with 3 additions and 7 deletions
-5
View File
@@ -5,8 +5,3 @@ import numpy as np
cdef inline double bilinear_interpolation(double* image, int rows, int cols,
double r, double c, char mode,
double cval=*)
cdef inline double get_pixel(double* image, int rows, int cols, int r, int c,
char mode, double cval=*)
cdef inline int coord_map(int dim, int coord, char mode)
+3 -2
View File
@@ -108,7 +108,8 @@ cdef inline int coord_map(int dim, int coord, char mode):
return coord
cdef inline tf(double x, double y, double* H, double *x_, double *y_):
cdef inline _matrix_transform(double x, double y, double* H, double *x_,
double *y_):
"""Apply a homography to a coordinate.
Parameters
@@ -205,7 +206,7 @@ def homography(np.ndarray image, np.ndarray H, output_shape=None,
for tfr in range(out_r):
for tfc in range(out_c):
tf(tfc, tfr, <double*>M.data, &c, &r)
_matrix_transform(tfc, tfr, <double*>M.data, &c, &r)
out[tfr, tfc] = bilinear_interpolation(<double*>img.data, rows,
cols, r, c, mode_c)