Matrix Representation of Transformations: Translation and Rotation, Assignments of Computer Science

How to represent translation and rotation transformations in matrix form using homogeneous coordinates. It covers both 2-d and 3-d rotations and translations.

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-az1-1
koofers-user-az1-1 🇺🇸

10 documents

1 / 69

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Motion -II
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45

Partial preview of the text

Download Matrix Representation of Transformations: Translation and Rotation and more Assignments Computer Science in PDF only on Docsity!

Motion -II

-^

Structure from Motion

-^

Review of Motion

-^

Review of camera models

-^

Optical Flow

Structure-from-Motion•^

As with stereo, we can divide problem:– Correspondence.– Reconstruction.

-^

Again, we’ll talk about reconstruction first.– Assume that each image contains some points,– we know which points match which

Motion•^

Rigid and Non-Rigid Motion

-^

Rigid motion: all points on the object move together.– Their relative coordinates do not change

Linear Transformations

-^

A

linear transformation

  • Maps one vector to another– Preserves linear combinations -^

Thus behavior of linear transformation iscompletely determined by what it does to a basis

-^

Turns out any linear transform can be representedby a

matrix

Matrices

-^

By convention, matrix element

M

rc

is located at

row

r

and column

c

-^

By convention,vectors are columns:

mn

m

m

2n

22

21

1n

12

11

M

M

M

M

M

M

M

M

M

M

⎤ ⎥ ⎥ ⎥⎦

⎡ ⎢ ⎢ ⎢⎣

2 3 v v v

v

1

Matrix Transformations

-^

A

sequence

or

composition

of linear

transformations corresponds to the product of thecorresponding matrices– Note: the matrices to the

right

affect vector first

  • Note: order of matrices matters! -^

Some (not all) matrices have an inverse:

-^

So we can reverse the transformation

(^

)

(^

)^

v

v M

M

−^1

Transformations•

Modeling transforms– Size, place, scale, and rotate objects parts of the model

w.r.t. each other

  • Object coordinates

world coordinates X Z

Y

Z X

Y

Transformations

-^

Homogeneous coordinates:

represent coordinates

in 3 dimensions with a 4-vector– Denoted [x, y, z, w]

  • Note that typically w = 1 in model coordinates
    • To get 3-D coordinates, divide by w:

[x’, y’, z’] = [x/w, y/w, z/w]

-^

Transformations are 4x4 matrices

-^

Why? To handle translation, rotation and projectionuniformly

Translations

•^

For convenience we usually describe objects in relation totheir own coordinate system–

Solar system example

-^

We can

translate

or move points to a new position by

adding offsets to their coordinates:–

Note that this translates all points uniformly

⎤ ⎥ ⎥ ⎥⎦ ⎡ ⎢ ⎢ ⎢⎣

⎤ ⎥ ⎥ ⎥⎦ ⎡ ⎢ ⎢ ⎢⎣ = ⎤ ⎥ ⎥ ⎥⎦

⎡ ⎢ ⎢ ⎢⎣

xt yt zt

x y z

x y z

' ' '

2-D Rotations

•^

Rotations in 2-D are easy:

-^

3-D is more complicated–

Need to specify an

axis of rotation

-^

Common pedagogy: express rotation about this axis as thecomposition of

canonical rotations

-^

Canonical rotations: rotation about X-axis, Y-axis, Z-axis

(^

)^

⎤ ⎥ ⎦ ⎡ ⎢ ⎣ ⎤ ⎥ ⎦

⎡ ⎢ ⎣

θ

θ

θ

θ

= ⎤ ⎥ ⎦ ⎡ ⎢ ⎣

x y

x y

cos

sin

sin

cos

' '

Scaling•^

Scaling

a coordinate means multiplying each of its

components by a scalar

-^

Uniform scaling

means this scalar is the same for all

components:

×

Scaling

-^

Scaling operation:

-^

Or, in matrix form:

⎤ ⎥ ⎥ ⎥⎦

⎡ ⎢ ⎢ ⎢⎣

⎤ ⎥ ⎥ ⎥⎦

⎡ ⎢ ⎢ ⎢⎣

ax by^ cz

x y z

' ' '

⎤ ⎥ ⎥ ⎥⎦ ⎡ ⎢ ⎢ ⎢⎣ ⎤ ⎥ ⎥ ⎥⎦

⎡ ⎢ ⎢ ⎢⎣

⎤ ⎥ ⎥ ⎥⎦

⎡ ⎢ ⎢ ⎢⎣

x y z

c

b

a

x y z

0

0

0

0

0

0

' ' '

scaling matrix

2-D Rotation

-^

This is easy to capture in matrix form:

-^

3-D is more complicated– Need to specify an

axis of rotation

  • Simple cases: rotation about X, Y, Z axes

(^

)^

⎤ ⎥ ⎦ ⎡ ⎢ ⎣ ⎤ ⎥ ⎦

⎡ ⎢ ⎣

θ

θ

θ

θ

= ⎤ ⎥ ⎦ ⎡ ⎢ ⎣

x^ y

x y

cos

sin

sin

cos

' '