• Tidak ada hasil yang ditemukan

Projective 2D Geometry

N/A
N/A
Protected

Academic year: 2024

Membagikan "Projective 2D Geometry"

Copied!
19
0
0

Teks penuh

(1)

Prof. Kyoung Mu Lee

SoEECS, Seoul National University

Multiple View Geometry (Spring '08)

Projective 2D Geometry 1

Multi View Geometry (Spring '08)

Projective 2D Geometry

K. M. Lee, EECS, SNU Projective 2D Geometry 2

Homogeneous representation of lines and points

• Lineequation:

• Homogeneous representation of lines

• Homogeneous representation of point(x,y) on

• homogeneous point inhomogeneous point 0 )

1 , , ( or , 0 ) 1 , , ( 0 ) 1 , , (

0 0

=

=

=

= + +

= + +

kc kb ka y x c

b a k ky kx c

b a y x

kc kby kax c

by ax

0 , ) , ,

(

=k a b c T k l

0 , ) 1 , , ( ) , ,

( =

= kx ky k T k x y T k x

x T

x

x , )

( 1, 2 3

=

x x T

x x x , ) (

3 2 3 1

equivalence class of vectors =homogeneous vectors c T

b a, , )

=( l The set of all equivalence classes inR3(0,0,0)TformsP2

(2)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 3

The point xlies on the line liff xTl=0

The intersection of two lines land l’ is the point (Note ) Ex) intersection of line x=1 (-x+1=0)

and y=1 (-y+1=0) Thus,

Inhomogeneous point (1,1)T

The line passing two points xand x’is

(Note )

l l x= ×

T T, (0, 1,1) )

1 , 0 , 1

( =

= l

l

x x l= ×

0 ) ( )

( × = × =

l l l l l l

0 ) ( )

(x×x x= x×x x=

=1 x

=1 y

Homogeneous representation of lines and points

=

= TT

l L l 0 Lx

L

, of space null the

Projective 2D Geometry 4

Ideal points and the line at infinity

• Intersection of parallel lines

Ideal points(points at infinity):

Line at infinity: which satisfy

• The parallel lines l and l’intersect lin the ideal point (b,-a,0)T, where(b,-a)Tis the line’sdirection

• Thus, the line at infinity is the set of directions of lines in the plane

0 :

) , , (

0 :

) , , (

=

+ +

=

= + +

=

c by ax c b a

c by ax c b a

T T

l l

=

=

×

=

0 )

( a

b c c c b a

c b a

k j i l l x

⎟⎟

⎜⎜

0 0a b Inhomogeneous representation

x T

x, ,0) ( 1 2 )T

1 , 0 , 0

=(

l (x1,x2,0)l =0

l

Example

=1 x x=2

(3)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 5

A model for the projective plane

exactly one line through two points exactly one point at intersection of two lines

Points and lines of P2can be represented by the intersections of rays and planes through the origin by the plane x3=1.

K. M. Lee, EECS, SNU Projective 2D Geometry 6

Duality

• Duality Principle:

9 To any theorem of 2-D projective geometry there corresponds a dual theorem, which may be derived by interchanging the role of points and lines in the original theorem

x l

=0 x lT

=0 l xT

' l l

x= × l=x×x'

(4)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 7

Conics

• Conics: Curve described by 2nd-degree equation in the plane

9 hyperbola, ellipse, and parabola

• Conic equation (inhomogeneous coordinates):

• In homogeneous representation:

• Symmetric, 6 elements but 5 DOF (less one for scale)

3 2 3

1, x y x x

x x

{a:b:c:d:e:f}

=0 Cx xT

=

f e d

e c b

d b a

2 / 2 /

2 / 2

/

2 / 2 /

with C Point conic

Conic coeff. matrix

Projective 2D Geometry 8

Determination of a Conic

• How to determine the conic coeff. matricC?

• Using five points on the conic:

By stacking these 5 constraints, we have

Cis the null vector of 5x6 matrix.

f T

e d c b

a, , , , , )

=( c

(5)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 9

Tangent Line to Conics

x l

C

The line ltangent toCat a pointxonCis given byl= Cx.

K. M. Lee, EECS, SNU Projective 2D Geometry 10

Dual Conics

• Conics that defines an equation on lines: C*

• A line ltangent to the conic Csatisfies , where C* is the adjointmatrix of C.

• In general, for a non-singular symmetric matrix, .

• Dual conics= line conics = conic envelopes

point conic line conic

=0

l C lT

1

=C C

=0

l C lT

=0 Cx xT

(6)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 11

Degenerate Conics

• A conic is degenerateif matrix Cis not of full rank e.g.two lines (rank 2)

e.g.repeated line (rank 1)

• Degenerate line conics: 2 points (rank 2), double point (rank1)

• Note that for degenerate conics

T

T ml

lm C= +

l m

llT

C=

( )

C* *C

Projective 2D Geometry 12

Projective Transformations

• Def) A projectivityis an invertible mapping hfrom P2to itself such that three points x1, x2, x3 lie on the same line iff h(x1),h(x2) and h(x3) do. (line toline mapping)

