Skip to content

Commit c2d68d3

Browse files
committed
transformations -> transforms3d
1 parent e148c29 commit c2d68d3

16 files changed

+40
-51
lines changed

examples/bcpd_nonrigid.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22
import open3d as o3
3-
import transformations as trans
3+
import transforms3d as t3d
44
from probreg import bcpd
55
from probreg import callbacks
66
import utils
@@ -11,7 +11,6 @@
1111
cbs = [callbacks.Open3dVisualizerCallback(source, target)]
1212
tf_param = bcpd.registration_bcpd(source, target,
1313
callbacks=cbs)
14-
rot = trans.identity_matrix()
15-
rot[:3, :3] = tf_param.rigid_trans.rot
16-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
17-
tf_param.rigid_trans.scale, tf_param.rigid_trans.t)
14+
15+
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rigid_trans.rot)),
16+
tf_param.rigid_trans.scale, tf_param.rigid_trans.t)

examples/cpd_affine3d_cuda.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
cp = np
99
to_cpu = lambda x: x
1010
import open3d as o3
11-
import transformations as trans
1211
from probreg import cpd
1312
from probreg import callbacks
1413
import utils

examples/cpd_nonrigid3d_cuda.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
cp = np
99
to_cpu = lambda x: x
1010
import open3d as o3
11-
import transformations as trans
1211
from probreg import cpd
1312
from probreg import callbacks
1413
import utils

examples/cpd_rigid.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22
import open3d as o3
3-
import transformations as trans
3+
import transforms3d as t3d
44
from probreg import cpd
55
from probreg import callbacks
66
import utils
@@ -13,7 +13,6 @@
1313
cbs = [callbacks.Open3dVisualizerCallback(source, target)]
1414
tf_param, _, _ = cpd.registration_cpd(source, target,
1515
callbacks=cbs)
16-
rot = trans.identity_matrix()
17-
rot[:3, :3] = tf_param.rot
18-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
19-
tf_param.scale, tf_param.t)
16+
17+
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)),
18+
tf_param.scale, tf_param.t)

examples/cpd_rigid_cuda.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
cp = np
99
to_cpu = lambda x: x
1010
import open3d as o3
11-
import transformations as trans
11+
import transforms3d as trans
1212
from probreg import cpd
1313
from probreg import callbacks
1414
import utils
@@ -24,7 +24,5 @@
2424
elapsed = time.time() - start
2525
print("time: ", elapsed)
2626

27-
rot = trans.identity_matrix()
28-
rot[:3, :3] = to_cpu(tf_param.rot)
29-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
30-
tf_param.scale, to_cpu(tf_param.t))
27+
print("result: ", np.rad2deg(t3d.euler.mat2euler(to_cpu(tf_param.rot))),
28+
tf_param.scale, to_cpu(tf_param.t))

examples/filterreg_deformable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import copy
22
import numpy as np
3-
import transformations as trans
43
import open3d as o3
54
from probreg import filterreg
65
from probreg import callbacks

examples/filterreg_feature.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import transformations as trans
2+
import transforms3d as t3d
33
from probreg import filterreg
44
from probreg import features
55
from probreg import callbacks
@@ -16,7 +16,6 @@
1616
objective_type=objective_type,
1717
sigma2=1000, feature_fn=features.FPFH(),
1818
callbacks=cbs)
19-
rot = trans.identity_matrix()
20-
rot[:3, :3] = tf_param.rot
21-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
22-
tf_param.scale, tf_param.t)
19+
20+
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)),
21+
tf_param.scale, tf_param.t)

examples/filterreg_rigid.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import transformations as trans
2+
import transforms3d as t3d
33
from probreg import filterreg
44
from probreg import callbacks
55
import utils
@@ -13,7 +13,6 @@
1313
sigma2=None,
1414
update_sigma2=True,
1515
callbacks=cbs)
16-
rot = trans.identity_matrix()
17-
rot[:3, :3] = tf_param.rot
18-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
19-
tf_param.scale, tf_param.t)
16+
17+
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)),
18+
tf_param.scale, tf_param.t)

examples/filterreg_rigid_pt2pl.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import transformations as trans
2+
import transforms3d as t3d
33
from probreg import filterreg
44
from probreg import callbacks
55
import utils
@@ -12,7 +12,6 @@
1212
objective_type=objective_type,
1313
sigma2=0.01,
1414
callbacks=cbs)
15-
rot = trans.identity_matrix()
16-
rot[:3, :3] = tf_param.rot
17-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
18-
tf_param.scale, tf_param.t)
15+
16+
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)),
17+
tf_param.scale, tf_param.t)

examples/gmmtree_rigid.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import transformations as trans
2+
import transforms3d as t3d
33
from probreg import gmmtree
44
from probreg import callbacks
55
import utils
@@ -8,7 +8,6 @@
88

99
cbs = [callbacks.Open3dVisualizerCallback(source, target)]
1010
tf_param, _ = gmmtree.registration_gmmtree(source, target, callbacks=cbs)
11-
rot = trans.identity_matrix()
12-
rot[:3, :3] = tf_param.rot
13-
print("result: ", np.rad2deg(trans.euler_from_matrix(rot)),
14-
tf_param.scale, tf_param.t)
11+
12+
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)),
13+
tf_param.scale, tf_param.t)

0 commit comments

Comments
 (0)