Lecture 06
Lecture 06
Recap
û pu
or shorter yet:
x = Ru
Recap
1. R is square
2. det R = cos2 ϕ + sin2 ϕ = 1
3. the column vectors c1 and c2 of R are orthonormal
4. the row vectors r1 and r2 of R are orthonormal
5. R−1 = RT
Recap
1. R is square
2. det R = cos2 ϕ + sin2 ϕ = 1
3. the column vectors c1 and c2 of R are orthonormal
4. the row vectors r1 and r2 of R are orthonormal
5. R−1 = RT
⇔ R ∈ SO2 (R)
Recap
1. R is square
2. det R = cos2 ϕ + sin2 ϕ = 1
3. the column vectors c1 and c2 of R are orthonormal
4. the row vectors r1 and r2 of R are orthonormal
5. R−1 = RT
⇔ R ∈ SO2 (R)
note:
I matrix multiplication is not generally commutative
Recap
example
g̃(SRu) g̃(RSu)
Recap
linear transformations
I affine transformations in a 2D space (i.e. in a
coordinate plane) that can be realized through
of matrix multiplications are linear transformations
Recap
linear transformations
I affine transformations in a 2D space (i.e. in a
coordinate plane) that can be realized through
of matrix multiplications are linear transformations
I a transformation T is linear, if, for vectors u and v
and a scalar α, it is characterized by
linear transformations
I affine transformations in a 2D space (i.e. in a
coordinate plane) that can be realized through
of matrix multiplications are linear transformations
I a transformation T is linear, if, for vectors u and v
and a scalar α, it is characterized by
note:
I a translation in a 2D space can not be realized by
means of matrix multiplication
Recap
or equivalently:
x = Mu + t
Recap
or equivalently:
x = Mu + t
note:
homogeneous coordinates
I borrow an idea from projective geometry, namely
embed the n-dim space in an n + 1-dim space
Coordinate Systems and Transformations
homogeneous coordinates
I borrow an idea from projective geometry, namely
embed the n-dim space in an n + 1-dim space
I for a 2D plane we have
wx
x
→ wy
y
w
Coordinate Systems and Transformations
homogeneous coordinates
I borrow an idea from projective geometry, namely
embed the n-dim space in an n + 1-dim space
I for a 2D plane we have
wx
x
→ wy
y
w
metaphor
I visualization / geometric interpretation of the transition to
homogeneous coordinates
y
⇒
x
Coordinate Systems and Transformations
homogeneous coordinates
I in homogeneous coordinates, affine transformations
in the plane can be expressed by means of a matrix
multiplication, for instance
x a x+a 1 0 a x
y + b = y + b = 0 1 b y
1 0 1 0 0 1 1
Coordinate Systems and Transformations
homogeneous coordinates
I in homogeneous coordinates, affine transformations
in the plane can be expressed by means of a matrix
multiplication, for instance
x a x+a 1 0 a x
y + b = y + b = 0 1 b y
1 0 1 0 0 1 1
note:
Question:
I how do we rotate about an arbitrary point p?
Coordinate Systems and Transformations
Question:
I how do we rotate about an arbitrary point p?
Answer:
I by mans of the following algorithm
1. change into a coordinate system, where p is the origin, i.e.
carry out the translation O → O 0 = p
2. carry out the desired rotation in this new system
3. carry out the back transformation O 0 → O
Coordinate Systems and Transformations
Question:
I how do we rotate about an arbitrary point p?
Answer:
I by mans of the following algorithm
1. change into a coordinate system, where p is the origin, i.e.
carry out the translation O → O 0 = p
2. carry out the desired rotation in this new system
3. carry out the back transformation O 0 → O
example
I rotation of 12◦ about the origin or the center of an image
Coordinate Systems and Transformations
I how to proceed?
Coordinate Systems and Transformations
2 × 33 + 1 × 32 = 63
or
3 × 32 = 27
operations . . .
Coordinate Systems and Transformations
nevertheless . . .
Coordinate Systems and Transformations
nevertheless . . .
I given that an image contains M × N pixels,
it is preferable to compute the composition
before applying it to every pixel
Coordinate Systems and Transformations
polar coordinates
I points in the plane do not necessarily have to be
addressed by means of coordinates w.r.t. an axial
coordinate system
Coordinate Systems and Transformations
polar coordinates
I points in the plane do not necessarily have to be
addressed by means of coordinates w.r.t. an axial
coordinate system
I they may also be referenced by means of a the length
of a line segment and an angle
y y
py
p p
px x x
Coordinate Systems and Transformations
polar coordinates
I (r, ϕ) are called planar polar coordinates
Coordinate Systems and Transformations
polar coordinates
I (r, ϕ) are called planar polar coordinates
polar coordinates
I (r, ϕ) are called planar polar coordinates
polar coordinates
I the point for which r = 0 is called the pole
Coordinate Systems and Transformations
polar coordinates
I the point for which r = 0 is called the pole
I the axis for which ϕ = 0◦ is called the polar axis
Coordinate Systems and Transformations
polar coordinates
I the point for which r = 0 is called the pole
I the axis for which ϕ = 0◦ is called the polar axis
I the angle ϕ is measured counterclockwise with respect to
the polar axis (i.e. the x-axis) and is usually referred to as
the azimuth
Coordinate Systems and Transformations
note:
note:
note:
The atan2() and atan2f() functions compute the principal value of the arc
tangent of y/x, in the interval [-pi,pi] radians. The sign of atan2() and
atan2f() is determined by the sign of y. The value of atan2(y,x) is com-
puted as follows where f is the number of fraction bits associated with the
data type.
_____________________________________________________
Value of Input Arguments Angle Returned
_____________________________________________________
x = 0 or y/x > 2**(f+1) pi/2 * (sign y)
x > 0 and y/x <= 2**(f+1) atan(y/x)
x < 0 and y/x <= 2**(f+1) pi * (sign y) + atan(y/x)
_____________________________________________________
Coordinate Systems and Transformations
example
I image represented in the (r, ϕ) plane
y ϕ
496 π/2
0 x 0 r
0 730 0 882.6
Coordinate Systems and Transformations
example
I image represented in the (r, ϕ) plane
y ϕ
496 π/2
0 x 0 r
0 730 0 882.6
I the pole coincides with the origin (0, 0) of the Euclidean plane
I the polar axis coincides with the x-axis of the Euclidean plane
Coordinate Systems and Transformations
example (cont.)
y ϕ
496 π/2
0 x 0 r
0 730 0 882.6
Coordinate Systems and Transformations
example (cont.)
y ϕ
496 π/2
0 x 0 r
0 730 0 882.6
Coordinate Systems and Transformations
example
I a different transformation (x, y) → (r, ϕ)
ϕ
y
2π
248
0 r
−248 x 431.3
0 365 0
−365
Question:
I what have we done so far?
Outlook on Things to Come
Question:
I what have we done so far?
Answer:
I we looked at
I image acquisition
I image representations
Outlook on Things to Come
Question:
I what have we done so far?
Answer:
I we looked at
I image acquisition
I image representations
I we also looked at
I vector spaces
I coordinate systems
I coordinate transformations
Outlook on Things to Come
Answer (cont.):
I we learned that
I intensity images are matrices G ∈ Rm×n
I intensity images are vectors g ∈ Rm·n
Outlook on Things to Come
Answer (cont.):
I we learned that
I intensity images are matrices G ∈ Rm×n
I intensity images are vectors g ∈ Rm·n
I intensity images are functions g : R2 R
Outlook on Things to Come
Answer (cont.):
I we learned that
I intensity images are matrices G ∈ Rm×n
I intensity images are vectors g ∈ Rm·n
I intensity images are functions g : R2 R
Answer (cont.):
I we learned that
I intensity images are matrices G ∈ Rm×n
I intensity images are vectors g ∈ Rm·n
I intensity images are functions g : R2 R
next, we
I get to know yet another point of view for looking at g(x)
Outlook on Things to Come
next, we
I get to know yet another point of view for looking at g(x)
I understand this point of view and make use of the
interesting possibilities it has to offer
Outlook on Things to Come
next, we
I get to know yet another point of view for looking at g(x)
I understand this point of view and make use of the
interesting possibilities it has to offer