mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-26 13:37:17 +08:00
Rename matrix transform function and remove from pxd
This commit is contained in:
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user