1 Basic geometric concepts to understand Affine, Euclidean geometries (inhomogeneous coordinates)...
-
date post
19-Dec-2015 -
Category
Documents
-
view
225 -
download
3
Transcript of 1 Basic geometric concepts to understand Affine, Euclidean geometries (inhomogeneous coordinates)...
1
Basic geometric concepts to understand
• Affine, Euclidean geometries (inhomogeneous coordinates)
• projective geometry (homogeneous coordinates)
• plane at infinity: affine geometry
2
prod.dot with nn AE inf.at pts nn RPnA
nR
Naturally everything starts from the known vector space
Intuitive introduction
3
• Vector space to affine: isomorph, one-to-one
• vector to Euclidean as an enrichment: scalar prod.
• affine to projective as an extension: add ideal elements
Pts, lines, parallelism
Angle, distances, circles
Pts at infinity
4
P2 and R2
0 inf.at line and
,0 pts finitefor :
3
3
3
1
3
1
3
2
1
x
x
x
xx
x
x
x
x
22 RP
01 pts finite
1
: 3
xy
x
y
x22 PR
Relation between Pn (homo) and Rn (in-homo):
Rn --> Pn, extension, embedded in
Pn --> Rn, restriction,
5
Examples of projective spaces
• Projective plane P2
• Projective line P1
• Projective space P3
6
Pts are elements of P2
Projective plane
4 pts determine a projective basis 3 ref. Pts + 1 unit pt to fix the scales for ref. pts
Relation with R2, (x,y,0), line at inf., (0,0,0) is not a pt
Pts at infinity: (x,y,0), the line at infinity
Space of homogeneous coordinates (x,y,t)
Pts are elements of P2
7
Line equation:
21TT
21 ,00),,det( xxlxlxxx
Lines:
21 xxx
Linear combination of two algebraically independent pts
Operator + is ‘span’ or ‘join’
8
Point/line duality:
• Point coordinate, column vector
• A line is a set of linearly dependent points
• Two points define a line
• Line coordinate, row vector
• A point is a set of linearly dependent lines
• Two lines define a point
• What is the line equation of two given points?• ‘line’ (a,b,c) has been always ‘homogeneous’ since high school!
0T xl 0T lx
9
Given 2 points x1 and x2 (in homogeneous coordinates), the line connecting x1 and x2 is given by
Given 2 lines l1 and l2, the intersection point x is given by
21T xxl
T2
T1 llx
NB: ‘cross-product’ is purely a notational device here.
10
Conics: a curve described by a second-degree equation0..... T2 Cxxcbxyax
• 3*3 symmetric matrix
• 5 d.o.f
• 5 pts determine a conic
Conics
11
Projective line
Finite pts:
Infinite pts: how many?
A basis by 3 pts
Fundamental inv: cross-ratio
Homogeneous pair (x1,x2)
12
• Pts, elements of P3
• Relation with R3, plane at inf.
• planes: linear comb of 3 pts
• Basis by 4 (ref pts) +1 pts (unit)
321 xxxx
Projective space P3
13
planes
0),,,det( 321 xxxx
044332211 xuxuxuxu
0
3
2
1
u
x
x
x
T
T
T
In practice, take SVD
14
Key points
• Homo. Coordinates are not unique
• 0 represents no projective pt
• finite points embedded in proj. Space (relation between R and P)
• pts at inf. (x,0) missing pts, directions
• hyper-plane (co-dim 1):
• dualily between u and x,
0T xu
0T ux
15
110
1
1222 y
x
y
xtR
2D general Euclidean transformation:
110
1
1222 y
x
y
xtA
2D general affine transformation:
t
y
x
t
y
x
33A
2D general projective transformation:
Introduction to transformation
ColinearityCross-ratio
16
Projective transformation= collineation = homography
Consider all functions nn : f PP
All linear transformations are represented by matrices A
Note: linear but in homogeneous coordinates!
1)(n1)(n A
17
How to compute transformatins and canonical projective coordinates?
18
Geometric modeling of a camera
u
v
X
u
O
X’
u’
P3
P2
How to relate a 3D point X (in oxyz) to a 2D point in pixels (u,v)?
19
Z
Y
f
y
Z
X
f
x ,
X
Y
Z
xy
u
v
X
x
O
f
Camera coordinate frame
20
xo
y
u
v
X
Y
Z
x y
u
v
X
xO
f
Image coordinate frame
21
• Focal length in horizontal/vertical pixels (2) (or focal length in pixels + aspect ratio)• the principal point (2)• the skew (1)
5 intrinsic parameters
one rough example: 135 film
In practice, for most of CCD cameras:
• alpha u = alpha v i.e. aspect ratio=1• alpha = 90 i.e. skew s=0• (u0,v0) the middle of the image• only focal length in pixels?
22
Xw Yw
Zw
Xw
X
Y
Z
xy
u
v
X
x
O
f
World (object) coordinate frame
23
World coordinate frame: extrinsic parameters
1
1
1w
w
w
c
c
c
Z
Y
X
Z
Y
X
0
tR
Relation between the abstract algebraic and geometric models is in the intrinsic/extrinsic parameters!
6 extrinsic parameters
24
11
11
4333 Z
Y
X
Z
Y
X
v
u
pixel
C0
tR0IK
Finally, we have a map from a space pt (X,Y,Z) to a pixel (u,v) by
25
It turns the camera into an angular/direction sensor!
Direction vector: uKd -1
What does the calibration give us?
uKx -1Normalised coordinates:
26
Camera calibration
ii Xu Given
• Estimate C• decompose C into intrinsic/extrinsic
from image processing or by hand
27
Decomposition
• analytical by equating K(R,t)=P
28
Pose estimation = calibration of only extrinsic parameters
33ii , KXu• Given
• Estimate R and t
29
3-point algebraic method
• First convert pixels u into normalized points x by knowing the intrinsic parameters
• Write down the fundamental equation:
• Solve this algebraic system to get the point distances first
• Compute a 3D transformation
222 cos2 ijjiijji dxxxx
3 reference points == 3 beacons
30
given 3 corresponding 3D points:
3D transformation estimation
• Compute the centroids as the origin• Compute the scale • (compute the rotation by quaternion)• Compute the rotation axis• Compute the rotation angle
31
Linear pose estimation from 4 coplanar points
Vector based (or affine geometry) method
O
A
B
CD
x_a
x_d
32
Midterm statistics
Total 71.80392157 16.30953047
Q1: 14.98039216 5.82920302
Q2: 12.03921569 6.141533308
Q3: 14.56862745 4.817696138
Q4: 12.35294118 7.638909685
Q5: 14.90196078 7.105645367
Q6: 7.254901961 4.511510334
0~59 7
60~69 12
70~79 17
80~89 8
90~99 5
100 2