Upload
doandan
View
212
Download
0
Embed Size (px)
Citation preview
A Hierarchy of Transformations
We would like to examine the following hierarchy of
transformations:
Euclidean ⊂ Similarity ⊂ Affine ⊂ Projective
69
Projective Transformations
We have seen that projective transformations under
composition form a group. This group is called the
projective linear group.
In the projective plane P2, projective linear group is
denoted as PL(3). The elements of this group are
non-singular 3× 3 matrices with real entries.
70
An element of PL(3) is of the form
HP =
a11 a12 tx
a21 a22 ty
v1 v2 v
.
In block matrix form HP can be written as
HP =
A t
vT v
where A is a 2×2 non-singular matrix, t a translation
2-vector, and v = (v1, v2)T .
71
• The most fundamental projective invariant is the
cross ratio of four collinear points.
• A projective transformation HP has 8 degrees of
freedom.
• HP can be computed from 4 point correspondence.
• Transforms: rotation, scaling, translation, shear,
prospective projection.
72
Affine Transformations
A subgroup of PL(3) consisting of matrices having
last row (0,0,1) is called an affine group. An element
of an affine group is the form
HA =
a11 a12 tx
a21 a22 ty
0 0 1
.
74
In block matrix form HA can be written as
HA =
A t
0T 1
where A is a 2×2 non-singular matrix, t a translation
2-vector, and 0 a null 2-vector. The matrix A can be
decomposed as A = R(θ)R(−φ)D R(φ) where R(θ)
and R(φ) are rotations by θ and φ respectively, and D
is a diagonal matrix
D =
λ1 0
0 λ2
.
75
• Parallel lines, ratio of lengths of parallel line seg-
ments, and ratio of areas are three important invari-
ant under affine transformation.
• An affine transformation HA has 6 degrees of free-
dom.
• HA can be computed from 3 point correspondence.
• Transforms: rotation, scaling, translation, shear.
76
φ
deformationrotation
θ
Distortions from a affine transformation.
Rotation by R(θ), and a deformation by
R(−φ)D R(φ).
77
Similarity Transformations
Similarity transformations are a subset of affine trans-
formations. A similarity transformation is the form
HS =
s cos(θ) −s sin(θ) tx
s sin(θ) s cos(θ) ty
0 0 1
.
78
In block matrix form HS can be written as
HS =
sR t
0T 1
where R is a 2×2 non-singular matrix called a rotation
matrix, s an isotropic scaling, t a translation 2-vector,
and 0 a null 2-vector. The matrix R is given by
R =
cos(θ) − sin(θ)
sin(θ) cos(θ)
.
79
• Angles between lines, ratio of two lengths, ratio of
areas are invariant under similarity transformation.
• A similarity transformation HS has 4 degrees of free-
dom.
• HS can be computed from 2 point correspondence.
• Transforms: rotation, scaling, translation.
80
Euclidean Transformations
Euclidean transformations are a subset of similarity
transformations. A Euclidean transformation is the
form
HE =
cos(θ) − sin(θ) tx
sin(θ) cos(θ) ty
0 0 1
81
Euclidean transformations preserve distance and hence
are also known as isometries.
In block matrix form HE can be written as
HE =
R t
0T 1
where R is a rotation matrix, t a translation 2-vector,
and 0 a null 2-vector.
82
• Angles between lines, length between two points,
and area are invariant under Euclidean transforma-
tions.
• A Euclidean transformation HE has 3 degrees of
freedom.
• HE can be computed from 2 point correspondence.
• Transforms: rotation, translation.
83
Decomposition of H
A projective transformation H can be decomposed
into a chain of transformations, where each matrix
in the chain represents a transformation higher in the
hierarchy than the previous one.
H =
A t
vT v
=
sR t
0T 1
R 0
0T 1
I 0
vT v
= HS HA HP
The decomposition is valid if v 6= 0 and unique if s > 0.84
Example The projective transformation
H =
1.707 0.586 1.0
2.707 8.242 2.0
1.0 2.0 1.0
may be decomposed as
H =
2cos 45o −2 sin 45o 1
2 sin 45o 2cos 45o 2
0 0 1
0.5 1 0
0 2 0
0 0 1
1 0 0
0 1 0
1 2 1
.
85
Number of Invariants
Result 1.7. The number of functionally independent
invariants is equal to or greater than the number of
degrees of freedom of the configuration minus the
number of degrees of freedom of the transformation.
Example 1. The number of invariants for a configu-
ration of 4 points under an affine transformation is at
least 8− 6 = 2.86
Overview of transformations
1002221
1211
y
x
taa
taa
1002221
1211
y
x
tsrsr
tsrsr
333231
232221
131211
hhh
hhh
hhh
1002221
1211
y
x
trr
trr
Projective
Affine
Similarity
Euclidean .
88
Projective Geometry of 1D
The projective geometry of a line, P, can be developed
similar to P2. A point x on the line is represented by
homogeneous coordinates (x1, x2)T . A point for which
x2 = 0 is called an ideal point or point at infinity. The
point (x1, x2)T will be denoted by the 2-vector x.
89
• A projective transformation on a line is represented
by a 2 × 2 homogeneous matrix H2×2 and has 3 de-
grees of freedom.
• A projective transformation on a line can be deter-
mined from a three points correspondence.
90
Cross Ratio
Given four points x1, x2, x3 and x4, the cross ratio is
defined as
Cross(x1,x2,x3,x4) =|x1 x2| |x3 x4||x1 x3| |x2 x4|
where
|xi xj| =∣∣∣∣∣∣xi1 xj1
xi2 xj2
∣∣∣∣∣∣ .91
Cross ratio simplifies to
Cross(x1,x2,x3,x4)
=(x11 x22 − x21 x12)(x31 x42 − x41 x32)
(x11 x32 − x31 x12)(x21 x42 − x41 x22)
=(x12 x22)(x32 x42)
(x12 x32)(x22 x42)
(x11x12− x21
x22
) (x31x32− x41
x42
)(
x11x12− x31
x32
) (x21x22− x41
x42
)
=
(x11x12− x21
x22
) (x31x32− x41
x42
)(
x11x12− x31
x32
) (x21x22− x41
x42
)
=(x1 − x2)(x3 − x4)
(x1 − x3)(x2 − x4).
92
Some Facts about Cross Ratio
• The value of cross ratio is independent of which
homogeneous coordinates is used.
• If the second coordinate is 1 for each of the point
xi and xj, then |xi xj| represents the signed distance
from xi and xj.
• The value of the cross ratio is invariant under any
projective transformation of the line.93
Projective transformations between lines
Each set of four collinear points is related to the oth-
ers by a line-to-line projectivity, and the value of the
cross ratio of each set is same.
94
Concurrent lines
In projective projective plane P2 we have seen that
lines are dual to points.
In projective line P, lines are also dual to points.
95
ll
l
l
l
xx
x
x 1
1
2
2
3
4
4
3
A configuration of concurrent lines is a dual to collinear
points on a line. Hence the value of the cross ratio of
these lines is given by the cross ratio of the points.
96
1
2
3
l
x
xx
xc
x 1
x2
x3
x 4
4
If c represents a camera center, and the line ` repre-
sents an image line, then the points xi are the projec-
tions of points xi into the image line.
97
• The cross ratio of the points xi characterizes the
the projective configuration of these image points xi.
• The actual position of the image line is not relevant
as far as the projective configuration of the four im-
age points xi is concerned.
• The projective geometry of concurrent lines is im-
portant to the understanding of the projective geom-
etry of epipolar lines (in Chapter 8).
98
Recovering affine and metric
properties from images
• The main affine properties are parallelism of lines,
and ratio of areas.
• The main metric properties (that is up to similarity
properties) are angles between lines, and the ratio
of two lengths.99
A projective transformation has 8 degrees of freedom.
A similarity transformation has 4 degrees of freedom.
So we need only four (that is, 8 − 4 = 4) degrees of
freedom to determine metric properties. In projective
geometry these 4 degrees of freedom are given by the
line at infinity `∞, and the two circular points.
100
The projective distortion may be removed once the
image of `∞ is specified. Similarly, the affine distortion
may be removed once the image of the circular points
is specified.
Thus we examine the image of the line at infinity, and
then the image of two circular points.
101
The line at infinity
Under a projective transformation the line at infinity
`∞ is mapped to a finite line. However, if the trans-
formation is an affine, then `∞ is mapped to `∞. This
follows from the following:
`′∞ = H−TA `∞ =
A−T 0
−t−TA−T 1
001
=
001
= `∞.
102
Result 1.8. The line at infinity, `∞, is a fixed line
under the projective transformation H if and only if H
is an affine transformation.
The identification of `∞ allows one to recover the
affine properties (parallellism, ratio of areas).
103
l
/
π ππ1 2 3
H H
H
P P
A
l = H ( )P
A projective transformation HP maps `∞ on π1 to a
finite line ` on π2. A projective transformation H′P is
constructed such that ` is mapped back to `∞.104
Circular points and their dual
Under any similarity transformation there are two points
on `∞ which are fixed. These are the circular points
I,J with canonical coordinates
I = (1, i,0)T and J = (1,−i,0)T .
106
These circular points are fixed under an orientation-
preserving similarity transformation:
I′ = Hs I =
s cos(θ) −s sin(θ) tx
s sin(θ) s cos(θ) ty
0 0 1
1i0
= s e−iθ
1i0
∼ I.
Result 1.9. The circular points I,J are fixed points
under the projective transformation H if and only if H
is a similarity.
107
I and J are called circular points because every circle
intersect `∞ at the circular points.
The equation of a circle is
x21 + x2
2 + dx1x3 + ex2x3 + fx23 = 0.
The `∞ intersects the circle if x3 = 0. Hence we get
x21+x2
2 = 0 with solution I = (1, i,0)T , J = (1,−i,0)T .
Hence every circle intersects `∞ at circular points.
108