• Thm) A mapping h: P2→P2is a projectivity iff there exists a non-singular 3x3 matrix Hsuch that h(x) = Hx.

Pf) Letx1, x2, x3 lies on a linel, then

Then, for a non-singularH3x3, all pointsxi=Hxilie on the same linel’=H-Tlsuch that

. 3 , 2 , 1 ,

0 =

= i

i Tx l

0 )

( 1

'

' = = = i=

T i T i T T i

Tx H l Hx l H Hx l x

l

(7)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 13

Projective Transformations

• Def) A planar projective transformationis a linear transformation on homogeneous 3-vectors represented by a non-singular 3x3 matrix:

• Homogeneous matrixH: 8 DOF (less one for scale)

Projectivity = collineation = projective transfromation = homography

Hx x ′ =

K. M. Lee, EECS, SNU Projective 2D Geometry 14

Mapping between Planes

central projectionmay be expressed by x’=Hx (application of theorem)

Distortions by central projection

similarity affine projective

(8)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 15

Examples of Projective Transformations

Projective 2D Geometry 16

Removing the projective distortions

Select four points in a plane with known coordinates

9Inhomogeneous correspondence (x,y) (x’,y’)

9 the eight elements are determined by four point correspondences.

(linear in hij)

(2 constraints/point, 8DOF ⇒4 points needed)

x x

(9)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 17

Transform of lines and conics

• Point transform:

• Transformation of lines:

Note:

• Transformation of conics:

Note:

Hx x=

) (

1

=

=H l l l H

l T T T

0 )

( )

( 1 ′ = 1 ′= ′ ′=

=l Hx l H x l x x

lT T T T

) (

'

1 T

TCH C HCH

H

C= =

K. M. Lee, EECS, SNU Projective 2D Geometry 18

Hierarchy of transformations - Isometries

• Class I: Isometries(iso=same, metric=measure)

• Planar Euclideantransform

• rigid body motion

• 3 DOF (1 rotation, 2 translation)

• 2 point correspondences

• Invariants: length, angle and area

ε=1 : orientation-preserving ε=-1: reverse orientation

R : 2x2 rotation matrix (orthogonal) t : translation 2-vector

I R RT =

(10)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 19

Similarity transformations

• Class II: Similarity transformations(isometry + scale):

Equi-formtransformation, preserves shape.

• 4 DOF (1 scale, 1 rotation, 2 translation)

• 2 point correspondences

• Invariants: angles, ratio of lengths and areas, parallel lines

Metric structure= structure defined up to a similarity

s : isotropic scaling

I R RT =

Projective 2D Geometry 20

Affine transformations

• Calss III: Affine transformations:

• 6 DOF (2 scale, 2 rotation, 2 translation)

• Three point correspondences

• Invariants: parallel lines, ratio of lengths of parallel line segments, ratio of areas

A : non-singular matrix

non-isotropic scaling

(2DOF: scale ratio and orientation)

(11)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 21

Projective transformations

• Case IV: projective transformations:

• 8 DOF (2 scale, 2 rotation, 2 translation, 2 line at infinity)

• Action non-homogeneous over the plane

• 4 point correspondences

• Invariants: cross ratio (ratio of ratios) of four collinear points

( 1, 2)T

v= v v

K. M. Lee, EECS, SNU Projective 2D Geometry 22

Summary

(12)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 23

Action of affinities and projectivities on line at infinity

• Line at infinity (ideal point) stays at infinity for affine transform, but points move along line

9Parallel line are still parallel

Line at infinity (ideal point) becomes finite for perspective transform, allows to observe vanishing points, horizon

⎟⎟

⎜⎜

=

0 0

0 2

1 2

1

x x x

x v A A

T

t

+

⎟⎟

⎜⎜

=

2 2 1 1

2 1 2

1

v 0

x v x v

x x x

x v A A

T

t

Projective 2D Geometry 24

Decomposition of a projective transformation

Hcan be decomposed as

• Ex

A : non-singular matrix, A = sRK + tvT K : upper-triangular matrix with detK=1 v 0, s is positive

(13)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 25

Number of invariants

• The number of functional invariants is equal to, or greater than, the number of degrees of freedom of the configuration less the number of degrees of freedom of the transformation

• e.g. configuration of 4 points in general position has 8 dof (2/pt) and so 4 similarity, 2 affinity and zero projective invariants

K. M. Lee, EECS, SNU Projective 2D Geometry 26

Recovery of affine and metric properties from images

Under a projective transformH, since ideal points are mapped to finite points, the line at infinityl is mapped to a finite line.

However, lis a fixed line iffHis an affinity.

• Note however that since

a point on lis not mapped to the same point on l unless

=

=

=

= l

A t

0 l A

H l

1 0 0

1 0 0

T 1

T T T

A

T

T k x x

x

x, ) ( , )

