SlideShare a Scribd company logo
1 of 60
Computer vision: models,
 learning and inference
         Chapter 15
  Models for transformations



   Please send errata to s.prince@cs.ucl.ac.uk
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   2
Transformation models
• Consider viewing a planar scene
• There is now a 1 to 1 mapping between points
  on the plane and points in the image
• We will investigate models for this 1 to 1
  mapping
  – Euclidean
  – Similarity
  – Affine transform
  – Homography

         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   3
Motivation: augmented reality tracking




       Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   4
Euclidean Transformation
•   Consider viewing a fronto-parallel plane at a known
    distance D.
•   In homogeneous coordinates the imaging equations
    are:




             3D rotation matrix                    Plane at known                    Point is on plane
            becomes 2D (in plane)                     distance D                          (w=0)
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince                       5
Euclidean transformation
•   Simplifying




•   Rearranging the last equation




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   6
Euclidean transformation
•   Simplifying




•   Rearranging the last equation




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   7
Euclidean transformation



•   Pre-multiplying by inverse of (modified) intrinsic matrix




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   8
Euclidean transformation
                                                   Homogeneous:




                                                    Cartesian:




or for short:                                        For short:



          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   9
Similarity Transformation
•   Consider viewing fronto-parallel plane at unknown
    distance D
•   By same logic as before we have



•   Premultiplying by inverse of intrinsic matrix




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   10
Similarity Transformation
Simplifying:




Multiply each equation by                                               :




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   11
Similarity Transformation
Simplifying:



Incorporate the constants by defining:




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   12
Similarity Transformation
                                          Homogeneous:




                                          Cartesian:




                                           For short:



 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   13
Affine Transformation
                                                 Homogeneous:




                                                  Cartesian:




                                                 For short:



Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   14
Affine Transform




Affine transform describes mapping well                  When variation in depth is comparable to
  when the depth variation within the                        distance to object then the affine
planar object is small and the camera is                 transformation is not a good model. Here
                far away                                         we need the homography

                Computer vision: models, learning and inference. ©2011 Simon J.D. Prince      15
Projective transformation /
         collinearity / homography
Start with basic projection equation:




Combining these two matrices we get:




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   16
Homography
                                             Homogeneous:




                                              Cartesian:




                                              For short:


Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   17
Adding noise
• In the real world, the measured image positions are
  uncertain.
• We model this with a normal distribution
• e.g.




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   18
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   19
Learning and inference problems



• Learning – take points on plane and their
  projections into the image and learn
  transformation parameters

• Inference – take the projection of a point in
  the image and establish point on plane
         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   20
Learning and inference problems




     Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   21
Learning transformation models
• Maximum likelihood approach




• Becomes a least squares problem



        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   22
Learning Euclidean parameters




Solve for transformation:


Remaining problem:




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   23
Learning Euclidean parameters


Has the general form:




•    This is an orthogonal Procrustes problem. To solve:
    • Compute SVD
    • And then set

            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   24
Learning similarity parameters



•   Solve for rotation matrix as before
•   Solve for translation and scaling factor




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   25
Learning affine parameters



•   Affine transform is linear




•   Solve using least-squares solution



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   26
Learning homography parameters



•    Homography is not linear – cannot be solved in closed
     form. Convert to other homogeneous coordinates




•    Both sides are 3x1 vectors; should be parallel and so cross
     product will be zero

             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   27
Learning homography parameters
•   Write out these equations in full




•   There are only 2 independent equations here – use a
    minimum of four points to build up a set of equations




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   28
Learning homography parameters




•   These equations have the form                                             , which we need
    to solve with the constraint
•   This is a minimum direction problem
    –   Compute SVD
    –   Take last column of
•   Then use non-linear optimization

             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince           29
Inference problems




•   Given point x* in image, find position w* on object

           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   30
Inference


In the absence of noise, we have the relation                                       ,
or in homogeneous coordinates



To solve for the points, we simply invert this relation




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince       31
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   32
Problem 1: exterior orientation




     Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   33
Problem 1: exterior orientation
•   Writing out the camera equations in full




•   Estimate the homography from matched points
•   Factor out the intrinsic parameters




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   34
Problem 1: exterior orientation


•   To estimate the first two columns of rotation matrix, we
    compute this singular value decomposition




•   Then we set




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   35
Problem 1: exterior orientation
•   Find the last column using the cross product of first two
    columns

•   Make sure the determinant is 1 – if it is -1 then multiply
    last column by -1.

•   Find translation scaling factor between old and new values




•   Finally, set

           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   36
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   37
Problem 2: calibration




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   38
Structure




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   39
Calibration


One approach (not very efficient) is to alternately
•   Optimize extrinsic parameters for fixed intrinsic



•   Optimize intrinsic parameters for fixed extrinsic



                                                      Then use non-linear optimization.
         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince         40
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   41
Problem 3 - reconstruction




Transformation between plane and image:




Point in frame of reference of plane:
Point in frame of reference of camera
            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   42
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   43
Transformations between images
•    So far we have considered
     transformations between the
     image and a plane in the world

