Debian Codegraph @

src/pycolmap/estimators/affine_transform_test.py

raw
1 import numpy as np
2
3 import pycolmap
4
5
6 def test_estimate_affine2d_with_points():
7 source = [
8 np.array([0.0, 0.0]),
9 np.array([1.0, 0.0]),
10 np.array([0.0, 1.0]),
11 ]
12 target = [
13 np.array([1.0, 1.0]),
14 np.array([2.0, 1.0]),
15 np.array([1.0, 2.0]),
16 ]
17 result = pycolmap.estimate_affine2d(source, target)
18 assert result is not None
19 result_array = np.array(result)
20 assert result_array.shape == (2, 3)
21
22
23 def test_estimate_affine2d_robust_is_callable():
24 assert callable(pycolmap.estimate_affine2d_robust)