Esempio n. 1
0
def test_tform_projective():
    paramv = np.arange(8)
    t = ProjectiveTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('projective', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == ProjectiveTransform().matrix)
Esempio n. 2
0
def test_tform_similarity():
    paramv = [2, np.pi / 3, 10, 20]
    t = SimilarityTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('similarity', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == SimilarityTransform().matrix)
Esempio n. 3
0
def test_tform_affine():
    paramv = np.arange(6)
    t = AffineTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('affine', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == AffineTransform().matrix)
Esempio n. 4
0
def test_tform_affine():
    paramv = np.arange(6)
    t = AffineTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('affine', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == AffineTransform().matrix)
Esempio n. 5
0
def test_tform_euclidean():
    paramv = [np.pi / 3, 10, 20]
    t = EuclideanTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('euclidean', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == EuclideanTransform().matrix)
Esempio n. 6
0
def test_tform_projective():
    paramv = np.arange(8)
    t = ProjectiveTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('projective', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == ProjectiveTransform().matrix)
Esempio n. 7
0
def test_tform_similarity():
    paramv = [2, np.pi / 3, 10, 20]
    t = SimilarityTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('similarity', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == SimilarityTransform().matrix)
Esempio n. 8
0
def test_tform_euclidean():
    paramv = [np.pi / 3, 10, 20]
    t = EuclideanTransform(paramv)
    assert np.all(paramv == t.paramv)
    mat = parameters_to_projective_matrix('euclidean', paramv)
    assert np.all(mat == t.matrix)
    assert not np.all(mat == EuclideanTransform().matrix)
Esempio n. 9
0
def test_projective():
    paramv = np.arange(8)
    mat = parameters_to_projective_matrix('projective', paramv)
    assert np.all(paramv == projective_matrix_to_parameters('projective', mat))
Esempio n. 10
0
def test_similarity():
    paramv = [2, np.pi / 3, 10, 20]
    mat = parameters_to_projective_matrix('similarity', paramv)
    assert np.all(paramv == projective_matrix_to_parameters('similarity', mat))
Esempio n. 11
0
def test_translation():
    paramv = [10, 20]
    mat = parameters_to_projective_matrix('translate', paramv)
    assert np.all(paramv == projective_matrix_to_parameters('translate', mat))
Esempio n. 12
0
def test_projective():
    paramv = np.arange(8)
    mat = parameters_to_projective_matrix('projective', paramv)
    assert np.all(paramv == projective_matrix_to_parameters('projective', mat))
Esempio n. 13
0
def test_similarity():
    paramv = [2, np.pi / 3, 10, 20]
    mat = parameters_to_projective_matrix('similarity', paramv)
    assert np.all(paramv == projective_matrix_to_parameters('similarity', mat))
Esempio n. 14
0
def test_translation():
    paramv = [10, 20]
    mat = parameters_to_projective_matrix('translate', paramv)
    assert np.all(paramv == projective_matrix_to_parameters('translate', mat))