•    Now consider two cameras
     viewing the same plane

•    There is a homography between
     camera 1 and the plane and a
     second homography between
     camera 2 and the plane

• It follows that the relation between the two images is also a
  homography

              Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   44
Properties of the homography
Homography is a linear transformation of a ray




Equivalently, leave rays and linearly transform image plane – all images formed by
all planes that cut the same ray bundle are related by homographies.




             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   45
Camera under pure rotation
Special case is camera under pure rotation.
Homography can be showed to be




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   46
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   47
Robust estimation
                                                   Least squares criterion is not
                                                   robust to outliers

                                                   For example, the two outliers
                                                   here cause the fitted line to be
                                                   quite wrong.

                                                   One approach to fitting under
                                                   these circumstances is to use
                                                   RANSAC – “Random sampling by
                                                   consensus”




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince              48
RANSAC




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   49
RANSAC




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   50
Fitting a homography with RANSAC




  Original images                      Initial matches                        Inliers from RANSAC

           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince                 51
Piecewise planarity




Many scenes are not planar, but are nonetheless piecewise planar
        Can we match all of the planes to one another?

           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   52
Approach 1 – Sequential RANSAC




   Problems: greedy algorithm and no need to be spatially coherent
        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   53
Approach 2 – PEaRL
    (propose, estimate and re-learn)
•   Associate label l which indicates which plane we are in
•   Relation between points xi in image1 and yi in image 2



•   Prior on labels is a Markov random field that encourages
    nearby labels to be similar



•   Model solved with variation of alpha expansion algorithm

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   54
Approach 2 – PEaRL




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   55
Structure
• Transformation models
• Learning and inference in transformation models
• Three problems
  – Exterior orientation
  – Calibration
  – Reconstruction
• Properties of the homography
• Robust estimation of transformations
• Applications

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   56
Augmented reality tracking




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   57
Fast matching of keypoints




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   58
Visual panoramas




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   59
Conclusions
• Mapping between plane in world and camera is one-to-one

• Takes various forms, but most general is the homography

• Revisited exterior orientation, calibration, reconstruction
  problems from planes

• Use robust methods to estimate in the presence of outliers




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   60

More Related Content

Similar to 15 cv mil_models_for_transformations

11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_treeszukun
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessingzukun
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densitieszukun
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributionszukun
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_wordszukun
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distributionzukun
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_gridszukun
 
Graphical Models for chains, trees and grids
Graphical Models for chains, trees and gridsGraphical Models for chains, trees and grids
Graphical Models for chains, trees and gridspotaters
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identityzukun
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_modelszukun
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probabilityzukun
 
Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to ProbabilityLukas Tencer
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_modelszukun
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_modelszukun
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inferencezukun
 

Similar to 15 cv mil_models_for_transformations (16)

11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessing
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
 
Graphical Models for chains, trees and grids
Graphical Models for chains, trees and gridsGraphical Models for chains, trees and grids
Graphical Models for chains, trees and grids
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identity
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probability
 
Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to Probability
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_models
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
 
Deep Learning Opening Workshop - Improving Generative Models - Junier Oliva, ...
Deep Learning Opening Workshop - Improving Generative Models - Junier Oliva, ...Deep Learning Opening Workshop - Improving Generative Models - Junier Oliva, ...
Deep Learning Opening Workshop - Improving Generative Models - Junier Oliva, ...
 

More from zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVzukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Informationzukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statisticszukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibrationzukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-softwarezukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 

More from zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

