Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 –...

13
CE 503 – Photogrammetry I – Fall 2002 – Purdue University Direction Cosines = = = = = zX yX xX m m m Z Y X m m m m m m m m m Z Y X z y x cos cos cos cos cos cos 0 0 1 right on the [1,0,0] r unit vecto the of image case lower he consider t 31 21 11 33 32 31 23 22 21 13 12 11 g b a M M = zZ zY zX yZ yY yX xZ xY xX cos cos cos cos cos cos cos cos cos be would cosines direction via expressed M matrix full the therefore M

Transcript of Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 –...

Page 1: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 2: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 3: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

CE 503 – Photogrammetry I – Fall 2002 – Purdue University

Example 2, approximate the matrix

x

y

E

N

=

==+≈=

100001010

1000cossin0sincos

)90(90

κκκκ

κθ

κMM

oz

Page 4: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 5: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 6: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 7: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 8: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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.

Page 9: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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.

Page 10: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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?

Page 11: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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)

Page 12: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

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

Page 13: Direction Cosines - Purdue Engineeringbethel/rot.pdfCE 503 – PhotogrammetryI – Fall 2002 – Purdue University Special case: phi=90 deg also known as gimbal lock it is indeterminant

CE 503 – Photogrammetry I – Fall 2002 – Purdue University

Use of collinearity equations to simulate a perspective view