open source pkg v1
This commit is contained in:
11
pkg/OpenFace/matlab_version/PDM_helpers/Euler2Rot.m
Normal file
11
pkg/OpenFace/matlab_version/PDM_helpers/Euler2Rot.m
Normal file
@@ -0,0 +1,11 @@
|
||||
function [Rot] = Euler2Rot(euler)
|
||||
|
||||
rx = euler(1);
|
||||
ry = euler(2);
|
||||
rz = euler(3);
|
||||
|
||||
Rx = [1 0 0; 0 cos(rx) -sin(rx); 0 sin(rx) cos(rx)];
|
||||
Ry = [cos(ry) 0 sin(ry); 0 1 0; -sin(ry) 0 cos(ry)];
|
||||
Rz = [cos(rz) -sin(rz) 0; sin(rz) cos(rz) 0; 0 0 1];
|
||||
|
||||
Rot = Rx * Ry * Rz;
|
||||
Reference in New Issue
Block a user