看来我的问题的答案很明显,但不幸的是我想不出来,请帮助我!
我正在尝试使用 vtk 库在 python 中获取 icp 转换。
我在这里运行这段代码: http://www.vtk.org/Wiki/VTK/Examples/Python/IterativeClosestPoints
然后
print icp.GetLandmarkTransform()
结果显示变换矩阵等。
...
Elements:
-> 1 4.76975e-10 0 -7.79873e-10
-> -4.76975e-10 1 -0 1.58991e-10
-> -0 0 1 0
-> 0 0 0 1
Mode: RigidBody
...
如何提取 numpy 数组中的变换矩阵? 我只需要二维数据集的转换。有更简单的方法吗?
提前致谢!
最佳答案
在寻求 friend 的帮助后,他给了我答案。只是张贴以防万一有人需要它:
for i in range(3):
for j in range(4):
print icp.GetLandmarkTransform().GetMatrix().GetElement(i, j),
print
print
关于python - vtk python icp如何获取变换矩阵,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21560815/