Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 –...
Transcript of Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 –...
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Direction Cosines
=
=
=
=
=
zXyXxX
mmm
ZYX
mmmmmmmmm
ZYX
zyx
coscoscos
coscoscos
001
right on the [1,0,0]r unit vecto theof image caselower heconsider t
31
21
11
333231
232221
131211
γβα
M
M
=
zZzYzX
yZyYyXxZxYxX
coscoscos
coscoscoscoscoscos
be wouldcosinesdirection viaexpressed Mmatrix full thetherefore
M
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Example 1, approximate the matrix
−
=
−
==+≈=
1000866.05.005.0866.0
1000cossin0sincos
)30(30
κκκκ
κθ
κMM
oz
=
hNE
zyx
M
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Example 2, approximate the matrix
x
y
E
N
−
=
−
==+≈=
100001010
1000cossin0sincos
)90(90
κκκκ
κθ
κMM
oz
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Example 3, approximate the matrix
−−
−=
−=
−−−−−
=
+≈=
−≈=
==
9063.02113.03660.04226.04532.07849.008660.05000.0
)25cos()25sin(0)25sin()25cos(0
001
1000)60cos()60sin(0)60sin()60cos(
25
60
using eapproximat
M
M
M
MMMMM zx
ω
κ
κω
θω
θκo
o
x
z
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Example 4, approximate the matrix
X
Z
Y
xy
z
)110()90()2090( zzx MMMM −=
−−−−
=
=
3420.08830.03214.09397.03214.01170.003420.09397.0
M
MZY
X
zy
x
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
−+−−−+
=ϕωϕωϕ
κϕωκωκϕωκωκϕκϕωκωκϕωκωκϕ
coscoscossinsinsinsincoscossinsinsinsincoscossincoscossincossinsincossinsinsincoscoscos
M
arctanargument 2
coscostan
quadrantcorrect get toarctanargument -2 use :note
coscos
tan
valuespossible 2 :note)(sin
11
211-
33
321
311
−=
−=
=
−
−
φφκ
φφ
ω
φ
mm
mm
m
Extract the Angles for Order: ωφκ
What if phi = 90 deg ?, i.e. cos 90 = 0
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Special case: phi=90 deg
lock gimbal asknown also singularor ant indetermin isit
,for solution unique no
matrix sameyields sum same with , ofpair any
001)sin()cos(0
)cos()sin(0
sincoscossin)sin(sinsincoscos)cos(
:identities trigrecall
001sincoscossinsinsincoscos0coscossinsincossinsincos0
=>=>=>
=>
+++−+
=
+=+−=+
+−−+
=
κω
κω
κωκωκωκω
κωκωκωκωκωκωκωκω
M
M
babababababa
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
1
thatconstraint need weso parameterst independen 3only
)(2)(2)(2)(2)(2)(2
2222
2222
2222
2222
=+++
+−−−++−+−−−+−−+
=
dcba
cbadadbcbdacadbccbadcdabbdaccdabcbad
M
Algebraic parameterization of rotation matrix
Claim: this one does not have singularities as exhibited by the euler angle or sequential rotation method, but also no
easy interpretation of a,b,c,d.
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
1
vectordirection line oflength unit enforcecan ,parameterst independen 3only havemust
cos)cos1(sin)cos1(sin)cos1(sin)cos1(cos)cos1(sin)cos1(sin)cos1(sin)cos1(cos)cos1(
222
2
2
=++
+−+−−−−−+−+−+−−−+−
=
γβα
θθγθαθβγθβθαγθαθβγθθβθγθαβθβθαγθγθαβθθα 2
M
Rotation about a directed line in space
Any rotation can be envisioned as a single rotation (theta) about a directed line in space. The direction of the line is given by its unit components: alpha, beta, gamma.
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
X
Y
Z
XL,YL,ZL
X,Y,Z
f
x
y
a
A
Collinearity Equations for Frame Sensor
−−−
=
−−−
−−−
=
−−−
=
L
L
L
L
L
L
ZZYYXX
mmmmmmmmm
fyyxx
ZZYYXX
fyyxx
333231
232221
131211
0
0
0
0
λ
λ
λ
M
Aa
This is really 3 equations, divide the first two by the third to eliminate the scale parameter, lambda
)()()()()()()()()()()()(
333231
2322210
333231
1312110
LLL
LLL
LLL
LLL
ZZmYYmXXmZZmYYmXXm
fyy
ZZmYYmXXmZZmYYmXXm
fxx
−+−+−−+−+−
=−−
−+−+−−+−+−
=−−
This works for ground points defined by coordinates, what if the “target” is defined only by direction?
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
( )
( ) YYZZfmyymxxmfmyymxxm
XXZZfmyymxxmfmyymxxm
ZZ
YYXX
f
yyxx
ZZYYXX
fyyxx
LL
LL
L
L
L
L
L
L
=+−−+−+−−+−+−
=+−−+−+−−+−+−
−−−
=
−−−
−−−
=
−−−
)()()()()()(
)()()()()()(
by third eqns first two divide
1
left M and lambda bring
33023013
32022012
33023013
31021011
0
0
0
0
TM
M
λ
λ
Rearrange collinearity equations to give position in object space for given image point (with known height)
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
−−−
=
−−−
RZZRYYRXX
mmmmmmmmm
Rfyyxx
L
L
L
/)(/)(/)(
333231
232221
131211
0
0
λ
Divide the vector on the right by its length, R and multiply on the left to keep equality. Now the vector elements on the right are just direction cosines.
Rename them as (CX,CY,CZ)
=
−−−
Z
Y
X
CCC
mmmmmmmmm
Rfyyxx
333231
232221
131211
0
0
λ
Divide as before to eliminate the factor lambda-R
ZYX
ZYX
ZYX
ZYX
CmCmCmCmCmCm
fyy
CmCmCmCmCmCm
fxx
333231
2322210
333231
1312110
++++
=−−
++++
=−−
Now we have the image image points defined only in terms of external directions. This form can be used for stellar photogrammetry where it is more reasonable to use direction rather than coordinates (which would require very large numbers). The direction reference can be chosen in many ways. For stars, two reasonable systems would be (1) the tabulated Right Ascension and Declination, and (2) the local Azimuth and Elevation angles. (Some use Altitude angle instead of Elevation angle)
Directional Control
CE 503 – Photogrammetry I – Fall 2002 – Purdue University
Use of collinearity equations to simulate a perspective view