Leo Stepanewk
Leo Stepanewk

Reputation: 83

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. 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]. When I use this as input into the function, it returns a 4x4 rotation matrix. However, I don't know how to apply this 4x4 matrix to my data because it is Nx3. What do I do with the output matrix? Thanks!

Upvotes: 2

Views: 373

Answers (1)

asymptote
asymptote

Reputation: 1402

if you look at their source, they are only updating 3 rows and 3 columns of torch.eye(4) tensor. So I think rotation_matrix[..., :3, :3] should provide you with the correct rotation matrix.

Upvotes: 1

Related Questions