-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetRoTran.m
More file actions
34 lines (31 loc) · 990 Bytes
/
getRoTran.m
File metadata and controls
34 lines (31 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function [mR mT]=getRoTran(camPar)
%
%
% (C) Anton Andriyenko, 2012
%
% The code may be used free of charge for non-commercial and
% educational purposes, the only requirement is that this text is
% preserved within the derivative work. For any other purpose you
% must contact the authors for permission. This code may not be
% redistributed without written permission from the authors.
%%% Rotation Translation %%%
mT=[camPar.mExt.mTx;camPar.mExt.mTy;camPar.mExt.mTz];
sa = sin(camPar.mExt.mRx);
ca = cos(camPar.mExt.mRx);
sb = sin(camPar.mExt.mRy);
cb = cos(camPar.mExt.mRy);
sg = sin(camPar.mExt.mRz);
cg = cos(camPar.mExt.mRz);
mR11 = cb * cg;
mR12 = cg * sa * sb - ca * sg;
mR13 = sa * sg + ca * cg * sb;
mR21 = cb * sg;
mR22 = sa * sb * sg + ca * cg;
mR23 = ca * sb * sg - cg * sa;
mR31 = -sb;
mR32 = cb * sa;
mR33 = ca * cb;
mR=[mR11 mR12 mR13;
mR21 mR22 mR23;
mR31 mR32 mR33];
end