简体   繁体   English

如何使用角度轴旋转3d点集到旋转矩阵?

[英]How to rotate set of 3d points using angle axis to rotation matrix?

I am trying to rotate a set of 3d points and I am looking at this function from the kornia library . 我正在尝试旋转一组3d点,并且正在kornia库中查看此功能 If I try to rotate a point around the z-axis by pi/2, my input(axis angle representation) should be [0, 0, pi/2]. 如果我尝试将点绕z轴旋转pi / 2,则我的输入(轴角度表示)应为[0,0,pi / 2]。 When I use this as input into the function, it returns a 4x4 rotation matrix. 当我将此用作函数的输入时,它将返回4x4旋转矩阵。 However, I don't know how to apply this 4x4 matrix to my data because it is Nx3. 但是,我不知道如何将此4x4矩阵应用于我的数据,因为它是Nx3。 What do I do with the output matrix? 如何处理输出矩阵? Thanks! 谢谢!

if you look at their source , they are only updating 3 rows and 3 columns of torch.eye(4) tensor. 如果查看它们的源代码 ,它们仅更新3列和3列的torch.eye(4)张量。 So I think rotation_matrix[..., :3, :3] should provide you with the correct rotation matrix. 因此,我认为rotation_matrix[..., :3, :3]应该为您提供正确的旋转矩阵。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM