Upload
others
View
24
Download
0
Embed Size (px)
Citation preview
ProjectiveGeometry
JianboShi
SomeslidestakenfromSteveSeitz
(R,t)
Camera coordinate
y y’fz C
yc
xc
zcp
World coordinate
x=Kr1 r2txw
yw1
Recall for planar surface
X = K H3x3 XWe have the homographic mapping:
H3x3
(R,t)
Camera coordinate
y y’fz C
yc
xc
zcp
World coordinate
x=Kr1 r2txw
yw1
Recall for planar surface
H3x3
This implies if we have H, 1) We can recover the full rotation matrix, R, 2) We can recover the position vector t
Projective Transformation
From Plane to Plane
ProjectivetransformationGoal: study geometry of image projection from one plane to another plane(the image plane).
Facts: 1) parallel lines intersect, 2) circle becomes ellipses, 3) straight line is still straight
Projectivetransformation
Definition: Line remains a line!Projective transform is an invertible mapping from to itself, such that three points lies on a same line iff do.
0 0.5 1
0
0.2
0.4
0.6
0.8
1
0.6 0.8 1 1.2
2
2.2
2.4
2.6
2.8
3
3.2
3.4
x1
x2
x3
h(x1)
h(x2)
h(x3)
• Theorem:
Projectivetransformation
Check what happened to lies on line l?
Line Mapping:
=
x’y’
xy
How many independent para? Can we always set h33 = 1?
Classesof2Dprojectivetransformations
Special case: Similarity TransformationSimilarity
0 0.2 0.4 0.6 0.8 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2
2
2.5
3
3.5
4
4.5
SpecialCase:AffineTransformation
0 0.1 0.2 0.3 0.4 0.5
0
0.05
0.1
0.15
0.2
0.25
0.3
0 0.2 0.4 0.6 0.8 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Special case: Projective transformation
0 0.2 0.4 0.6 0.8 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.1 0.2 0.3 0.4 0.5
0
0.05
0.1
0.15
0.2
0.25
0.3
Example
0.6 0.8 1 1.2
2
2.2
2.4
2.6
2.8
3
3.2
3.40 0.2 0.4 0.6 0.8 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
10 0.1 0.2 0.3
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.1 0.2 0.3 0.4 0.5
0
0.05
0.1
0.15
0.2
0.25
0.3
Example
• Projective
0 0.2 0.4 0.6 0.8 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.1 0.2 0.3 0.4 0.5
0
0.05
0.1
0.15
0.2
0.25
0.3
Example
Affine
0 0.1 0.2 0.3
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.1 0.2 0.3 0.4 0.5
0
0.05
0.1
0.15
0.2
0.25
0.3
Example
0 0.1 0.2 0.3
0
0.1
0.2
0.3
0.4
0.5
0.6
Similarity
0.6 0.8 1 1.2
2
2.2
2.4
2.6
2.8
3
3.2
3.4
Points, Lines & Projective Transformation
Lines under Projective Transformation
•With homogenous coordinates:
•Point:
•Line:
l0 = H�T l
Before transformation
After transformation
Just checking…
• Verify:
Vanishing point, revisited
Points at infinity: Revisited
• Where are the points at infinity in the image plane? – The point at infinity can be in the FINITE region
of the image !
Example
Seeing vanishing point
• vanishing point of horizontal direction:
• In the image plane:
Lineatinfinity:Revisited
• Alinepassingallpointsatinfinity:
Line of infinity
• line of infinity is:
Notice:thisisthelastcolumnof
The line of infinity
ComparingheightsVanishing
Point
Measuringheight
1
2
3
4
55.4
2.8
3.3
Camera height
q1
Computingvanishingpoints(fromlines)
• Intersectp1q1 withp2q2
v
p1
p2
q2
Least squares version• Better to use more than two lines and compute the “closest” point of
intersection• See notes by Bob Collins for one good way of doing this:
– http://www-2.cs.cmu.edu/~ph/869/www/notes/vanishing.txt
Vanishingpoint
Vanishingline
Vanishingpoint
Vertical vanishingpoint
(at infinity)
Criminisi ’99
C
Measuringheightwithoutaruler
groundplane
Compute Y from image measurements• Need more than vanishing points to do this
Y
Measuring height
RH
vz
r
b
t
H
b0
t0
vvx vy
vanishing line (horizon)
Measuring height vz
r
b
t0
vx vy
vanishing line (horizon)
v
t0
m0
What if the point on the ground plane b0 is not known?
• Here the guy is standing on the box
• Use one side of the box to help find b0 as shown above
b0
t1
b1
What if vz is not infinity?
Thecrossratio• AProjectiveInvariant
– Something thatdoesnotchangeunderprojectivetransformations(including perspectiveprojection)
P1
P2
P3
P4
1423
2413
PPPPPPPP
−−
−−
The cross-ratio of 4 collinear points
Can permute the point ordering• 4! = 24 different orders (but only 6 distinct values)
This is the fundamental invariant of projective geometry
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
1i
i
i
i ZYX
P
3421
2431
PPPPPPPP
−−
−−
vZ
rt
b
tvbrrvbt−−
−−
Z
Z
image cross ratio
Measuringheight
B (bottom of object)
T(top of object)
R(reference point)
ground plane
HC
TBRRBT
−∞−
−∞−
scene cross ratio
∞
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
1ZYX
P⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
=
1yx
pscene points represented as image points as
RH
=
RH
=
R
Measuring height
RH
vz
r
b
t
R
H
Z
Z=
−−
−−
tvbr
rvbt
image cross ratio
H
b0
t0
vvx vy
vanishing line (horizon)
Measuring heights of people
Here we go !
reference185.3 cm
Forensic Science: measuring heights of suspects
Vanishing line
Refe
ren
ce h
eig
ht
Reference height
Assessing geometric accuracy
Flagellation, Piero della Francesca
Estimated relative heights
Are the heights of the 2 groups of people consistent with each other?