( 1 2 = 1 2

A

(14)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 27

Recovery of affine properties from images

• If is the imaged line at infinity with l30, following Hl=(l1,l2,l3p)maps lback to l= (0,0,1)T

=

3 2 1

' 0 1 0

0 0 1

l l l

A

p H

H

= =l

H'p T(l1,l2,l3)T (0,0,1)T projection rectification

Projective 2D Geometry 28

Determining imaged line at infinity – vanishing line

v1 v2

l1

l2 l4

l3

l

2

1 v

v l= ×

2 1

1 l l

v = ×

4 3

2 l l

v = ×

(15)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 29

Distance ratios

( ) (d ) a b d a,b : b,c = :

( )1,0T v'=H

( ) ( ) (0,1T, a,1T, a+b,1)T

c , b , a

H

K. M. Lee, EECS, SNU Projective 2D Geometry 30

The circular points

• Circular points:

(16)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 31

The circular points

• Any circle intersects lin the circular points

“circular points”

2 0

3 3 2 3 1 2 2 2

1 +x +dxx +ex x + fx =

x

2 0

2 2

1 +x =

x

l

( )

( )

T

T

0 , , 1 J

0 , , 1 I

i i

=

=

(

1,0,0

)

T

(

0,1,0

)

T

I= +i

Algebraically, encodes orthogonal directions

3 =0 x

Projective 2D Geometry 32

Conic dual to the circular points

• The conic dual to the circular points:

(17)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 33

Angles

• For lines the angle between them is

• This can be rewritten by

• This is invariant to projective transformsince for and

T

T m m m

l l

l, , ) and ( , , )

(1 2 3 = 1 2 3

= m

l

Hx x= )

(

1

=

=H l l l H

l T T T

orthogonal

*m =0 C

lT

l=(a,b,c) (a,b) (b,-a) Euclidean:

Projective:

K. M. Lee, EECS, SNU Projective 2D Geometry 34

Recovery of metric properties from images

• We can find a projective transform that maps the imaged circular points to their canonical positions (1,±i,0)T, then rectify the image using it.

• OR, metric rectification using :

9For point transform

C

Hx x=

( ) ( )

( ) ( )

( ) ( )

=

=

=

=

v v

v

v '

*

*

*

*

KKT

KK

KK KK

H H C H H

H H H C H H H

H H H C H H H C

T T T

T T

T T T

T

HA HP HA

HP

HA HP HS HS HA HP

HS HA HP HS

HA HP

(18)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 35

Recovery of metric properties from images

• Rectifying homography using SVD:

9Taking SVD of

9Then the rectifying projectivity is up to a similarity, since

=

=H HT H U

0 0 0

0 1 0

0 0 1

'

C

=

=

=U U U U C

H C H

0 0 0

0 1 0

0 0 1 0

0 0

0 1 0

0 0 1

' T T T

r r

)

( 1 1 T

r H U U

H = = =

Projective 2D Geometry 36

Metric from affine

(s11,s12,s22)T

= s

( )

0

0 0

0

3 2 1 3

2

1 =

⎟⎟

⎜⎜

⎥⎦

⎢ ⎤

′ ⎡

m m m l

l l

KKT

(

l1m1′,l1m2′ +l2m1′,l2m2

)(

s11,s12,s22

)

T =0

•Affine to metric rectification using 2 orthogonality constraints

• is the null-vector of 2x3 matrix

s

=

22 12

12 11

s s

s

T s KK

'

C

SVDUT H=U

UC*

KKT K C'

(19)

Multiple View Geometry (Spring '08) K. M. Lee, EECS, SNU Projective 2D Geometry 37

Metric from projective

( ) ( ) ( )

(l1m1,0.5l1m2+l2m1,l2m2,0.5l1m3+l3m1,0.5l2m3+l3m2 ,l3m3)c=0

( )

0

v v v

v

3 2 1 3

2

1 =

⎟⎟

⎜⎜

⎥⎦

⎢ ⎤

′ ⎡

m m m l

l

l T T

T T

K K KK

•General metric rectification using 5 orthogonality constraints

•c is the null-vector of 5x6 matrix

•c

'

C

' SVD

C UC*UT H=U

K. M. Lee, EECS, SNU Projective 2D Geometry 38

Pole-polar relationship

The polar line l=Cxof the point xwith respect to the conic Cintersects the conic in two points. The two lines tangent to Cat these points intersect at x

Polar of x

Pole of l Conjugate

=0 Cx yT

Referensi

Dokumen terkait