SlideShare ist ein Scribd-Unternehmen logo
1 von 40
C OMPUTER V ISION : P ROJECTIVE G EOMETRY


                              IIT Kharagpur


                  Computer Science and Engineering,
                    Indian Institute of Technology
                             Kharagpur.




(IIT Kharagpur)              Projective Geometry      Jan ’10   1 / 40
Planar Geometry
  Geometry is the study of points and lines and their relationships.
  Geometry can be studied in terms of properties of geometric
  primitives.
  An algebraic approach to studying geometry involves establishing
  a coordinate system.


Algebraic geometry
  Points and lines are represented as vectors.
  A conic section is represented by a symmetric matrix.
  Results derived using algebraic geometry are very useful for
  developing practical computation methods.




   (IIT Kharagpur)         Projective Geometry              Jan ’10   2 / 40
The 2D projective plane                                    Notation
  A point (x, y ) can be considered as a vector in the vector space
  IR2
  Geometric entities can be represented by a column vector.
  Generally x represents a column vector and xT represents a row
  vector.
  A point x gets represented by a column vector:

                                  x
                         x=             = (x, y )T
                                  y




   (IIT Kharagpur)         Projective Geometry              Jan ’10   3 / 40
Homogeneous representation of lines
   Equation of a line: ax + by + c = 0
   Line as a vector: (a, b, c)T
   Vectors (a, b, c)T and k (a, b, c)T represent the same line.
   For different values of scalar k , we get an equivalence class of
   vectors.
   Any particular vector (a, b, c)T is a representative of the
   equivalence class.

Projective space
   The set of equivalence classes of vectors in IR3 forms the
   projective space IP2 .
   The vector (0, 0, 0)T is excluded from the projective space since it
   does not correspond to any line.

    (IIT Kharagpur)          Projective Geometry                 Jan ’10   4 / 40
Homogeneous representation of points
    A point x = (x, y )T lies on the line l = (a, b, c)T if
                                                             
                                                         a
                                                             
                                                              
                                             (x, y , 1)  b
                                                             
               ax + by + c = 0                          
                                                        
                                                        
                                                              =0
                                                              
                                                              
                                                              
                                                          c
                                                             

    The point (x, y )T in IR2 is represented as a 3-vector by adding a
    final coordinate of 1.
    Since (kx, ky , k )l = 0, the set of vectors (kx, ky , k )T for varying
    values of k would represent the same point (x, y T ) in IR2 .
    A homogeneous vector of general form x = (x1 , x2 , x3 )T
    represents the point (x1 /x3 , x2 /x3 )T in IR2 .

Points as homogeneous vectors are also elements of IP2 .


      (IIT Kharagpur)           Projective Geometry                 Jan ’10   5 / 40
Homogeneous coordinate
 Point x lies on line l if and only if xT l = 0
 xT l = lT x = x.l
 Homogeneous coordinate (3-vector) x = (x1 , y1 , z1 )T .
 Inhomogeneous coordinate (2-vector) x = (x, y )T .


 Two lines l = (a, b, c)T and l = (a , b , c )T intersect at a point x.

                                   x=l×l

 The line through two points x and x is

                                  l=x×x




  (IIT Kharagpur)            Projective Geometry               Jan ’10   6 / 40
Ideal Points                                                 Line at ∞
  Consider two parallel lines l = (a, b, c)T and l = (a, b, c )T .
  Intersection of l and l is given by l × l .
                                                  
                                            b
                                                  
                                                   
                          l × l = (c − c )  −a
                                                  
                                                   
                                           
                                                  
                                                   
                                                  
                                              0
                                                  

  The inhomogeneous representation of the point of intersection

                                       b/0
                                      −a/0

  Parallel lines meet at infinity.




   (IIT Kharagpur)           Projective Geometry               Jan ’10   7 / 40
Ideal points and the line at infinity
  All homogeneous 3-vectors form the projective space IP2 .
  The points for which the last coordinate x3 = 0 are the ideal points
                                     
                                  x1 
                                     
                                  x 
                                 
                                  2 
                                 
                                     
                                      
                                    0
                                     

  The set of all ideal points (x1 , x2 , 0)T lie on a single line, the Line
  at Infinity, denoted l∞ = (0, 0, 1)T
  A line l = (a, b, c)T intersects l∞ in the ideal point (b, −a, 0)T .
  The vector (b, −a)T is tangent to the line and orthogonal to the
  line normal (a, b) and so represents the line’s direction.




   (IIT Kharagpur)            Projective Geometry                 Jan ’10   8 / 40
Advantage of projective geometry
Projective plane IP2
    In IP2 , two distinct lines meet in a single point and two points lie on
    a single line.
    In the standard Euclidean geometry of IR2 , parallel lines form a
    special case.

    The study of the geometry of IP2 is known as projective geometry.
    In the purely geometric study of projective geometry, one does not
    make any distinction between points at infinity (ideal points) and
    ordinary points.




     (IIT Kharagpur)           Projective Geometry                Jan ’10   9 / 40
A model for projective plane
  Points in IP2 correspond to rays in IR3 .
  The set of all vectors k (x1 , x2 , x3 )T as k varies forms a ray through
  origin.
  The lines in IP2 are planes passing through origin in IR3
  Getting inhomogeneous representation: Points and lines may be
  obtained by intersecting this set of of rays and planes with the
  plane x3 = 1




   (IIT Kharagpur)           Projective Geometry                Jan ’10   10 / 40
