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)
-
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...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv rgb converting example code. refer to this page -> http://feel...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
The MNIST dataset is a dataset of handwritten digits, comprising 60 000 training examples and 10 000 test examples. The dataset can be downl...
-
fig 1. Left: set 4 points (Left Top, Right Top, Right Bottom, Left Bottom), right:warped image to (0,0) (300,0), (300,300), (0,300) Fi...
-
In the YUV color format, Y is bright information, U is blue color area, V is red color area. Show the below picture. The picture is u-v col...
-
Background subtractor example souce code. OpenCV support about 3 types subtraction algorithm. Those are MOG, MOG2, GMG algorithms. Det...
-
This article explain how to access the thread index when you make block and thread with two dimensions. please refer to this page about me...
-
Video stabilization example source code. The principle is like that... Firstly, to obtain 2 adjacent images extract good feature to t...
-
Created Date : 2010.8 Language : C/C++ Tool : Microsoft Visual C++ 6.0 Library & Utilized : STL Reference : A* i...
No comments:
Post a Comment