CS4495/6495 Introduction to Computer Vision 3D-L3 Projective geometry
Recall: The projective plane What is the geometric intuition of using homogenous coordinates? • A point in the image is a
ray in projective space
-y
(sx,sy,s)
(x,y,1) (0,0,0)
-z
x
image plane
The projective plane Each point (x,y) on the plane (at z=1) is represented by a ray (sx,sy,s)
-y
(sx,sy,s)
(x,y,1)
All points on the ray are equivalent: (x, y, 1) (sx, sy, s)
(0,0,0)
-z
x
image plane
Homogeneous coordinates 2D Points: x p y
x p' y 1
x ' p' y' w '
x '/ w ' p y '/ w '
Homogeneous coordinates 2D Lines: a x b y c 0
a
b
x c y 0 1
l a
b
c nx
d
(nx, ny)
ny
d
Projective lines What does a line in the image correspond to in projective space?
𝒍
Projective lines A line is a plane of rays through origin define by the normal 𝑙 = (𝑎, 𝑏, 𝑐)
All rays (x,y,z) satisfying:
𝑎𝑥 + 𝑏𝑦 + 𝑐𝑧 = 0
𝒍
Projective lines In v e c to r n o ta tio n : 0 a
b
l
x c y z
𝒍
p
A line is also represented as a homogeneous 3-vector!
Point and line duality • A line l is a homogeneous 3-vector • It is to every point (ray) p
on the line: lTp=0
l
p1
p2
Point and line duality What is the line l spanned by rays p1 and p2 ? l is to p1 and p2 l = p1 p2 l is the plane normal
l
p1
p2
Point and line duality What is the intersection of two lines l1 and l2 ? p is to l1 and l2 p = l1 l2
l1
p
l2
Points and lines are dual in projective space • Given any formula, can switch the meanings of points and lines to get another formula
Homogeneous coordinates Line joining two points: p
p x
1
1
p x 2
p
2
1
2
y
1
y
2
1 1
l p p 1
2
Homogeneous coordinates Intersection between two lines:
p
a x b y c 0
12
1
1
l a 1
2
2
2
2
b
1
c
1
1
l a
a x b y c 0
1
2
b
2
c
2
p
12
l l 1
2
Quiz How can I tell whether a point p is on a line L in an image? a) Check if p x L is zero. b) Check if p • L is zero. c) Check if the magnitude of the sum is greater than 1.
Quiz – answer How can I tell whether a point p is on a line L in an image? a) Check if p x L is zero. b) Check if p • L is zero. c) Check if the magnitude of the sum is greater than 1.
Point and line duality What is the line l spanned by rays p1 and p2 ? l is to p1 and p2 l = p1 p2 l is the plane normal
l
p1
p2
Ideal points and lines Ideal point (“point at infinity”) p (x, y, 0) – parallel to image plane It has infinite image coordinates
-y
-z
(sx,sy,0) x
image plane
Ideal points and lines Ideal line l (a, b, 0) – normal is parallel to image plane Corresponds to a line in the image (finite coordinates) –goes through image origin (principle point)
(a,b,0) -y
-z
image plane x
3D projective geometry • These concepts generalize naturally to 3D • Recall the equation of a plane:
aX bY cZ d 0 • Homogeneous coordinates Projective 3D points have four coords: p = (wX,wY,wZ,w)
3D projective geometry • Duality • A plane N is also represented by a 4-vector
N = (a,b,c,d) • Points and planes are dual in 3D: NTp = 0 • Projective transformations • Represented by 4x4 matrices T: P’ = TP