Duality
    The role of points and lines can be interchanged in statements
    concerning the properties of lines and points.
    E.g. lT x = 0 also implies xT l = 0


To any theorem of 2-dimensional projective geometry there
corresponds a dual theorem, which may be derived by interchanging
the roles of points and lines in the original theorem.
    A line through 2 points is dual to the point of intersection of the
    two lines.




     (IIT Kharagpur)          Projective Geometry               Jan ’10   11 / 40
Conics and Dual Conics
  A conic is a curve described by a second-degree equation in the
  plane.
  E.g. hyperbola, ellipse, parabola.
  Inhomogeneous coordinates → equation of a conic:

                       ax 2 + bxy + cy 2 + dx + ey + f = 0

  Homogenizing this by replacements x1 → x1 /x3 , y → x2 /x3
                       2              2                       2
                     ax1 + bx1 x2 + cx2 + dx1 x2 + ex2 x3 + fx3




   (IIT Kharagpur)               Projective Geometry              Jan ’10   12 / 40
Conic in matrix form
                                                       
                                           a b/2 d/2 
                                                       
               xT Cx = 0              C =  b/2 c   e/2 
                                                       
                                          
                                                       
                                                        
                                                       
                                            d/2 e/2  f
                                                       


    The matrix C is a homogeneous representation of the conic.
    The conic has 5 degrees of freedom, i.e. the ratios:
    {a : b : c : d : e : f }
    Five points are required to define a conic.

Tangent to the conic
The line l tangent to the conic C is given by l = Cx




      (IIT Kharagpur)         Projective Geometry           Jan ’10   13 / 40
Conic in matrix form
                                                     
                                         a b/2 d/2 
                                                     
             xT Cx = 0              C =  b/2 c   e/2 
                                                     
                                        
                                                     
                                                      
                                                     
                                          d/2 e/2  f
                                                     


   The matrix C is a homogeneous representation of the conic.
   The conic has 5 degrees of freedom, i.e. the ratios:
   {a : b : c : d : e : f }




    (IIT Kharagpur)         Projective Geometry           Jan ’10   14 / 40
Projective Transformations
  2D projective geometry is the study of properties of the projective
  plane IP2 that are invariant under a group of transformations
  known as projectivities.
  A projectivity is an invertible mapping from points in IP2 to points in
  IP2 .
  A projectivity is an invertible mapping h from IP2 to itself such that
  three points x1 , x2 and x3 lie on the same line if and only if h(x1 ),
  h(x2 ) and h(x3 ) do.
  Also called as: collineation, projective transformation or a
  homography.




   (IIT Kharagpur)           Projective Geometry               Jan ’10   15 / 40
Homography                                     Projective Transformation
Algebraic definition:
A mapping h : P2 → IP2 is a projectivity if and only if there exists a
non-singular 3 × 3 matrix H such that for any point in P2 represented by
vector x it is true that h(x) = Hx.

H is a linear transformation
                                                          
                             x1   h11 h12 h13
                                                       x1 
                                                             
            x = Hx           x = h
                             2   21 h22 h23
                            
                                                       x 
                                                        
                                                         2  
                            
                                 
                                                      
                                                             
                                                               
                              x3     h31 h32 h33            x3
                                                          


H is a homogeneous matrix
Only ratios of the matrix elements is significant.
There are 8 degrees of freedom.


      (IIT Kharagpur)         Projective Geometry                  Jan ’10   16 / 40
Projective Transformation
  A projective transformation leaves the projective properties
  invariant.
  A projective transformation in P2 is simply a linear transformation
  of R3 .




   (IIT Kharagpur)         Projective Geometry              Jan ’10   17 / 40
Transformation of Lines
  Points xi get transformed as xi = Hxi
  If these points xi lie on a line l, then lT xi = 0
  The transformed points xi would lie on a line l .

                                    l = H−T l




   (IIT Kharagpur)            Projective Geometry      Jan ’10   18 / 40
Transformation of Conics
    Points x get transformed as x = Hx
    If the point x lies on a conic C, then xT Cx = 0


                        xT Cx = x T [H−1 ]T C H−1 x
                                = x T H−T C H−1 x



Under a point transformation x = Hx, a conic C transforms to

                            C = H−T C H−1




      (IIT Kharagpur)         Projective Geometry          Jan ’10   19 / 40
Hierarchy of Transformations
   General linear group: GL(n) −→ Group of invertible n × n matrices
   with real elements.
   Projective linear group: PL(n) −→ Matrices are related by a scalar
   multiplier. Quotient group of GL(n).

Projective Linear Group                                  Subgroups
   Affine group: −→ Matrices for which the last row is (0, 0, 1)
   Euclidean group: −→ Additionally, the upper left hand 2 × 2 matrix
   is orthogonal.
   Oriented Euclidean group: PL(n) −→ Additionally, the upper left
   hand 2 × 2 matrix has determinant 1.




    (IIT Kharagpur)         Projective Geometry             Jan ’10   20 / 40
Invariants
     A transformation can be described in terms of those elements or
     quantities that are preserved or invariant.
     A (scalar) invariant of a geometric configuration is a function of the
     configuration whose value is unchanged by a particular
     transformation.


Euclidean invariants                     Similarity invariants
    Distance between two points.                Distance
    Angle between two lines.                    Angle between two lines.




      (IIT Kharagpur)          Projective Geometry                 Jan ’10   21 / 40