15 cv mil_models_for_transformations

  • 1. Computer vision: models, learning and inference Chapter 15 Models for transformations Please send errata to s.prince@cs.ucl.ac.uk
  • 2. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 2
  • 3. Transformation models • Consider viewing a planar scene • There is now a 1 to 1 mapping between points on the plane and points in the image • We will investigate models for this 1 to 1 mapping – Euclidean – Similarity – Affine transform – Homography Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
  • 4. Motivation: augmented reality tracking Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
  • 5. Euclidean Transformation • Consider viewing a fronto-parallel plane at a known distance D. • In homogeneous coordinates the imaging equations are: 3D rotation matrix Plane at known Point is on plane becomes 2D (in plane) distance D (w=0) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
  • 6. Euclidean transformation • Simplifying • Rearranging the last equation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
  • 7. Euclidean transformation • Simplifying • Rearranging the last equation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7
  • 8. Euclidean transformation • Pre-multiplying by inverse of (modified) intrinsic matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8
  • 9. Euclidean transformation Homogeneous: Cartesian: or for short: For short: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9
  • 10. Similarity Transformation • Consider viewing fronto-parallel plane at unknown distance D • By same logic as before we have • Premultiplying by inverse of intrinsic matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
  • 11. Similarity Transformation Simplifying: Multiply each equation by : Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11
  • 12. Similarity Transformation Simplifying: Incorporate the constants by defining: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 12
  • 13. Similarity Transformation Homogeneous: Cartesian: For short: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
  • 14. Affine Transformation Homogeneous: Cartesian: For short: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
  • 15. Affine Transform Affine transform describes mapping well When variation in depth is comparable to when the depth variation within the distance to object then the affine planar object is small and the camera is transformation is not a good model. Here far away we need the homography Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
  • 16. Projective transformation / collinearity / homography Start with basic projection equation: Combining these two matrices we get: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
  • 17. Homography Homogeneous: Cartesian: For short: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 17
  • 18. Adding noise • In the real world, the measured image positions are uncertain. • We model this with a normal distribution • e.g. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18
  • 19. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19
  • 20. Learning and inference problems • Learning – take points on plane and their projections into the image and learn transformation parameters • Inference – take the projection of a point in the image and establish point on plane Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20
  • 21. Learning and inference problems Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
  • 22. Learning transformation models • Maximum likelihood approach • Becomes a least squares problem Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
  • 23. Learning Euclidean parameters Solve for transformation: Remaining problem: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
  • 24. Learning Euclidean parameters Has the general form: • This is an orthogonal Procrustes problem. To solve: • Compute SVD • And then set Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
  • 25. Learning similarity parameters • Solve for rotation matrix as before • Solve for translation and scaling factor Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
  • 26. Learning affine parameters • Affine transform is linear • Solve using least-squares solution Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
  • 27. Learning homography parameters • Homography is not linear – cannot be solved in closed form. Convert to other homogeneous coordinates • Both sides are 3x1 vectors; should be parallel and so cross product will be zero Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27
  • 28. Learning homography parameters • Write out these equations in full • There are only 2 independent equations here – use a minimum of four points to build up a set of equations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28
  • 29. Learning homography parameters • These equations have the form , which we need to solve with the constraint • This is a minimum direction problem – Compute SVD – Take last column of • Then use non-linear optimization Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 29
  • 30. Inference problems • Given point x* in image, find position w* on object Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 30
  • 31. Inference In the absence of noise, we have the relation , or in homogeneous coordinates To solve for the points, we simply invert this relation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 31
  • 32. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 32
  • 33. Problem 1: exterior orientation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 33
  • 34. Problem 1: exterior orientation • Writing out the camera equations in full • Estimate the homography from matched points • Factor out the intrinsic parameters Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 34
  • 35. Problem 1: exterior orientation • To estimate the first two columns of rotation matrix, we compute this singular value decomposition • Then we set Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35
  • 36. Problem 1: exterior orientation • Find the last column using the cross product of first two columns • Make sure the determinant is 1 – if it is -1 then multiply last column by -1. • Find translation scaling factor between old and new values • Finally, set Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 36
  • 37. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 37
  • 38. Problem 2: calibration Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 38
  • 39. Structure Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 39
  • 40. Calibration One approach (not very efficient) is to alternately • Optimize extrinsic parameters for fixed intrinsic • Optimize intrinsic parameters for fixed extrinsic Then use non-linear optimization. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 40
  • 41. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 41
  • 42. Problem 3 - reconstruction Transformation between plane and image: Point in frame of reference of plane: Point in frame of reference of camera Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 42
  • 43. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 43
  • 44. Transformations between images • So far we have considered transformations between the image and a plane in the world • Now consider two cameras viewing the same plane • There is a homography between camera 1 and the plane and a second homography between camera 2 and the plane • It follows that the relation between the two images is also a homography Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 44
  • 45. Properties of the homography Homography is a linear transformation of a ray Equivalently, leave rays and linearly transform image plane – all images formed by all planes that cut the same ray bundle are related by homographies. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 45
  • 46. Camera under pure rotation Special case is camera under pure rotation. Homography can be showed to be Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 46
  • 47. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 47
  • 48. Robust estimation Least squares criterion is not robust to outliers For example, the two outliers here cause the fitted line to be quite wrong. One approach to fitting under these circumstances is to use RANSAC – “Random sampling by consensus” Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 48
  • 49. RANSAC Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 49
  • 50. RANSAC Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 50
  • 51. Fitting a homography with RANSAC Original images Initial matches Inliers from RANSAC Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 51
  • 52. Piecewise planarity Many scenes are not planar, but are nonetheless piecewise planar Can we match all of the planes to one another? Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 52
  • 53. Approach 1 – Sequential RANSAC Problems: greedy algorithm and no need to be spatially coherent Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 53
  • 54. Approach 2 – PEaRL (propose, estimate and re-learn) • Associate label l which indicates which plane we are in • Relation between points xi in image1 and yi in image 2 • Prior on labels is a Markov random field that encourages nearby labels to be similar • Model solved with variation of alpha expansion algorithm Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 54
  • 55. Approach 2 – PEaRL Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 55
  • 56. Structure • Transformation models • Learning and inference in transformation models • Three problems – Exterior orientation – Calibration – Reconstruction • Properties of the homography • Robust estimation of transformations • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 56
  • 57. Augmented reality tracking Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 57
  • 58. Fast matching of keypoints Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 58
  • 59. Visual panoramas Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 59
  • 60. Conclusions • Mapping between plane in world and camera is one-to-one • Takes various forms, but most general is the homography • Revisited exterior orientation, calibration, reconstruction problems from planes • Use robust methods to estimate in the presence of outliers Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 60