You are on page 1of 50

EECE 5639 Computer Vision I

Lecture
Projective Geometry, Geometric Transformation
Hw 1 is poste
Next Clas
Coordinate Systems Transformations, Color

1
4

Projective Geometry
We are all familiar with projective transformations
When we look at pictures
squares are not squares,
circles are not circle
parallel lines are not parallel

2
s

Pinhole Camera Model



(Camera Coordinates)

P
y
Y x p
X f

Z
O

•Non-linear equations
•Any point on the ray OP has image p !!

Weak Perspective Model

P
y
Y x p
Z=Zo + δ
X f

•Object depth δ << Camera distance Zo


•Linear equations !!
4

Projective Plane
The projective plane P2 is the set of equivalence classes of triplets of numbers
(not all zero) where two triplets (x,y,z) and (x’,y’,z’) are equivalent if and only if
there is a real number k such that

(x,y,z) = k(x’,y’,z’)

5
Projective 3D Space
The projective space P3 is the set of equivalence classes of quadruplets of
numbers (not all zero) where two quadruplets (x,y,z,w) and (x’,y’,z’,w’) are
equivalent if and only if there is a real number k such that

(x,y,z,w) = k(x’,y’,z’,w’)

6
Homogeneous Coordinates of 2D Lines
Euclidean representation of a line:
y

ax + by + c = 0 x

kax + kby + kc = 0

(a,b,c), (ka,kb,kc), etc., they form an equivalence


class representing the same line.

7
Homogeneous Coordinates of 2D Lines
Euclidean representation of a line:
0 10 0 1
a x
ax + by + c = 0 @ b A .@ y A = 0
c 1 <latexit sha1_base64="4kPH18v47SybVp5Z3wAa4a9H5vA=">AAACZHicdVFNa9tAEF0pbZO6bqsk9BQoQ01pejFSc0gvISG5FHJJoY4NljGr9cheslqJ3VGJED7nd+UvJKcee8mPKBS6sn1ok3Rgh8d78/bjbVIoaSkMf3j+2pOnz9Y3nrdetF++eh1sbp3bvDQCeyJXuRkk3KKSGnskSeGgMMizRGE/uThp9P53NFbm+htVBY4yPtUylYKTo8ZBHStMCXYhTnAqdc2N4dW8FnPgEMeQNE1AjHqykiA2cjoj+PgBugD/dV82xqpp0WNmOICwNQ46YTdcFDwE0Qp0jk5/Xx3+ur49Gwc38SQXZYaahOLWDqOwoJHbm6RQOG/FpcWCiws+xaGDmmdoR/UipDm8d8wE0ty4pQkW7N+OmmfWVlniJjNOM3tfa8jHtGFJ6edRLXVREmqxPCgtFVAOTeIwkQYFqcoBLox0dwUx44YLcv/ShBDdf/JDcP6pG+11w68ujWO2rA22w96xXRaxfXbEvrAz1mOC/fTWvcDb9O78tr/tv1mO+t7Ks83+Kf/tH0tKuOw=</latexit>

kax + kby + kc = 0 0 10 0 1
a kx
@ b A . @ ky A = 0
c k
<latexit sha1_base64="RRdt09Qlj91NtLYvfr66e77Jun0=">AAACZnicdVFNT9tAEF2btkBoIQVVPfQyAqHSS2TDgV4QiF4q9UKlBpDiKFpvxskq67W1O0ZYls/8Lv5Ce+LcC78BCYl1kkPLx0g7enpv3n68jXMlLQXBjecvvHr9ZnFpubXy9t3qWvv9+qnNCiOwKzKVmfOYW1RSY5ckKTzPDfI0VngWT741+tkFGisz/YvKHPspH2mZSMHJUYN2HSlMCHYginEkdcWN4WVdiRo4RBHETRMQoR7OJYiMHI0JvnyGDsCL7sll45yU0/6cHQ4gaA3aW0EnmBY8BeEcbB39uL86vLv+czJo/46GmShS1CQUt7YXBjn13d4khcK6FRUWcy4mfIQ9BzVP0faraUw1bDtmCElm3NIEU/ZfR8VTa8s0dpMpp7F9rDXkc1qvoORrv5I6Lwi1mB2UFAoogyZzGEqDglTpABdGuruCGHPDBbmfaUIIHz/5KTjd7YR7neCnS+OYzWqJfWKbbIeFbJ8dse/shHWZYH+9ZW/d2/Bu/VX/g/9xNup7c88G+698eACTlroQ</latexit>

• Projective representation of a line:


u’.p = 0

8
Homogeneous Coordinates of 2D Lines

• In the projective representation of a line, one can


alternatively think of p as a point lying on the line u,
or as a line p going through point u:

u’.p = p’.u = 0