Examples of Projective transformations




   (IIT Kharagpur)   Projective Geometry   Jan ’10   22 / 40
Examples of Projective transformations




   (IIT Kharagpur)   Projective Geometry   Jan ’10   23 / 40
Example of Projective Correction




    (IIT Kharagpur)   Projective Geometry   Jan ’10   24 / 40
Isometries
                                         
  x 
       
                        cosθ − sinθ tx   x 
                                            
  y  = 
 
 
     
        
                        sinθ  cosθ ty   y 
                                         
                                         
                                              
                                                       where      = ±1
 
    
        
                                        
                                            
                                              
   1                      0     0    1      1
                                         


  Isometries are transformations of the plane R2 that preserve
  Euclidean distance.
  If = 1, the isometry is orientation-preserving and is a Euclidean
  transformation. Euclidean transformation is a composition of
  translation and rotation.
  If      = −1, the isometry reverses orientation.




       (IIT Kharagpur)            Projective Geometry           Jan ’10   25 / 40
Isometries                                                 In short form
                                             R     t
                     x    = HE x =                     x
                                             0T    1

  R is a 2 × 2 rotation matrix. RT R = RRT = I
  t is a translation 2-vector.
  0 is a null 2-vector.
  It has 3 degrees of freedom: 1 for rotation, 2 for translation.


Invariants                                                     Isometry
  Length
  Angle
  Area


   (IIT Kharagpur)           Projective Geometry               Jan ’10   26 / 40
Similarity Transformation
                             
 x 
       s cosθ −s sinθ tx   x 
                               
 y  =  s sinθ s cosθ t   y 
                                            where s = scaling



    
    
    
        
        
                         y  
                             
                             
                                  
                                  
                                  
  1          0      0    1      1
                             


   It is an isometry composed with an isotropic scaling.
   Preserves the shape.
   Has 4 degrees of freedom −→ scaling(1), rotation(1),
   translation(2).




    (IIT Kharagpur)         Projective Geometry            Jan ’10   27 / 40
Similarity Transformation                               In short form
                                             sR t
                     x    = HS x =                  x
                                             0T 1

  R is a 2 × 2 rotation matrix. RT R = RRT = I
  t is a translation 2-vector.
  0 is a null 2-vector.


Invariants                                                  Isometry
  Angle
  Parallel lines remain as parallel.
  Length: Ratio of two lengths is preserved.
  Area: Ratio of two areas is preserved.


   (IIT Kharagpur)           Projective Geometry            Jan ’10   28 / 40
Metric Structure
Metric Structure implies that the structure is defined up to a similarity.




      (IIT Kharagpur)          Projective Geometry              Jan ’10   29 / 40
Affine Transformation                                        (Affinity)
                                           
                      x 
                            a11 a12 tx   x 
                                             
                      y  =  a21 a22 ty   y 
                     
                                           
                        
                            
                                          
                                              
                                                
                                           
                       1        0   0 1       1
                                           

                                              A     t
                      x   = HA x =                      x
                                              0T    1

  A is a 2 × 2 non-singular matrix.
  Has 6 degrees of freedom −→ 6 matrix elements.
  The transformation can be computed using 3 point
  correspondences.




   (IIT Kharagpur)            Projective Geometry           Jan ’10   30 / 40
Decomposition of an Affine transform
                      A = R(θ)    R(−φ)            D R(φ)


                                      λ1 0
  D is a diagonal matrix. D =
                                      0 λ2
  R(θ) and R(φ) are rotations by θ and φ respectively.




    (IIT Kharagpur)          Projective Geometry            Jan ’10   31 / 40
Affine transform                                     Non-isotropic scaling
    Non-isotropic scaling means there is a scaling direction (angle φ),
    and a ratio of scaling parameters λ1 : λ2 in orthogonal directions.
    It has 2 extra degrees of freedom compared to a similarity
    transform.

Invariants                                              Affine Transform
    Angle
    Parallel lines remain as parallel.
    Length: Ratio of two lengths is preserved for parallel lines.
    Area: Ratio of two areas is preserved. In fact areas are scaled by
    factor λ1 λ2 .
There can be orientation preserving and orientation reversing affinities
depending on the sign of detA


      (IIT Kharagpur)         Projective Geometry               Jan ’10   32 / 40
Projective Transformation
                           A    t
     x    = HP x =                     x              where v = (v1 , v2 )T
                           vT   v

    Has 8 degrees of freedom −→ 9 elements with only ratio
    significant.
    The transformation can be computed using 4 point
    correspondences, with no 3 collinear on either plane.

Invariants
A ratio of ratios (cross ratio) of lengths on a line is a projective
invariant.




      (IIT Kharagpur)           Projective Geometry                   Jan ’10   33 / 40
Similarity (4 dof)
         ↓
  Affinity (6 dof)            Affinity: Scaling of area is the same all over the
         ↓                   plane. Orientation of a transformed line does not
Projectivity (8 dof)         depend on its position on the plane.
                      Projectivity: Area scaling varies with position.
                      Orientation of a transformed line depends on its
                      initial orientation and position.
The vector v is responsible for non-linear effects.
                                                   
                                x1        A x1 
                     A t                           
                                x2  =        x2 
                               
                                   
                                          
                                                     
                                                      
                    0T 1       
                                   
                                          
                                                     
                                                      
                                 0              0
                                                   

                                                        
                                  x1           x1
                        A    t
                                                          
                                  x  =  A x
                                 
                                                        
                                                           
                                  2                    
                                                  2
                        vT
                                                          
                             v   
                                     
                                        
                                                          
                                                           
                                   0       v1 x1 + v2 x2
                                                        

      (IIT Kharagpur)              Projective Geometry             Jan ’10   34 / 40
