Add option to skip clipping of output, and detect if input float image has negative values

This commit is contained in:
Johannes Schönberger
2014-09-18 20:49:25 -04:00
parent 46305eeeec
commit fdf0908ab7
2 changed files with 30 additions and 7 deletions
+11
View File
@@ -55,6 +55,17 @@ def test_warp_matrix():
outx = warp(x, matrix, order=5)
def test_warp_clip():
x = 2 * np.ones((5, 5), dtype=np.double)
matrix = np.eye(3)
outx = warp(x, matrix, order=0, clip=False)
assert_array_almost_equal(x, outx)
outx = warp(x, matrix, order=0, clip=True)
assert_array_almost_equal(x / 2, outx)
def test_homography():
x = np.zeros((5, 5), dtype=np.double)
x[1, 1] = 1