There are many expression to show the rotation value.
(Ex. : Euler, Matrix, Quaternion.. )
This code is the test source to convert each other.
Euler -> Matrix -> Quanternion -> Matrix -> Euler
We can show the first Euler value is same with the last Euler value.
The source code is like below:
--------------------------------------------------------------
% Rotation vector of x,y,z axis.
Rv = [13 20 50];
% 3x3 matrix of R vector (Results of the Rm1 and Rm2 is similar.)
Rm1 = rodrigues(Rv*pi/180)
Rm2 = mRotMat(Rv)
% Quntenion vector of R matrix
Rq1 = matrix2quaternion(Rm1)
Rq2 = matrix2quaternion(Rm2)
% R matrix of Q vector
Rm1_1 = quaternion2matrix(Rq1)
Rm2_2 = quaternion2matrix(Rq1)
% R vector of R matrix
Rv_1 = rodrigues(Rm1_1(1:3,1:3)) * 180/pi
Rv_2 = rodrigues(Rm2_2(1:3,1:3)) * 180/pi
-----------------------------------------------------------------------
<Source Code>
The copyright of "rodrigues' and 'quaternion' functions is reserved by Peter Kovesi.
I wish this source code is useful to you.
Thank you.
11/07/2011
Rotation Matrix Converting Matlab Source (Euler Angle, Rotation Matrix, Quanternion)
Subscribe to:
Post Comments (Atom)
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
My Environment : MS VS 2008 & MFC(Dialog Based) Joy Stick : Logitech Extreme 3D pro (XBox Type) Cteated Date : 2012. 03 [source code]...
-
Created Date : 2011.10 Language : C/C++ Tool : Microsoft Visual C++ 2008 Library & Utilized : OpenCV 2.3 Reference : SIFT referenc...
-
This is GPU version of this page -> http://feelmare.blogspot.kr/2013/12/finding-largest-subset-images-that-is.html Please refer detail ...
-
Created Date : 2007.8 Language : C/C++ Tool : Microsoft Visual C++ 6.0 (MFC) Library & Utilized : - Reference : Simplified approach ...
-
This is example class creation. RotatedRect tRect(Point2f(p2.x, p2.y), Size2f(W,H), atan(mn.first)*180/3.1415); In Here, p2.x, p2.y is ...
-
numberList = [ 1 , 2 , 3 , 4 , 5 ] strList = [ 'one' , 'two' , 'three' , 'five' ] # No iterables are passe...
-
If there are 3 point(c, p1, p2), as shown in the above figure. This function got the angle between the two lines using inner product...
No comments:
Post a Comment