Decomposition of a Projective Transform

                      sR t     K      0            I    0        A      t
 H = HS HA HP =                                             =
                      0T 1     0T     1            vT   v        vT     v


   A = sRK + tvT
   K is an upper-triangular matrix normalized as det K = 1
   The decomposition is valid if v        0, is unique if s is positive.


                          
          1.707 0.586 1.0 
                          
     H =  2.707 8.242 2.0 
                          
         
                          
                           
                          
            1.0   2.0 1.0
                          

          2cos45o −2sin45o 1   0.5 1 0   1 0 0 
                                               
                                               
       =  2sin45o 2cos45o 2   0 2 0   0 1 0 
         
                                               
                              
                                        
                                                  
                                                    
                                               
              0        0     1     0 0 1      1 2 1
                                               
    (IIT Kharagpur)          Projective Geometry                    Jan ’10   35 / 40
Rectifying a Projective Transform
  Affine rectification
  Similarity rectification (Metric structure)
  Euclidean rectification




   (IIT Kharagpur)          Projective Geometry   Jan ’10   36 / 40
Number of Invariants
  The number of functionally independent invariants
                     ≥
  the number of degrees of freedom of the configuration
                     −
  the number of degrees of freedom of the transformation




   (IIT Kharagpur)        Projective Geometry              Jan ’10   37 / 40
Projective (8 dof)                                              Invariants
                      
        h11 h12 h13
                                            Concurrency, collinearity
                      
                       
        h21 h22 h23
       
                      
                       
                       
                                            Order of contact
       
                      
                       
         h31 h32 h33
                      
                                            Cross ratios

Affine (6 dof)                                                   Invariants
                    
         a11 a12 tx 
                                          Parallelism
         a21 a22 ty 
        
                    
                     
                                            Ratios of areas, ratio of
        
                    
                     
           0   0 1
                    
                                            lengths on parallel lines
                                            The line at ∞




    (IIT Kharagpur)        Projective Geometry                   Jan ’10   38 / 40
Similarity (4 dof)                                               Invariants
                     
        sr11 sr12 tx 
       
        sr
                                          Ratio of lengths,
        21 sr22 ty 
                     
                      
                                           Angles
       
                     
                      
          0    0   1
                     
                                           The circular points

Euclidean (3 dof)                                                Invariants
                     
          r11 r12 tx 
         
          r
                                          Lengths,
          21 r22 ty 
                     
                      
                                           Area
         
                     
                      
            0   0 1
                     




    (IIT Kharagpur)       Projective Geometry                    Jan ’10   39 / 40
The projective geometry of 1D




  (IIT Kharagpur)   Projective Geometry   Jan ’10   40 / 40

Weitere ähnliche Inhalte

Was ist angesagt?

Advanced algebra (some terminologies)
Advanced algebra (some terminologies)Advanced algebra (some terminologies)
Advanced algebra (some terminologies)
aufpaulalonzo
 
Ib mathematics hl
Ib mathematics hlIb mathematics hl
Ib mathematics hl
Ross
 
Math 1300: Section 4-5 Inverse of a Square Matrix
Math 1300: Section 4-5 Inverse of a Square MatrixMath 1300: Section 4-5 Inverse of a Square Matrix
Math 1300: Section 4-5 Inverse of a Square Matrix
Jason Aubrey
 
Mathh 1300: Section 4- 4 Matrices: Basic Operations
Mathh 1300: Section 4- 4 Matrices: Basic OperationsMathh 1300: Section 4- 4 Matrices: Basic Operations
Mathh 1300: Section 4- 4 Matrices: Basic Operations
Jason Aubrey
 

Was ist angesagt? (20)

Goldie chapter 4 function
Goldie chapter 4 functionGoldie chapter 4 function
Goldie chapter 4 function
 
5. Linear Algebra for Machine Learning: Singular Value Decomposition and Prin...
5. Linear Algebra for Machine Learning: Singular Value Decomposition and Prin...5. Linear Algebra for Machine Learning: Singular Value Decomposition and Prin...
5. Linear Algebra for Machine Learning: Singular Value Decomposition and Prin...
 
Advanced algebra (some terminologies)
Advanced algebra (some terminologies)Advanced algebra (some terminologies)
Advanced algebra (some terminologies)
 
1533 game mathematics
1533 game mathematics1533 game mathematics
1533 game mathematics
 
Inference for stochastic differential equations via approximate Bayesian comp...
Inference for stochastic differential equations via approximate Bayesian comp...Inference for stochastic differential equations via approximate Bayesian comp...
Inference for stochastic differential equations via approximate Bayesian comp...
 
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
3. Linear Algebra for Machine Learning: Factorization and Linear Transformations
 
Acet syllabus 1 fac
Acet   syllabus 1 facAcet   syllabus 1 fac
Acet syllabus 1 fac
 
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksBeginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
 
Numerical Methods 1
Numerical Methods 1Numerical Methods 1
Numerical Methods 1
 
2. Linear Algebra for Machine Learning: Basis and Dimension
2. Linear Algebra for Machine Learning: Basis and Dimension2. Linear Algebra for Machine Learning: Basis and Dimension
2. Linear Algebra for Machine Learning: Basis and Dimension
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
 
