Institut für Elektrische Meßtechnik und Meßsignalverarbeitung Professor Horst Cerjak, 19.12.2005 1 11.3.2008 Augmented Reality VU 1 Projective Geometry Axel Pinz Augmented Reality X Y Z • Real scene, scene coordinate C x C y C z C R, t • Camera(s) x V y V z V • Visualization (screen, HMD) R, t • Real table • Augmented plant
44
Embed
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung Professor Horst Cerjak, 19.12.2005 1 11.3.2008 Augmented Reality VU 1 Projective Geometry.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20051
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Augmented Reality
X
Y
Z
• Real scene, scene coordinates
C
xC
yC
zC
R, t
• Camera(s)
xV
yV
zV
• Visualization (screen, HMD)
R, t
• Real table
• Augmented plant
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20052
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Example 1: ARToolkit
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20053
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Example 2: Structure + Motion [Schweighofer]
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20054
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Pinhole Camera
• “real” camera
image plane πi (u,v): z = -f
uv
zx
y“principal”point (u0,v0) “optical axis”
p(u,v)
P(x,y,z)
f
“focal length” f
• 2D projection 3D scene
• p(u,v) ↔ line of sight = viewing direction
P’(x’,y’,z’)
• “Pinhole” C … “center of projection”
C
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20055
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Geometry
π0 ... z = 0 πi ... z = f
x
z
yxy
uv
p(u,v)
P(x,y,z) P’
P’’
!!!
“projective” camera, “normalized” camera: f = 11 stationary camera 1 coordinate system (x,y,z)camera-centered coordinate system ≡ scene coordinate system
Only points in π0 are not projected to πi
(u0,v0)C
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20056
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Images: Examples, Properties
• Impression of depth in images• Parallel lines meet at infinity• “infinity” is projected to finite
location in the image• “horizon”• “points at infinity”, …
[Triggs and Mohr]
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20057
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Images: Scaling
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20058
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Images: Foreshortening
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.20059
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Images: Parallel Lines Meet
[Sonka, Hlavac, Boyle]
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200510
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Geometry vs. Computer Vision
• points in π1
• straight lines of sight
• projective reconstruction
• geometry, precise
• known correspondences
• discrete pixels in πi
• sampling theorem• lens distortion, aperture, depth of field• “oriented” projective rec. “in front of camera”• inherently imprecise estimation, minimization• “outliers” robustness
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200511
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Example: Stereo Reconstruction
PC1
C2• projective geometry• computer vision
P~
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200512
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
• A unified geometric + algebraic framework
• Point
• Line
Algebraic Projective Geometry (1)
Tyxy
xp 00
0
0 ,
dkxy 0 cbyax
1
0 0
1
y
x
x
c
b
a
lxly
x
c
b
a
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200513
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
• Duality point ↔ line
• Unified approach: projective n-space Pn
point (n+1) - vector
Algebraic Projective Geometry (2)
21 llp
1l
2l
21 ppl
1p
2p
Tnxxx 11 ,,
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200514
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Homogeneous Coordinates in Pn
c
b
a
k
c
b
a
l ~
0 0)()(
0
kkcykbxka
cbyax
Equivalence class of vectors
0
0
03R forms P2 … “projective plane”
Homogeneous coordinates , but only 2 DoFHomogeneous coordinates , but only 2 DoF
inhomogeneousinhomogeneous
3
2
1
x
x
x
y
x
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200515
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Equivalence Class of Vectors
Without further knowledge, such situationsWithout further knowledge, such situationscannot be distingushed !cannot be distingushed !
A further example: Equivalence ofA further example: Equivalence of a toy car, closeup shot, anda toy car, closeup shot, andreal car, distant shotreal car, distant shot
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200516
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200517
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
The Projective Plane (2)
• Adding the ideal points to R2 leads to the projective plane P2
• Covers all homo-geneous coordinates
0
0
0
3
2
1
x
x
x
[Hartley+Zisserman][Hartley+Zisserman]
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200518
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
The Projective Plane (3)
ππ
Image of the “horizon” of π,Image of the “horizon” of π,““line at infinity” of line at infinity” of ππ
vanishing point,vanishing point,„„Fluchtpunkt“ =Fluchtpunkt“ =Bild eines Bild eines „„Fernpunktes“Fernpunktes“
• Projective geometry can map infinitely far points / lines to finite onesProjective geometry can map infinitely far points / lines to finite ones• No difference between finite and infiniteNo difference between finite and infinite• e.g. hyperbola is e.g. hyperbola is one continuousone continuous conic conic
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200519
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
There is also Projective Space P3 …
• Points
• Planes
•
• Lines: 4 DoF
• Dual line L*:
Txxxx
x
x
x
x
p 4321
4
3
2
1
Tdcba
d
c
b
a
a
plane point 0 ap
21
2
1
21
:
, points 2
ppl
p
p
pp
T
T
L
22* 0 TLL
duality point duality point ↔ plane↔ plane duality duality LL ↔ ↔ L*L*
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200520
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Transformations in Pn
• “projective transformation” = “collineation” = “projectivity” = “homography” H
• Invertible mapping Pn →Pn
• „geradentreue“ Abbildung• (n+1) x (n+1) matrix• In P2 :
• H has (n+1)2-1 DoF, H is non-singular
line aon lie ,, line aon lie ,, 321321 xxxxxx
HHH
3
2
1
333231
232221
131211
3
2
1
'
'
'
'
x
x
x
hhh
hhh
hhh
x
x
x
x
x
H
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200521
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Projective Transformations in P2
• Translation
• Rotation
• Scaling
• Any combination, e.g.
xxt
t
x
x TT
'
100
10
01
xxRR
'
100
0cossin
0sincos
xxs
s
y
x SS
'
100
00
00
xxx
MSRTSRTM '
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200522
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
A Remark on Conics
• 2nd degree equation in the plane
• Homog. coord:
• Conic C:
• Five DoF, 5 points define a conic
022 feydxcybxyax
0
/y / 233231
2221
21
3231
fxxexxdxcxxbxax
xxxxx
fed
ecb
dba
xxx T
2/2/
2/2/
2/2/
, 0 on CCC
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200523
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz
Back to Homographies – Examples (1)
Mapping between planesMapping between planes
central projection may be expressed by x’=Hx
[Hartley+Zisserman][Hartley+Zisserman]
Institut für Elektrische Meßtechnik und Meßsignalverarbeitung
Professor Horst Cerjak, 19.12.200524
11.3.2008Augmented Reality VU 1 Projective Geometry Axel Pinz