SlideShare a Scribd company logo
1 of 55
Computer vision: models,
 learning and inference
          Chapter 16
        Multiple Cameras



    Please send errata to s.prince@cs.ucl.ac.uk
Structure from motion
Given
• an object that can be characterized by I 3D points
• projections into J images
Find
• Intrinsic matrix
• Extrinsic matrix for each of J images
• 3D points




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




For simplicity we’ll start with simpler problem

   •   Just J=2 images
   •   Known intrinsic matrix

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

•   Two view geometry
•   The essential and fundamental matrices
•   Reconstruction pipeline
•   Rectification
•   Multi-view reconstruction
•   Applications


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   4
Epipolar lines




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




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   6
Special configurations




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

•   Two view geometry
•   The essential and fundamental matrices
•   Reconstruction pipeline
•   Rectification
•   Multi-view reconstruction
•   Applications


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   8
The essential matrix
The geometric relationship between the two cameras is
captured by the essential matrix.
Assume normalized cameras, first camera at origin.



First camera:




Second camera:
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   9
The essential matrix
First camera:


Second camera:


Substituting:



This is a mathematical relationship between the points in the
two images, but it’s not in the most convenient form.

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   10
The essential matrix


Take cross product with (last term disappears)



Take inner product of both sides with x2.




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   11
The essential matrix

The cross product term can be expressed as a matrix




Defining:


We now have the essential matrix relation



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   12
Properties of the essential matrix


•   Rank 2:

•   5 degrees of freedom

•   Non-linear constraints between elements




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   13
Recovering epipolar lines
Equation of a line:




or



or




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   14
Recovering epipolar lines
Equation of a line:


Now consider



This has the form                               where

So the epipolar lines are




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   15
Recovering epipoles
Every epipolar line in image 1 passes through the epipole e1.

In other words                                             for ALL

This can only be true if e1 is in the nullspace of E.


Similarly:


We find the null spaces by computing                                                        , and
taking the last column of and the last row of                                           .
             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince               16
Decomposition of E
Essential matrix:


To recover translation and rotation use the matrix:




We take the SVD                                            and then we set




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   17
Four interpretations


                                                               To get the different
                                                             solutions we mutliply
                                                              by -1 and substitute




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince        18
The fundamental matrix
Now consider two cameras that are not normalised



By a similar procedure to before we get the relation


 or

where


Relation between essential and fundamental

        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   19
Fundamental matrix criterion




   Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   20
Estimation of fundamental matrix
When the fundamental matrix is correct, the epipolar line
induced by a point in the first image should pass through the
matching point in the second image and vice-versa.
This suggests the criterion




If                  and                              then

Unfortunately, there is no closed form solution for this
quantity.
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   21
The 8 point algorithm
Approach:
   • solve for fundamental matrix using homogeneous
      coordinates
   • closed form solution (but to wrong problem!)
   • Known as the 8 point algorithm

Start with fundamental matrix relation


Writing out in full


or
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   22
The 8 point algorithm

Can be written as:


where

Stacking together constraints from at least 8 pairs of points we
    get the system of equations




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   23
The 8 point algorithm



Minimum direction problem of the form                                               ,
Find minimum of        subject to                                            .

To solve, compute the SVD                                                  and then
set     to the last column of                          .



         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince       24
Fitting concerns
•   This procedure does not ensure that solution is rank 2.
    Solution: set last singular value to zero.
•   Can be unreliable because of numerical problems to do with
    the data scaling – better to re-scale the data first
•   Needs 8 points in general positions (cannot all be planar).
•   Fails if there is not sufficient translation between the views
•   Use this solution to start non-linear optimisation of true
    criterion (must ensure non-linear constraints obeyed).
•   There is also a 7 point algorithm for (useful if fitting
    repeatedly in RANSAC)
            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   25
Structure

•   Two view geometry
•   The essential and fundamental matrices
•   Reconstruction pipeline
•   Rectification
•   Multi-view reconstruction
•   Applications


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   26
Two view reconstruction pipeline




Start with pair of images taken from slightly different viewpoints



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   27
Two view reconstruction pipeline




Find features using a corner detection algorithm



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   28
Two view reconstruction pipeline




Match features using a greedy algorithm



           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   29
Two view reconstruction pipeline




Fit fundamental matrix using robust algorithm such as RANSAC



           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   30