1. Linear Algebra for Machine Learning: Linear Systems
1. Linear Algebra for Machine Learning: Linear Systems1. Linear Algebra for Machine Learning: Linear Systems
1. Linear Algebra for Machine Learning: Linear Systems
 
ABC with data cloning for MLE in state space models
ABC with data cloning for MLE in state space modelsABC with data cloning for MLE in state space models
ABC with data cloning for MLE in state space models
 
An Algorithm to Find the Visible Region of a Polygon
An Algorithm to Find the Visible Region of a PolygonAn Algorithm to Find the Visible Region of a Polygon
An Algorithm to Find the Visible Region of a Polygon
 
Ib mathematics hl
Ib mathematics hlIb mathematics hl
Ib mathematics hl
 
Mac2311 study guide-tcm6-49721
Mac2311 study guide-tcm6-49721Mac2311 study guide-tcm6-49721
Mac2311 study guide-tcm6-49721
 
CS229 Machine Learning Lecture Notes
CS229 Machine Learning Lecture NotesCS229 Machine Learning Lecture Notes
CS229 Machine Learning Lecture Notes
 
Math 1300: Section 4-5 Inverse of a Square Matrix
Math 1300: Section 4-5 Inverse of a Square MatrixMath 1300: Section 4-5 Inverse of a Square Matrix
Math 1300: Section 4-5 Inverse of a Square Matrix
 
THE CALCULUS INTEGRAL (Beta Version 2009)
THE CALCULUS INTEGRAL (Beta Version 2009)THE CALCULUS INTEGRAL (Beta Version 2009)
THE CALCULUS INTEGRAL (Beta Version 2009)
 
Mathh 1300: Section 4- 4 Matrices: Basic Operations
Mathh 1300: Section 4- 4 Matrices: Basic OperationsMathh 1300: Section 4- 4 Matrices: Basic Operations
Mathh 1300: Section 4- 4 Matrices: Basic Operations
 

Ähnlich wie Lecture 1

Introduction to homography
Introduction to homographyIntroduction to homography
Introduction to homography
Shih-Hsiang Lin
 
Engr 371 final exam august 1999
Engr 371 final exam august 1999Engr 371 final exam august 1999
Engr 371 final exam august 1999
amnesiann
 
7.5 lines and_planes_in_space
7.5 lines and_planes_in_space7.5 lines and_planes_in_space
7.5 lines and_planes_in_space
Mahbub Alwathoni
 
Deformation 1
Deformation 1Deformation 1
Deformation 1
anashalim
 
Mathematical sciences-paper-ii
Mathematical sciences-paper-iiMathematical sciences-paper-ii
Mathematical sciences-paper-ii
knowledgesociety
 

Ähnlich wie Lecture 1 (20)

Introduction to homography
Introduction to homographyIntroduction to homography
Introduction to homography
 
5.vector geometry Further Mathematics Zimbabwe Zimsec Cambridge
5.vector geometry   Further Mathematics Zimbabwe Zimsec Cambridge5.vector geometry   Further Mathematics Zimbabwe Zimsec Cambridge
5.vector geometry Further Mathematics Zimbabwe Zimsec Cambridge
 
Circunfêrencia 1
Circunfêrencia 1Circunfêrencia 1
Circunfêrencia 1
 
Engr 371 final exam august 1999
Engr 371 final exam august 1999Engr 371 final exam august 1999
Engr 371 final exam august 1999
 
Class 10 mathematics compendium
Class 10 mathematics compendiumClass 10 mathematics compendium
Class 10 mathematics compendium
 
Bruja de Agnesi
Bruja de AgnesiBruja de Agnesi
Bruja de Agnesi
 
Mtc ssample05
Mtc ssample05Mtc ssample05
Mtc ssample05
 
Mtc ssample05
Mtc ssample05Mtc ssample05
Mtc ssample05
 
Nbhm m. a. and m.sc. scholarship test 2011
Nbhm m. a. and m.sc. scholarship test 2011Nbhm m. a. and m.sc. scholarship test 2011
Nbhm m. a. and m.sc. scholarship test 2011
 
Maths Assignment Help
Maths Assignment HelpMaths Assignment Help
Maths Assignment Help
 
Lecture2 (vectors and tensors).pdf
Lecture2 (vectors and tensors).pdfLecture2 (vectors and tensors).pdf
Lecture2 (vectors and tensors).pdf
 
Maths Assignment Help
Maths Assignment HelpMaths Assignment Help
Maths Assignment Help
 
Lecture_note2.pdf
Lecture_note2.pdfLecture_note2.pdf
Lecture_note2.pdf
 
Lecture 07 graphing linear equations
Lecture 07 graphing linear equationsLecture 07 graphing linear equations
Lecture 07 graphing linear equations
 
Assignment6
Assignment6Assignment6
Assignment6
 
7.5 lines and_planes_in_space
7.5 lines and_planes_in_space7.5 lines and_planes_in_space
7.5 lines and_planes_in_space
 
Deformation 1
Deformation 1Deformation 1
Deformation 1
 
Application of matrix algebra to multivariate data using standardize scores
Application of matrix algebra to multivariate data using standardize scoresApplication of matrix algebra to multivariate data using standardize scores
Application of matrix algebra to multivariate data using standardize scores
 
11.application of matrix algebra to multivariate data using standardize scores
11.application of matrix algebra to multivariate data using standardize scores11.application of matrix algebra to multivariate data using standardize scores
11.application of matrix algebra to multivariate data using standardize scores
 
