about angle axis

313 views
Skip to first unread message

Jianxiong Xiao

unread,
Apr 10, 2013, 2:18:27 AM4/10/13
to ceres-...@googlegroups.com
Hi guys,

I have a very naive question that puzzles me for the whole day!


I have a 3D point, X = [-2.1617 -1.49118 3.61829]
and a rotation matrix:
RotMat = [
0.9288 0.0339 -0.3690
0.3695 -0.1566 0.9159
0.0267 0.9871 0.1580 ]

I transform the point X by the rotation RotMat and get RotMat * X = [
-3.3935 2.7488 -0.9580 ].

But if I covert RotMat to angle axis representation using
RotationMatrixToAngleAxis, I got.
AArep = [ 0.2316 -1.2870 1.0915 ]
and then use AngleAxisRotatePoint to rotate the point X,
I got [ -0.9921 -4.3594 -0.0117 ],

Which is a very different answer!

I am so lost now. Please help me. Thanks a lot!

--
Best,
Jianxiong

Sameer Agarwal

unread,
Apr 10, 2013, 2:20:46 AM4/10/13
to ceres-...@googlegroups.com

Check  the calling conventions on these functions. I think for silly historical reasons one is probably column major and the other is row major. Use the matrix adapters to get uniform access.

--
--
----------------------------------------
Ceres Solver Google Group
http://groups.google.com/group/ceres-solver?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Jianxiong Xiao

unread,
Apr 10, 2013, 3:30:22 AM4/10/13
to ceres-...@googlegroups.com
Thanks for the prompt response, Sameer!

I think I figured out the answer, inspired by your comment. My
rotation matrix is not a valid matrix. det(RotMat) = -1
I think I messed up some left hand and right hand coordinate
conversion in my system, and gave ceres the wrong matrix.
Thanks a lot!
--
Best,
Jianxiong

Sameer Agarwal

unread,
Apr 10, 2013, 9:49:00 AM4/10/13
to ceres-...@googlegroups.com
You are welome. I am glad my non-answer could help you :)
Sameer

Reply all
Reply to author
Forward
0 new messages