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)
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
OpenCV has AdaBoost algorithm function. And gpu version also is provided. For using detection, we prepare the trained xml file. Although...
-
There is shape match function in the OpenCV. The function name is cvMatchShapes. This function compares two contours. If two contours is ...
-
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...
-
The MNIST dataset is a dataset of handwritten digits, comprising 60 000 training examples and 10 000 test examples. The dataset can be downl...
-
It is simple and easy but I can not remember the code well when I need this code. So I leave this code in my blog. And I hope the code is ...
-
Mr. Juan ask me that to categorize camera movement rate into big, middle, small. He is researching to find meaningful scene in endoscopic v...
-
I had a brief introduction about matlab coder in here. http://study.marearts.com/2016/02/matlab-coder-simple-test-and-practical.html Well...
No comments:
Post a Comment