Year One Progress Report

Download Report

Transcript Year One Progress Report

Multiple View Geometry
Projective Geometry
&
Transformations of 2D
Vladimir Nedović
Intelligent Systems Lab Amsterdam (ISLA)
Informatics Institute, University of Amsterdam
Kruislaan 403, 1098 SJ Amsterdam, The Netherlands
[email protected]
18-01-2008
Outline
Intro to projective geometry
The 2D projective plane
Projective transformations
Hierarchy of transformations
Projective geometry of 1D
Recovery of affine & metric properties from images
More properties of conics
Intro to Projective Geometry
Projective transformation: any mapping of points in
the plane that preserves straight lines
Projective space: an extension of a Euclidean space
in which two lines always meet in a point

parallel lines meet at inf. => no parallelism in proj. space
coordinates in
Euclidean R2
x = x/1
y = y/1
homogeneous
coordinates in P2
(x,y) = (x,y,1) = (kx,ky,k)
k≠0
points at
infinity
(x,y,0) = (x/0,y/0,0) = (∞,∞,0)
Intro to Projective Geometry (cont.)
Euclidean/affine transformation of Euclidean space:
points at infinity remain at infinity
≠
Projective transformation of projective space:
points at infinity map to arbitrary points
(n+1)x(n+1)
non-singular matrix
x’ = H x
a point in Pn,
an (n+1) - vector
In P2, points at infinity form a line, in P3 a plane, etc.
e.g. an image of
the real 3D world
e.g. the real
3D world
The 2D projective plane
Line l in the plane: ax + by + c = 0
– equiv. to
y
a
c
x
b
b
in slope-intercept notation
– thus a line could be represented by a vector (a,b,c)T
Lines and points represented by homogeneous
vectors
(a,b,c)T = k(a,b,c)T
k≠0
(x,y)T = k(x,y)T
A point x lies on line l iff
ax + by + c = (x,y,1)(a,b,c)T = xTl = 0
The 2D projective plane (cont.)
The intersection of two lines l and l’ is the point:
x = l x l’
The line through two points x and x’ can be
analogously written as
l = x x x’
duality
principle
Set of all points at infinity (= ideal points) in P2 (e.g.
(x1,x2,0)T) lies on the line at infinity l∞ = (0,0,1)T
P2 = set of rays in R3 through the origin (see Ch.1)


vectors k(x1,x2,x3)T for diff. k form a single ray (a point in P2)
lines in P2 are planes in R3
The 2D
projective
plane (cont.)
θ
ideal l’
point
l
r1 = k(x1,x2,x3)
r2 = k(x1’,x2’,x3’)
r1
x1x2-plane ≡ l∞ ≡ Ω
l’ є Ω
l, l’, r1, r2 є Λ
r2
x1
θ
x2
x3 = 1
Λ
θ
points in P2 =
rays through
the origin

point x1 = ray r1
lines in P2 are planes
Ω
Fig 2.1
(extended)

e.g. line l is plane Λ
The 2D projective plane (cont.)
Duality principle for 2D projective geometry
– for every theorem there is a dual one, obtained by
interchanging the roles of points and lines
A curve in Euclidean space corresponds to a
conic in projective space
b / 2 d / 2
 a
– defined using points:
xTCx
=0
C is a homog. representation, only
the ratios of elements matter
C   b / 2
c
d / 2 e / 2
– defined using (tangent) lines: lTC-1l = 0
via the equation of a conic tangent at x: l = Cx
C-1 only if C non-singular, otherwise C*
if C not of full rank, the conic is degenerate
e / 2 
f 
Projective transformations
Remember slide 1? Projectivity = homography
= invertible mapping in P2 that preserves lines
– algebraically, mapping described by the matrix H
again only element ratios matter => H = homogeneous matrix
– leaves all projective properties of the figure invariant
Fig. 2.3
(extended)
x1
x1’
central projection
preserves lines =>
a projectivity
Projective transformations (cont.)
Effect of central projection (e.g. distorted shape)
is described by H => inverse transformation
leads back to the original (via H-1)
H can be calculated from 4 point
correspondences (i.e. 8 linear equations)
between the original (e.g. the 3D world) and the
projection (e.g. the image)
Points transform according to H, but lines
transform according to H-1: l’T= lTH-1
For a conic, the transformation is C’ = H-TCH-1
A hierarchy of transformations
Projective transformations form a group, PL(3)
– characterized by invertible 3x3 matrices
In terms of increased specialization:
1. Isometry
2. Similarity
3. Affine
4. Projective
Can be described algebraically (i.e. via the
transform matrix) or in terms of invariants
similarity
affine
projective
A transformation hierarchy:
Isometries
Transformations in R2 preserving Euclidean dist.
– ε is affecting orientation
e.g. in a composition of reflection & Eucl. trans.
if ε = 1, isometry = Euclidean transformation
– Eucl. trans. model the motion of a rigid object
needs 2 point correspondences
rotation matrix
Z  cos
H    sin 
 0
 sin  t x 
