mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-11 05:52:22 +08:00
Test 90deg rotation for similarity transform
This commit is contained in:
@@ -99,6 +99,17 @@ def test_similarity_init():
|
||||
assert_array_almost_equal(tform.translation, translation)
|
||||
|
||||
|
||||
# test special case for scale if rotation=90deg
|
||||
scale = 0.1
|
||||
rotation = np.pi / 2
|
||||
translation = (1, 1)
|
||||
tform = SimilarityTransform(scale=scale, rotation=rotation,
|
||||
translation=translation)
|
||||
assert_array_almost_equal(tform.scale, scale)
|
||||
assert_array_almost_equal(tform.rotation, rotation)
|
||||
assert_array_almost_equal(tform.translation, translation)
|
||||
|
||||
|
||||
def test_affine_estimation():
|
||||
# exact solution
|
||||
tform = estimate_transform('affine', SRC[:3, :], DST[:3, :])
|
||||
|
||||
Reference in New Issue
Block a user