mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-14 12:50:39 +08:00
Add option to skip clipping of output, and detect if input float image has negative values
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user