cos t y 
0
1 
 R t
HE   T 
0 1
Invariants: length, angle, area
Preserves orientation if det(Z)=1
translation
2-vector
A transformation hierarchy:
Similarity
I.e. isometry + isotropic scaling
– also called equi-form, since it preserves shape
– in its planar form, needs 2 point correspondences
If isometry does not include reflection, matrix is
scaling
factor
 sR t 
HS   T

0
1


Invariants: angles, parallel lines, ratio of lengths
(not length itself!), ratio of areas
Metric structure: something defined up to a
similarity
A transformation hierarchy:
Affine
Non-singular linear transformation + translation
– can be computed from 3 point correspondences
– invariants: parallel lines, ratios of lengths of their segments,
ratio of areas
2x2 non-singular
matrix defining
linear transformation
 A t
HA   T 
0 1
essence of affinity,
separate scaling
in orthog. directions
Can be thought of as the composition of rotations
and non-isotropic scalings
– the affine matrix A is then
A = R(θ)R(-φ)DR(φ),
rotation
by θ
rotation
back by -φ
scaling by
λ1 and λ2
rotation
by φ
1
D
0
0
2 
A transformation hierarchy:
Projective
Most general linear trans. of homog. coords.
–
–
–
–
i.e. the one that only preserves straight lines
affine was as general, but in inhomogeneous coords.
requires 4 point correspondences
the block form of the matrix is
A
HP   T
v
t
v
v = (v1,v2)T
(not null as
with affine =>
non-linear effects)
Invariants: cross-ratio of 4 collinear points (i.e.
the ratio of ratios of line segments)
Comparison of transformations
Affine are between similarities and projectivities:
– angles not preserved => shapes skewed
– but effect homogeneous over the entire plane
– orientation of transformed line depends only on orientation, not
on planar position of source
– ideal points remain at infinity
Projectivities:
– area scaling varies with position
– orientation of trans. line depends on both orientation & position
– ideal points map to finite points (thus vanishing points modeled)
Projectivity can be decomposed into a chain of more
specific transformations:
A = sRK + tvT, det(K) = 1
sR t   K
H  H S H AH P   T
 0T
0
1


0  I
1  vT
0  A
 T

v v
t
v
Projective geometry of 1D
Very similar to 2D
– proj. trans. of the plane implies a 1D proj. trans. of
every line in the plane
Proj. trans. for a line is a 2x2 homog. matrix
– thus 3 point correspondences required
Cross ratio is the basic projective invariant in 1D
Cross(x1 , x 2 , x3 , x 4 ) 
x1 x 2 x 3 x 4
x1 x 3 x 2 x 4
Dual to collinear points are
concurrent lines, also having a P1
geometry
 xi1
xi x j  det 
 xi 2
x j1 
x j 2 
signed distance
from one to another
(if each is a finite point,
and homog. coord. is 1)
Recovery of affine & metric
properties from images
Recover metric properties (i.e. up to a similarity)
1. by using 4 points to completely remove projective
distortion
2. by identifying line at infinity l∞ and two circular points
(i.e. their images)
Affine is the most general trans. for which l∞
remains a fixed line
–
but point-wise correspondence achieved only if the
point is an eigenvector of A
Once l∞ is identified in the image, affine
measurements can be made in the original
–
e.g. parallel lines can be identified, length ratios
computed, etc.
Recovery of affine & metric
properties from images (cont.)
But identified l∞ can also be transformed to l∞ = (0,0,1)T
with a suitable proj. matrix
–
–
such a matrix could be
this matrix can then
be applied to all
points, and affine
measurements
made in the
recovered image
Figure 2.12
1 0
H  H A  0 1
l1 l2
0
0 
l3 
Recovery of affine & metric
properties from images (cont.)
Beside the line at infinity, the two circular points
are fixed under similarity
1
1
–
–
i.e. a pair of complex conjugates
every circle intersects l∞ at these
 
I i
 0
 
 
 
J  i
0
 
Metric rectification is possible if circular points
are transformed into their canonical positions
–
applying the transformation to the entire image results
in a similarity
The degenerate line conic is dual to circ. points
–
–
once it is identified, Euclidean angles and length
rations can be measured
direct metric rectification also possible
Properties of conics
Some point x and some conic C define a line l = Cx
(i.e. a polar of x w.r.t. C)
–
the line intersects the conic at 2 points ->
the tangents at these points intersect at x
The conic induces a map between points & lines of P2
–
–
a projective invariant (involves only intersection & tangency)
called correlation, represented by a 3x3 matrix A: l = Ax
For two points x and y, if x is on the polar of y, then y
is on the polar of x
Any conic is projectively equiv. to one with a diagonal
matrix – classification based on diag. elements
–
hyperbola, ellipse & parabola from Eucl. geom. projectively
equiv. to a circle (still valid in affine geom.)
The End !