Two view reconstruction pipeline




Find matching points that agree with the fundamental matrix



           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   31
Two view reconstruction pipeline
•    Extract essential matrix from fundamental matrix
•    Extract rotation and translation from essential matrix
•    Reconstruct the 3D positions w of points
•    Then perform non-linear optimisation over points and
     rotation and translation between cameras




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   32
Two view reconstruction pipeline




      Reconstructed depth indicated by color



    Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   33
Dense Reconstruction
•   We’d like to compute a dense depth map (an estimate of the
    disparity at every pixel)
•   www
•   Approaches to this include dynamic programming and graph
    cuts

•   However, they all assume that the correct match for each
    point is on the same horizontal line.

•   To ensure this is the case, we warp the images

•   This process is known as rectification

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

•   Two view geometry
•   The essential and fundamental matrices
•   Reconstruction pipeline
•   Rectification
•   Multi-view reconstruction
•   Applications


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   35
Rectification
We have already seen
one situation where the
epipolar lines are
horizontal and on the
same line:

when the camera
movement is pure
translation in the u
direction.



              Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   36
Planar rectification


Apply homographies
    and    to image
1 and 2




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   37
Planar rectification
•   Start with which breaks down as
    • Move origin to center of image



    •   Rotate epipole to horizontal direction



    •   Move epipole to infinity




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   38
Planar rectification
•   There is a family of possible homographies that can be
    applied to image 1 to achieve the desired effect

•   These can be parameterized as                                                     where




•   One way to choose this is to pick the parameter that makes
    the mapped points in each transformed image closest in a
    least squares sense




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




Before rectification, the epipolar lines converge


      Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   40
After rectification




After rectification the epipolar lines are horizontal
           and aligned with one another

        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   41
Polar rectification




Planar rectification does not work if epipole lies within the image.



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   42
Polar rectification




Polar rectification works in this situation, but distorts the
                       image more
        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   43
Dense Stereo




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

•   Two view geometry
•   The essential and fundamental matrices
•   Reconstruction pipeline
•   Rectification
•   Multi-view reconstruction
•   Applications


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   45
Multi-view reconstruction




 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   46
Multi-view reconstruction




 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   47
Reconstruction from video
1. Images taken from same camera and can also optimise for
   intrinsic parameters (auto-calibration)

2. Matching points is easier as can track them through the video

3. Not every point is within every image

4. Additional constraints on matching – three-view equivalent of
   fundamental matrix is tri-focal tensor

5. New ways of initialising all of the camera parameters
   simultaneously (factorisation algorithm)


           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   48
Bundle Adjustment
Bundle adjustment refers to process of refining initial estimates
   of structure and motion using non-linear optimisation.




 This problem has the least                         where:
 squares form:




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   49
Bundle Adjustment
This type of least squares problem is suited to optimisation
techniques such as the Gauss-=Newton method:



Where


The bulk of the work is inverting JTJ. To do this efficiently, we
must exploit the structure within the matrix.



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

•   Two view geometry
•   The essential and fundamental matrices
•   Reconstruction pipeline
•   Rectification
•   Multi-view reconstruction
•   Applications


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   51
3D reconstruction pipeline




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   52
Photo-Tourism




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   53
Volumetric graph cuts




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

•   Given a set of a photos of the same rigid object it is possible
    to build an accurate 3D model of the object and reconstruct
    the camera positions

•   Ultimately relies on a large-scale non-linear optimisation
    procedure.

•   Works if optical properties of the object are simple (no
    specular reflectance etc.)



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

More Related Content

Viewers also liked

Lecture14
Lecture14Lecture14
Lecture14
zukun
 
Lecture27
Lecture27Lecture27
Lecture27
zukun
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identity
zukun
 
Mit6870 orsu lecture12
Mit6870 orsu lecture12Mit6870 orsu lecture12
Mit6870 orsu lecture12
zukun
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
zukun
 
Skiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiabilitySkiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiability
zukun
 
Lecture24
Lecture24Lecture24
Lecture24
zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
zukun
 
My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
zukun
 

Viewers also liked (9)

Lecture14
Lecture14Lecture14
Lecture14
 
Lecture27
Lecture27Lecture27
Lecture27
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identity
 
Mit6870 orsu lecture12
Mit6870 orsu lecture12Mit6870 orsu lecture12
Mit6870 orsu lecture12
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
 
Skiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiabilitySkiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiability
 
Lecture24
Lecture24Lecture24
Lecture24
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 

Similar to 16 cv mil_multiple_cameras

08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
zukun
 
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
zukun
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classification
zukun
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
zukun
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
zukun
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessing
zukun
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
zukun
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
zukun
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
zukun
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
zukun
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
zukun
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_models
zukun
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probability
zukun
 
Building 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D ImagesBuilding 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D Images
Shanglin Yang
 

Similar to 16 cv mil_multiple_cameras (20)

08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
 
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
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classification
 
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
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessing
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
 
Common Probability Distibution
Common Probability DistibutionCommon Probability Distibution
Common Probability Distibution
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_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
 
Building 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D ImagesBuilding 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D Images
 
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, ...
 
3DSensing.ppt
3DSensing.ppt3DSensing.ppt
3DSensing.ppt
 
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
 

More from zukun

ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
zukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
zukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
zukun
 
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
zukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
zukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
zukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
zukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
zukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
zukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
zukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
zukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
zukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
zukun
 
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
zukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
zukun
 
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
zukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
zukun
 
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
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant features
zukun
 
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
zukun
 

More from zukun (20)

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
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant features
 
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 

16 cv mil_multiple_cameras

  • 1. Computer vision: models, learning and inference Chapter 16 Multiple Cameras Please send errata to s.prince@cs.ucl.ac.uk
  • 2. Structure from motion Given • an object that can be characterized by I 3D points • projections into J images Find • Intrinsic matrix • Extrinsic matrix for each of J images • 3D points Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 2
  • 3. Structure from motion For simplicity we’ll start with simpler problem • Just J=2 images • Known intrinsic matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
  • 4. Structure • Two view geometry • The essential and fundamental matrices • Reconstruction pipeline • Rectification • Multi-view reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
  • 5. Epipolar lines Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
  • 6. Epipole Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
  • 7. Special configurations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7
  • 8. Structure • Two view geometry • The essential and fundamental matrices • Reconstruction pipeline • Rectification • Multi-view reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8
  • 9. The essential matrix The geometric relationship between the two cameras is captured by the essential matrix. Assume normalized cameras, first camera at origin. First camera: Second camera: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9
  • 10. The essential matrix First camera: Second camera: Substituting: This is a mathematical relationship between the points in the two images, but it’s not in the most convenient form. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
  • 11. The essential matrix Take cross product with (last term disappears) Take inner product of both sides with x2. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11
  • 12. The essential matrix The cross product term can be expressed as a matrix Defining: We now have the essential matrix relation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 12
  • 13. Properties of the essential matrix • Rank 2: • 5 degrees of freedom • Non-linear constraints between elements Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
  • 14. Recovering epipolar lines Equation of a line: or or Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
  • 15. Recovering epipolar lines Equation of a line: Now consider This has the form where So the epipolar lines are Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
  • 16. Recovering epipoles Every epipolar line in image 1 passes through the epipole e1. In other words for ALL This can only be true if e1 is in the nullspace of E. Similarly: We find the null spaces by computing , and taking the last column of and the last row of . Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
  • 17. Decomposition of E Essential matrix: To recover translation and rotation use the matrix: We take the SVD and then we set Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 17
  • 18. Four interpretations To get the different solutions we mutliply by -1 and substitute Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18
  • 19. The fundamental matrix Now consider two cameras that are not normalised By a similar procedure to before we get the relation or where Relation between essential and fundamental Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19
  • 20. Fundamental matrix criterion Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20
  • 21. Estimation of fundamental matrix When the fundamental matrix is correct, the epipolar line induced by a point in the first image should pass through the matching point in the second image and vice-versa. This suggests the criterion If and then Unfortunately, there is no closed form solution for this quantity. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
  • 22. The 8 point algorithm Approach: • solve for fundamental matrix using homogeneous coordinates • closed form solution (but to wrong problem!) • Known as the 8 point algorithm Start with fundamental matrix relation Writing out in full or Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
  • 23. The 8 point algorithm Can be written as: where Stacking together constraints from at least 8 pairs of points we get the system of equations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
  • 24. The 8 point algorithm Minimum direction problem of the form , Find minimum of subject to . To solve, compute the SVD and then set to the last column of . Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
  • 25. Fitting concerns • This procedure does not ensure that solution is rank 2. Solution: set last singular value to zero. • Can be unreliable because of numerical problems to do with the data scaling – better to re-scale the data first • Needs 8 points in general positions (cannot all be planar). • Fails if there is not sufficient translation between the views • Use this solution to start non-linear optimisation of true criterion (must ensure non-linear constraints obeyed). • There is also a 7 point algorithm for (useful if fitting repeatedly in RANSAC) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
  • 26. Structure • Two view geometry • The essential and fundamental matrices • Reconstruction pipeline • Rectification • Multi-view reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
  • 27. Two view reconstruction pipeline Start with pair of images taken from slightly different viewpoints Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27
  • 28. Two view reconstruction pipeline Find features using a corner detection algorithm Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28
  • 29. Two view reconstruction pipeline Match features using a greedy algorithm Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 29
  • 30. Two view reconstruction pipeline Fit fundamental matrix using robust algorithm such as RANSAC Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 30
  • 31. Two view reconstruction pipeline Find matching points that agree with the fundamental matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 31
  • 32. Two view reconstruction pipeline • Extract essential matrix from fundamental matrix • Extract rotation and translation from essential matrix • Reconstruct the 3D positions w of points • Then perform non-linear optimisation over points and rotation and translation between cameras Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 32
  • 33. Two view reconstruction pipeline Reconstructed depth indicated by color Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 33
  • 34. Dense Reconstruction • We’d like to compute a dense depth map (an estimate of the disparity at every pixel) • www • Approaches to this include dynamic programming and graph cuts • However, they all assume that the correct match for each point is on the same horizontal line. • To ensure this is the case, we warp the images • This process is known as rectification Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 34
  • 35. Structure • Two view geometry • The essential and fundamental matrices • Reconstruction pipeline • Rectification • Multi-view reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35
  • 36. Rectification We have already seen one situation where the epipolar lines are horizontal and on the same line: when the camera movement is pure translation in the u direction. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 36
  • 37. Planar rectification Apply homographies and to image 1 and 2 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 37
  • 38. Planar rectification • Start with which breaks down as • Move origin to center of image • Rotate epipole to horizontal direction • Move epipole to infinity Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 38
  • 39. Planar rectification • There is a family of possible homographies that can be applied to image 1 to achieve the desired effect • These can be parameterized as where • One way to choose this is to pick the parameter that makes the mapped points in each transformed image closest in a least squares sense Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 39
  • 40. Before rectification Before rectification, the epipolar lines converge Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 40
  • 41. After rectification After rectification the epipolar lines are horizontal and aligned with one another Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 41
  • 42. Polar rectification Planar rectification does not work if epipole lies within the image. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 42
  • 43. Polar rectification Polar rectification works in this situation, but distorts the image more Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 43
  • 44. Dense Stereo Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 44
  • 45. Structure • Two view geometry • The essential and fundamental matrices • Reconstruction pipeline • Rectification • Multi-view reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 45
  • 46. Multi-view reconstruction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 46
  • 47. Multi-view reconstruction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 47
  • 48. Reconstruction from video 1. Images taken from same camera and can also optimise for intrinsic parameters (auto-calibration) 2. Matching points is easier as can track them through the video 3. Not every point is within every image 4. Additional constraints on matching – three-view equivalent of fundamental matrix is tri-focal tensor 5. New ways of initialising all of the camera parameters simultaneously (factorisation algorithm) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 48
  • 49. Bundle Adjustment Bundle adjustment refers to process of refining initial estimates of structure and motion using non-linear optimisation. This problem has the least where: squares form: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 49
  • 50. Bundle Adjustment This type of least squares problem is suited to optimisation techniques such as the Gauss-=Newton method: Where The bulk of the work is inverting JTJ. To do this efficiently, we must exploit the structure within the matrix. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 50
  • 51. Structure • Two view geometry • The essential and fundamental matrices • Reconstruction pipeline • Rectification • Multi-view reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 51
  • 52. 3D reconstruction pipeline Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 52
  • 53. Photo-Tourism Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 53
  • 54. Volumetric graph cuts Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 54
  • 55. Conclusions • Given a set of a photos of the same rigid object it is possible to build an accurate 3D model of the object and reconstruct the camera positions • Ultimately relies on a large-scale non-linear optimisation procedure. • Works if optical properties of the object are simple (no specular reflectance etc.) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 55