In the projective plane, points and lines are DUAL.

9
Intersection of 2D Lines
The intersection of two lines l and l’ is a point x.

x is orthogonal to both l and l’:

10
2D Line Joining Two points
Given two points x and x’, the line l joining the two must satisfy:

l is orthogonal to both x and x’:

11
Intersection of Parallel 2D Lines !!

Example

12
Duality Principle

For any theorem of 2-dimensional projective geometry there is a dual theorem,


which may be derived by interchanging the role of points and lines in the
original theorem

13
A Hierarchy of 2D Transformations

from R.Szeliski

14
Translation
y
y
transform
1

ty
x’ y’
0
0 1 x tx x

equations matrix form


15
Scale
y
y
transform S
x’ y’

0 0 x
0 1 x 0 S

equations matrix form


16
Rotation
y
y
transform
θ x’ y’
1

)
0
0 1 x x

equations matrix form


17
Euclidean (Rigid)

y y
θ
transform x’y’

)
1

ty

0
0 1 x tx x

equations matrix form


18
Partitioned Matrices

2x1 2x2 2x1 2x1

matrix form
1x1 1x2 1x1 1x1

equation form

19
Similarity (scaled Euclidean)

y y x’y’ S
θ
transform

)
1

ty

0
0 1 x tx x

equations matrix form

20
Af ne

y y
x’ y’
transform
1

0
0 1 x x

equations matrix form

21
fi
Projective Transformations
A projective transformation is a LINEAR TRANSFORMATION
between projective spaces
Two important classes
Linear Invertible of Pn into themselves (n=1,2,3) (i.e. P2 to P2
Transformations between P3 and P2 (that model image
formation)

22
:

Projective Transformations


✔ ✗

23
Theorem:
A projective transformation of Pn onto itself is completely determined by its
action on n+2 points.

24
Proof
Consider two corresponding points p and p’ in a P2
projectivity T:

We want to show that T (which has 9 entries) can be


determined by 4 correspondences.

25
Proof
Consider the following 4 points and their images:
These points are the “standard basis” of P2

An use the fact that T is invertible

26
Proof

Etc ... Doing the same for p2 and p3:

27
Proof
Now using p4:

We can nd the entries of the inverse of T up to a constant!

28
fi
Mapping between planes

central projection may be expressed by x’=Hx


(application of theorem)

29

More examples

30
Projective

y y
x’ y’
transform
1

0
0 1 x x
Note!

equations matrix form

31
Co-Vectors
l’
y T
x’

x l
Transforming line equations: x

32
Summary of 2D Transformations

33
Euclidean
Similarity
Affine
Projective
Summary of 2D Transformations

from R.Szeliski
38
Transformation Groups

A mathematical group G is composed of a set of elements


and an associative operator * such that:

1) The set is closed under operator *

2) There exists an identity element I such that

3) Each element A has an inverse A-1 such that

39

Example of a Group
Claim: translations matrices form a group under composition
(matrix multiplication operator)

Group element: matrices of form:

Operator: matrix multiplication *


Note: matrix multiplication is indeed associative
A * (B * C) = (A * B) * C

40


Translation Group (cont)

Verify: closed under composition

41
Translation Group (cont)
Verify: existence of identity element

? ?

42
Translation Group (cont)

Verify: existence of inverse for every element

? ?

43
Example2: Euclidean Group

Closed under composition

= =

Identity exists

Inverse Exists

Check it !

44
Transformation Groups
We have veri ed that translations form a group.

Why does it matter?

Groups are very well-behaved. When doing computations with


groups we can freely compose transformations and assume
inverses exist.

Example T1 state2 T2
state1 state3
?

45

fi

Transformation Groups
We have veri ed that translations form a group.

Why does it matter?

Groups are very well-behaved. When doing computations with


groups we can freely compose transformations and assume
inverses exist.

Inverse exists
T1 state2 T2-1
state1 state3
?

46

fi

Transformation Groups
We have veri ed that translations form a group.

Why does it matter?

Groups are very well-behaved. When doing computations with


groups we can freely compose transformations and assume
inverses exist.

Inverse exists Inverse exists


T1-1 state2 T2-1
state1 state3
?

47

fi

Transformation Groups
We have veri ed that translations form a group.

Why does it matter?

Groups are very well-behaved. When doing computations with


groups we can freely compose transformations and assume
inverses exist.

Inverse exists Inverse exists


T1-1 state2 T2-1
state1 state3
T1-1 * T2-1
closed under composition
48

fi

Hierarchy of Transformations

projective

affine
subgroup
hierarchy
similarity

Euclidean

49

Composition in a Hierarchy

projective
similarity * similarity = similarity
affine
similarity * affine = affine
similarity
Euclidean * affine = affine
Euclidean
any * projective = projective

50

You might also like