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)
-
CUDA_ARCH_BIN Table for gpu type Jetson Products GPU Compute Capability Jetson AGX Xavier 7.2 Jetson Nano 5.3 Jetson TX2 6.2 Jetson TX1 5.3 ...
-
put a explicit parameter name like: from sklearn.utils import class_weight class_weights = class_weight.compute_class_weight( class_weight...
-
look at the code! ^^ .. #load image tif_path = './input_img.tif' #open image pil_image = Image. open ( tif_path ) #change dpi in...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv <-> rgb converting example code. refer to this page -> ht...
-
This is dithering example, it make image like a stippling effect. I referenced to blew website. wiki page: https://en.wikipedia.org/wik...
-
make well divided linear coordinate And make pair coordinate Please see code for detail explanation. import numpy as np import cv2 ...
-
input image output image source code import cv2 as cv import numpy as np import sys import random #read image img = ...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
Just see the code It's not difficult. ... ... import cv2 import numpy as np ... def lambda_handler(event, context): # TODO i...