Mathematical sciences-paper-ii
Mathematical sciences-paper-iiMathematical sciences-paper-ii
Mathematical sciences-paper-ii
 

Mehr von Krishna Karri (14)

11 mm91r05
11 mm91r0511 mm91r05
11 mm91r05
 
Translational health research
Translational health researchTranslational health research
Translational health research
 
Linear
LinearLinear
Linear
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 10h
Lecture 10hLecture 10h
Lecture 10h
 
Lecture 9h
Lecture 9hLecture 9h
Lecture 9h
 
Lecture9
Lecture9Lecture9
Lecture9
 
Segclus
SegclusSegclus
Segclus
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 

Lecture 1

  • 1. C OMPUTER V ISION : P ROJECTIVE G EOMETRY IIT Kharagpur Computer Science and Engineering, Indian Institute of Technology Kharagpur. (IIT Kharagpur) Projective Geometry Jan ’10 1 / 40
  • 2. Planar Geometry Geometry is the study of points and lines and their relationships. Geometry can be studied in terms of properties of geometric primitives. An algebraic approach to studying geometry involves establishing a coordinate system. Algebraic geometry Points and lines are represented as vectors. A conic section is represented by a symmetric matrix. Results derived using algebraic geometry are very useful for developing practical computation methods. (IIT Kharagpur) Projective Geometry Jan ’10 2 / 40
  • 3. The 2D projective plane Notation A point (x, y ) can be considered as a vector in the vector space IR2 Geometric entities can be represented by a column vector. Generally x represents a column vector and xT represents a row vector. A point x gets represented by a column vector: x x= = (x, y )T y (IIT Kharagpur) Projective Geometry Jan ’10 3 / 40
  • 4. Homogeneous representation of lines Equation of a line: ax + by + c = 0 Line as a vector: (a, b, c)T Vectors (a, b, c)T and k (a, b, c)T represent the same line. For different values of scalar k , we get an equivalence class of vectors. Any particular vector (a, b, c)T is a representative of the equivalence class. Projective space The set of equivalence classes of vectors in IR3 forms the projective space IP2 . The vector (0, 0, 0)T is excluded from the projective space since it does not correspond to any line. (IIT Kharagpur) Projective Geometry Jan ’10 4 / 40
  • 5. Homogeneous representation of points A point x = (x, y )T lies on the line l = (a, b, c)T if    a    (x, y , 1)  b   ax + by + c = 0    =0    c   The point (x, y )T in IR2 is represented as a 3-vector by adding a final coordinate of 1. Since (kx, ky , k )l = 0, the set of vectors (kx, ky , k )T for varying values of k would represent the same point (x, y T ) in IR2 . A homogeneous vector of general form x = (x1 , x2 , x3 )T represents the point (x1 /x3 , x2 /x3 )T in IR2 . Points as homogeneous vectors are also elements of IP2 . (IIT Kharagpur) Projective Geometry Jan ’10 5 / 40
  • 6. Homogeneous coordinate Point x lies on line l if and only if xT l = 0 xT l = lT x = x.l Homogeneous coordinate (3-vector) x = (x1 , y1 , z1 )T . Inhomogeneous coordinate (2-vector) x = (x, y )T . Two lines l = (a, b, c)T and l = (a , b , c )T intersect at a point x. x=l×l The line through two points x and x is l=x×x (IIT Kharagpur) Projective Geometry Jan ’10 6 / 40
  • 7. Ideal Points Line at ∞ Consider two parallel lines l = (a, b, c)T and l = (a, b, c )T . Intersection of l and l is given by l × l .    b    l × l = (c − c )  −a          0   The inhomogeneous representation of the point of intersection b/0 −a/0 Parallel lines meet at infinity. (IIT Kharagpur) Projective Geometry Jan ’10 7 / 40
  • 8. Ideal points and the line at infinity All homogeneous 3-vectors form the projective space IP2 . The points for which the last coordinate x3 = 0 are the ideal points    x1     x    2      0   The set of all ideal points (x1 , x2 , 0)T lie on a single line, the Line at Infinity, denoted l∞ = (0, 0, 1)T A line l = (a, b, c)T intersects l∞ in the ideal point (b, −a, 0)T . The vector (b, −a)T is tangent to the line and orthogonal to the line normal (a, b) and so represents the line’s direction. (IIT Kharagpur) Projective Geometry Jan ’10 8 / 40
  • 9. Advantage of projective geometry Projective plane IP2 In IP2 , two distinct lines meet in a single point and two points lie on a single line. In the standard Euclidean geometry of IR2 , parallel lines form a special case. The study of the geometry of IP2 is known as projective geometry. In the purely geometric study of projective geometry, one does not make any distinction between points at infinity (ideal points) and ordinary points. (IIT Kharagpur) Projective Geometry Jan ’10 9 / 40
  • 10. A model for projective plane Points in IP2 correspond to rays in IR3 . The set of all vectors k (x1 , x2 , x3 )T as k varies forms a ray through origin. The lines in IP2 are planes passing through origin in IR3 Getting inhomogeneous representation: Points and lines may be obtained by intersecting this set of of rays and planes with the plane x3 = 1 (IIT Kharagpur) Projective Geometry Jan ’10 10 / 40
  • 11. Duality The role of points and lines can be interchanged in statements concerning the properties of lines and points. E.g. lT x = 0 also implies xT l = 0 To any theorem of 2-dimensional projective geometry there corresponds a dual theorem, which may be derived by interchanging the roles of points and lines in the original theorem. A line through 2 points is dual to the point of intersection of the two lines. (IIT Kharagpur) Projective Geometry Jan ’10 11 / 40
  • 12. Conics and Dual Conics A conic is a curve described by a second-degree equation in the plane. E.g. hyperbola, ellipse, parabola. Inhomogeneous coordinates → equation of a conic: ax 2 + bxy + cy 2 + dx + ey + f = 0 Homogenizing this by replacements x1 → x1 /x3 , y → x2 /x3 2 2 2 ax1 + bx1 x2 + cx2 + dx1 x2 + ex2 x3 + fx3 (IIT Kharagpur) Projective Geometry Jan ’10 12 / 40
  • 13. Conic in matrix form    a b/2 d/2    xT Cx = 0 C =  b/2 c e/2          d/2 e/2 f   The matrix C is a homogeneous representation of the conic. The conic has 5 degrees of freedom, i.e. the ratios: {a : b : c : d : e : f } Five points are required to define a conic. Tangent to the conic The line l tangent to the conic C is given by l = Cx (IIT Kharagpur) Projective Geometry Jan ’10 13 / 40
  • 14. Conic in matrix form    a b/2 d/2    xT Cx = 0 C =  b/2 c e/2          d/2 e/2 f   The matrix C is a homogeneous representation of the conic. The conic has 5 degrees of freedom, i.e. the ratios: {a : b : c : d : e : f } (IIT Kharagpur) Projective Geometry Jan ’10 14 / 40
  • 15. Projective Transformations 2D projective geometry is the study of properties of the projective plane IP2 that are invariant under a group of transformations known as projectivities. A projectivity is an invertible mapping from points in IP2 to points in IP2 . A projectivity is an invertible mapping h from IP2 to itself such that three points x1 , x2 and x3 lie on the same line if and only if h(x1 ), h(x2 ) and h(x3 ) do. Also called as: collineation, projective transformation or a homography. (IIT Kharagpur) Projective Geometry Jan ’10 15 / 40
  • 16. Homography Projective Transformation Algebraic definition: A mapping h : P2 → IP2 is a projectivity if and only if there exists a non-singular 3 × 3 matrix H such that for any point in P2 represented by vector x it is true that h(x) = Hx. H is a linear transformation       x1   h11 h12 h13      x1    x = Hx  x = h  2   21 h22 h23     x    2             x3 h31 h32 h33 x3      H is a homogeneous matrix Only ratios of the matrix elements is significant. There are 8 degrees of freedom. (IIT Kharagpur) Projective Geometry Jan ’10 16 / 40
  • 17. Projective Transformation A projective transformation leaves the projective properties invariant. A projective transformation in P2 is simply a linear transformation of R3 . (IIT Kharagpur) Projective Geometry Jan ’10 17 / 40
  • 18. Transformation of Lines Points xi get transformed as xi = Hxi If these points xi lie on a line l, then lT xi = 0 The transformed points xi would lie on a line l . l = H−T l (IIT Kharagpur) Projective Geometry Jan ’10 18 / 40
  • 19. Transformation of Conics Points x get transformed as x = Hx If the point x lies on a conic C, then xT Cx = 0 xT Cx = x T [H−1 ]T C H−1 x = x T H−T C H−1 x Under a point transformation x = Hx, a conic C transforms to C = H−T C H−1 (IIT Kharagpur) Projective Geometry Jan ’10 19 / 40
  • 20. Hierarchy of Transformations General linear group: GL(n) −→ Group of invertible n × n matrices with real elements. Projective linear group: PL(n) −→ Matrices are related by a scalar multiplier. Quotient group of GL(n). Projective Linear Group Subgroups Affine group: −→ Matrices for which the last row is (0, 0, 1) Euclidean group: −→ Additionally, the upper left hand 2 × 2 matrix is orthogonal. Oriented Euclidean group: PL(n) −→ Additionally, the upper left hand 2 × 2 matrix has determinant 1. (IIT Kharagpur) Projective Geometry Jan ’10 20 / 40
  • 21. Invariants A transformation can be described in terms of those elements or quantities that are preserved or invariant. A (scalar) invariant of a geometric configuration is a function of the configuration whose value is unchanged by a particular transformation. Euclidean invariants Similarity invariants Distance between two points. Distance Angle between two lines. Angle between two lines. (IIT Kharagpur) Projective Geometry Jan ’10 21 / 40
  • 22. Examples of Projective transformations (IIT Kharagpur) Projective Geometry Jan ’10 22 / 40
  • 23. Examples of Projective transformations (IIT Kharagpur) Projective Geometry Jan ’10 23 / 40
  • 24. Example of Projective Correction (IIT Kharagpur) Projective Geometry Jan ’10 24 / 40
  • 25. Isometries        x      cosθ − sinθ tx   x      y  =        sinθ cosθ ty   y        where = ±1             1 0 0 1 1       Isometries are transformations of the plane R2 that preserve Euclidean distance. If = 1, the isometry is orientation-preserving and is a Euclidean transformation. Euclidean transformation is a composition of translation and rotation. If = −1, the isometry reverses orientation. (IIT Kharagpur) Projective Geometry Jan ’10 25 / 40
  • 26. Isometries In short form R t x = HE x = x 0T 1 R is a 2 × 2 rotation matrix. RT R = RRT = I t is a translation 2-vector. 0 is a null 2-vector. It has 3 degrees of freedom: 1 for rotation, 2 for translation. Invariants Isometry Length Angle Area (IIT Kharagpur) Projective Geometry Jan ’10 26 / 40
  • 27. Similarity Transformation        x     s cosθ −s sinθ tx   x       y  =  s sinθ s cosθ t   y        where s = scaling          y          1 0 0 1 1       It is an isometry composed with an isotropic scaling. Preserves the shape. Has 4 degrees of freedom −→ scaling(1), rotation(1), translation(2). (IIT Kharagpur) Projective Geometry Jan ’10 27 / 40
  • 28. Similarity Transformation In short form sR t x = HS x = x 0T 1 R is a 2 × 2 rotation matrix. RT R = RRT = I t is a translation 2-vector. 0 is a null 2-vector. Invariants Isometry Angle Parallel lines remain as parallel. Length: Ratio of two lengths is preserved. Area: Ratio of two areas is preserved. (IIT Kharagpur) Projective Geometry Jan ’10 28 / 40
  • 29. Metric Structure Metric Structure implies that the structure is defined up to a similarity. (IIT Kharagpur) Projective Geometry Jan ’10 29 / 40
  • 30. Affine Transformation (Affinity)        x     a11 a12 tx   x       y  =  a21 a22 ty   y                          1 0 0 1 1       A t x = HA x = x 0T 1 A is a 2 × 2 non-singular matrix. Has 6 degrees of freedom −→ 6 matrix elements. The transformation can be computed using 3 point correspondences. (IIT Kharagpur) Projective Geometry Jan ’10 30 / 40
  • 31. Decomposition of an Affine transform A = R(θ) R(−φ) D R(φ) λ1 0 D is a diagonal matrix. D = 0 λ2 R(θ) and R(φ) are rotations by θ and φ respectively. (IIT Kharagpur) Projective Geometry Jan ’10 31 / 40
  • 32. Affine transform Non-isotropic scaling Non-isotropic scaling means there is a scaling direction (angle φ), and a ratio of scaling parameters λ1 : λ2 in orthogonal directions. It has 2 extra degrees of freedom compared to a similarity transform. Invariants Affine Transform Angle Parallel lines remain as parallel. Length: Ratio of two lengths is preserved for parallel lines. Area: Ratio of two areas is preserved. In fact areas are scaled by factor λ1 λ2 . There can be orientation preserving and orientation reversing affinities depending on the sign of detA (IIT Kharagpur) Projective Geometry Jan ’10 32 / 40
  • 33. Projective Transformation A t x = HP x = x where v = (v1 , v2 )T vT v Has 8 degrees of freedom −→ 9 elements with only ratio significant. The transformation can be computed using 4 point correspondences, with no 3 collinear on either plane. Invariants A ratio of ratios (cross ratio) of lengths on a line is a projective invariant. (IIT Kharagpur) Projective Geometry Jan ’10 33 / 40
  • 34. Similarity (4 dof) ↓ Affinity (6 dof) Affinity: Scaling of area is the same all over the ↓ plane. Orientation of a transformed line does not Projectivity (8 dof) depend on its position on the plane. Projectivity: Area scaling varies with position. Orientation of a transformed line depends on its initial orientation and position. The vector v is responsible for non-linear effects.      x1   A x1  A t      x2  =  x2          0T 1         0 0          x1  x1 A t    x  =  A x        2    2 vT   v         0 v1 x1 + v2 x2     (IIT Kharagpur) Projective Geometry Jan ’10 34 / 40
  • 35. Decomposition of a Projective Transform sR t K 0 I 0 A t H = HS HA HP = = 0T 1 0T 1 vT v vT v A = sRK + tvT K is an upper-triangular matrix normalized as det K = 1 The decomposition is valid if v 0, is unique if s is positive.    1.707 0.586 1.0    H =  2.707 8.242 2.0          1.0 2.0 1.0    2cos45o −2sin45o 1   0.5 1 0   1 0 0          =  2sin45o 2cos45o 2   0 2 0   0 1 0                  0 0 1 0 0 1 1 2 1     (IIT Kharagpur) Projective Geometry Jan ’10 35 / 40
  • 36. Rectifying a Projective Transform Affine rectification Similarity rectification (Metric structure) Euclidean rectification (IIT Kharagpur) Projective Geometry Jan ’10 36 / 40
  • 37. Number of Invariants The number of functionally independent invariants ≥ the number of degrees of freedom of the configuration − the number of degrees of freedom of the transformation (IIT Kharagpur) Projective Geometry Jan ’10 37 / 40
  • 38. Projective (8 dof) Invariants    h11 h12 h13 Concurrency, collinearity     h21 h22 h23      Order of contact     h31 h32 h33   Cross ratios Affine (6 dof) Invariants    a11 a12 tx    Parallelism  a21 a22 ty      Ratios of areas, ratio of     0 0 1   lengths on parallel lines The line at ∞ (IIT Kharagpur) Projective Geometry Jan ’10 38 / 40
  • 39. Similarity (4 dof) Invariants    sr11 sr12 tx    sr  Ratio of lengths,  21 sr22 ty     Angles     0 0 1   The circular points Euclidean (3 dof) Invariants    r11 r12 tx    r  Lengths,  21 r22 ty     Area     0 0 1   (IIT Kharagpur) Projective Geometry Jan ’10 39 / 40
  • 40. The projective geometry of 1D (IIT Kharagpur) Projective Geometry Jan ’10 40 / 40