BUG: fast_homography should ensure input data is contiguous.

This commit is contained in:
Stefan van der Walt
2011-09-26 21:44:21 -07:00
parent c4affd4078
commit 41f75309fa
+3 -3
View File
@@ -150,9 +150,9 @@ def homography(np.ndarray image, np.ndarray H, output_shape=None,
"""
cdef np.ndarray[dtype=np.double_t, ndim=2] img = \
np.asarray(image, dtype=np.double)
cdef np.ndarray[dtype=np.double_t, ndim=2] M = \
cdef np.ndarray[dtype=np.double_t, ndim=2, mode="c"] img = \
np.ascontiguousarray(image, dtype=np.double)
cdef np.ndarray[dtype=np.double_t, ndim=2, mode="c"] M = \
np.ascontiguousarray(np.linalg.inv(H))
if mode not in ('constant', 'wrap', 'mirror'):