SlideShare a Scribd company logo
Computer vision: models,
 learning and inference
          Chapter 14
      The pinhole camera



   Please send errata to s.prince@cs.ucl.ac.uk
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   2
Motivation




Sparse stereo reconstruction

Compute the depth at a set
of sparse matching points



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




Real camera image                   Instead model impossible but more
    is inverted                          convenient virtual image

         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   4
Pinhole camera terminology




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




By similar triangles:




               Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   6
Focal length parameters




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   7
Focal length parameters
Can model both
   • the effect of the distance to the focal plane
   • the density of the receptors
with a single focal length parameter




In practice, the receptors may not be square:



So use different focal length parameter for x and y dirns
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   8
Offset parameters
• Current model assumes that pixel (0,0) is
  where the principal ray strikes the image
  plane (i.e. the center)
• Model offset to center




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   9
Skew parameter
• Finally, add skew parameter
• Accounts for image plane being not exactly perpendicular to
  the principal ray




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   10
Position and orientation of camera
• Position w=(u,v,w)T of point in the world is generally not
  expressed in the frame of reference of the camera.
• Transform using 3D transformation




  or



         Point in frame of                           Point in frame of
       reference of camera                          reference of world
              Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   11
Complete pinhole camera model




• Intrinsic parameters                                 (stored as intrinsic matrix)



• Extrinsic parameters



           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   12
Complete pinhole camera model



For short:



Add noise – uncertainty in localizing feature in image




             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   13
Radial distortion




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   14
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   15
Problem 1: Learning extrinsic
     parameters (exterior orientation)




Use maximum likelihood:



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   16
Problem 2 – Learning intrinsic
           parameters (calibration)




Use maximum likelihood:




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




• Use 3D target with known 3D points
        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   18
Problem 3 – Inferring 3D points
      (triangulation / reconstruction)




Use maximum likelihood:




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   19
Solving the problems
• None of these problems can be solved in closed form

• Can apply non-linear optimization to find best solution but
  slow and prone to local minima

• Solution – convert to a new representation (homogeoneous
  coordinates) where we can solve in closed form.

• Caution! We are not solving the true problem – finding
  global minimum of wrong problem. But can use as starting
  point for non-linear optimization of true problem


           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   20
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   21
Homogeneous coordinates
Convert 2D coordinate to 3D




To convert back




        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   22
Geometric interpretation of
homogeneous coordinates




 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   23
Pinhole camera in
       homogeneous coordinates
Camera model:




In homogeneous coordinates:


                                                                                    (linear!)



         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince          24
Pinhole camera in
        homogeneous coordinates



Writing out these three equations




Eliminate to retrieve original equations

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   25
Adding in extrinsic parameters



Or for short:




Or even shorter:



           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   26
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   27
Problem 1: Learning extrinsic
     parameters (exterior orientation)




Use maximum likelihood:



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   28
Exterior orientation
Start with camera equation in homogeneous coordinates




Pre-multiply both sides by inverse of camera calibration matrix




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   29
Exterior orientation
Start with camera equation in homogeneous coordinates




Pre-multiply both sides by inverse of camera calibration matrix




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



The third equation gives us an expression for



Substitute back into first two lines




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   31
Exterior orientation


Linear equation – two equations per point –
form system of equations




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




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       33
Exterior orientation
Now we extract the values of                             and            from      .
Problem: the scale is arbitrary and the rows and
columns of the rotation matrix may not be orthogonal.

Solution: compute SVD                                                  and then
choose              .

Use the ratio between the rotation matrix before and
after to rescale



Use these estimates for start of non-linear optimisation.
       Computer vision: models, learning and inference. ©2011 Simon J.D. Prince       34
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   35
Problem 2 – Learning intrinsic
           parameters (calibration)




Use maximum likelihood:




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   36
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         37
Intrinsic parameters


Maximum likelihood approach




This is a least squares problem.



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


The function                     is linear w.r.t. intrinsic
parameters. Can be written in form




Now solve least squares problem



          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   39
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   40
Problem 3 – Inferring 3D points
      (triangulation / reconstruction)




Use maximum likelihood:




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


Write jth pinhole camera in homogeneous coordinates:




Pre-multiply with inverse of intrinsic matrix




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


Last equations gives

Substitute back into first two equations



Re-arranging get two linear equations for [u,v,w]



Solve using >1 cameras and then use non-linear optimization
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   43
Structure
•   Pinhole camera model
•   Three geometric problems
•   Homogeneous coordinates
•   Solving the problems
    – Exterior orientation problem
    – Camera calibration
    – 3D reconstruction
• Applications
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   44
Depth from structured light




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   45
Depth from structured light




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   46
Depth from structured light




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   47
Shape from silhouette




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




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




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   50
Conclusion
• Pinhole camera model is a non-linear function
  who takes points in 3D world and finds where
  they map to in image
• Parameterized by intrinsic and extrinsic
  matrices
• Difficult to estimate intrinsic/extrinsic/depth
  because non-linear
• Use homogeneous coordinates where we can
  get closed from solutions (initial solns only)
         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   51

More Related Content

Viewers also liked

CVPR2010: higher order models in computer vision: Part 3
CVPR2010: higher order models in computer vision: Part 3CVPR2010: higher order models in computer vision: Part 3
CVPR2010: higher order models in computer vision: Part 3zukun
 
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming..."The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
Edge AI and Vision Alliance
 
Towards Embedded Computer Vision - New @ 2013
Towards Embedded Computer Vision - New @ 2013Towards Embedded Computer Vision - New @ 2013
"Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro...
"Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro..."Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro...
"Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro...
Edge AI and Vision Alliance
 
General introduction to computer vision
General introduction to computer visionGeneral introduction to computer vision
General introduction to computer visionbutest
 
Camera obscura pinhole
Camera obscura pinholeCamera obscura pinhole
Camera obscura pinholeINS Tremp
 
The history of the pinhole camera
The history of the pinhole cameraThe history of the pinhole camera
The history of the pinhole camera
tianaphoto
 

Viewers also liked (7)

CVPR2010: higher order models in computer vision: Part 3
CVPR2010: higher order models in computer vision: Part 3CVPR2010: higher order models in computer vision: Part 3
CVPR2010: higher order models in computer vision: Part 3
 
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming..."The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
 
Towards Embedded Computer Vision - New @ 2013
Towards Embedded Computer Vision - New @ 2013Towards Embedded Computer Vision - New @ 2013
Towards Embedded Computer Vision - New @ 2013
 
"Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro...
"Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro..."Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro...
"Computer Vision 2.0: Where We Are and Where We're Going," a Presentation fro...
 
General introduction to computer vision
General introduction to computer visionGeneral introduction to computer vision
General introduction to computer vision
 
Camera obscura pinhole
Camera obscura pinholeCamera obscura pinhole
Camera obscura pinhole
 
The history of the pinhole camera
The history of the pinhole cameraThe history of the pinhole camera
The history of the pinhole camera
 

Similar to 14 cv mil_the_pinhole_camera

16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameraszukun
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformationszukun
 
17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shapezukun
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classificationzukun
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regressionzukun
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_wordszukun
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessingzukun
 
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
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densitieszukun
 
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
potaters
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identityzukun
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_gridszukun
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_modelszukun
 
3DSensing.ppt
3DSensing.ppt3DSensing.ppt
3DSensing.ppt
TejaReddy453140
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_modelszukun
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_modelszukun
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inferencezukun
 
Realism in Computer Graphics
Realism in Computer GraphicsRealism in Computer Graphics
Realism in Computer Graphics
Barani Tharan
 
Single Camera Calibration Using Partially Visible Calibration Objects Based o...
Single Camera Calibration Using Partially Visible Calibration Objects Based o...Single Camera Calibration Using Partially Visible Calibration Objects Based o...
Single Camera Calibration Using Partially Visible Calibration Objects Based o...
Yuji Oyamada
 
nilesh-Mtech-presentation
nilesh-Mtech-presentationnilesh-Mtech-presentation
nilesh-Mtech-presentationNilesh Heda
 

Similar to 14 cv mil_the_pinhole_camera (20)

16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameras
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformations
 
17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shape
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classification
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
 
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
 
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
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
 
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
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
 
3DSensing.ppt
3DSensing.ppt3DSensing.ppt
3DSensing.ppt
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_models
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
 
Realism in Computer Graphics
Realism in Computer GraphicsRealism in Computer Graphics
Realism in Computer Graphics
 
Single Camera Calibration Using Partially Visible Calibration Objects Based o...
Single Camera Calibration Using Partially Visible Calibration Objects Based o...Single Camera Calibration Using Partially Visible Calibration Objects Based o...
Single Camera Calibration Using Partially Visible Calibration Objects Based o...
 
nilesh-Mtech-presentation
nilesh-Mtech-presentationnilesh-Mtech-presentation
nilesh-Mtech-presentation
 

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

Authentically Social by Corey Perlman - EO Puerto Rico
Authentically Social by Corey Perlman - EO Puerto RicoAuthentically Social by Corey Perlman - EO Puerto Rico
Authentically Social by Corey Perlman - EO Puerto Rico
Corey Perlman, Social Media Speaker and Consultant
 
20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf
tjcomstrang
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
daothibichhang1
 
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdfikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
agatadrynko
 
Recruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media MasterclassRecruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media Masterclass
LuanWise
 
Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...
dylandmeas
 
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintAffordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Navpack & Print
 
FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134
LR1709MUSIC
 
Kseniya Leshchenko: Shared development support service model as the way to ma...
Kseniya Leshchenko: Shared development support service model as the way to ma...Kseniya Leshchenko: Shared development support service model as the way to ma...
Kseniya Leshchenko: Shared development support service model as the way to ma...
Lviv Startup Club
 
Meas_Dylan_DMBS_PB1_2024-05XX_Revised.pdf
Meas_Dylan_DMBS_PB1_2024-05XX_Revised.pdfMeas_Dylan_DMBS_PB1_2024-05XX_Revised.pdf
Meas_Dylan_DMBS_PB1_2024-05XX_Revised.pdf
dylandmeas
 
Cracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptxCracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptx
Workforce Group
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
Operational Excellence Consulting
 
Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024
Kirill Klimov
 
BeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdfBeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdf
DerekIwanaka1
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
fisherameliaisabella
 
Exploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social DreamingExploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social Dreaming
Nicola Wreford-Howard
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdf
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdfBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdf
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdf
daothibichhang1
 
An introduction to the cryptocurrency investment platform Binance Savings.
An introduction to the cryptocurrency investment platform Binance Savings.An introduction to the cryptocurrency investment platform Binance Savings.
An introduction to the cryptocurrency investment platform Binance Savings.
Any kyc Account
 
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBdCree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
creerey
 
Project File Report BBA 6th semester.pdf
Project File Report BBA 6th semester.pdfProject File Report BBA 6th semester.pdf
Project File Report BBA 6th semester.pdf
RajPriye
 

Recently uploaded (20)

Authentically Social by Corey Perlman - EO Puerto Rico
Authentically Social by Corey Perlman - EO Puerto RicoAuthentically Social by Corey Perlman - EO Puerto Rico
Authentically Social by Corey Perlman - EO Puerto Rico
 
20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
 
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdfikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
 
Recruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media MasterclassRecruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media Masterclass
 
Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...
 
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintAffordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n Print
 
FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134
 
Kseniya Leshchenko: Shared development support service model as the way to ma...
Kseniya Leshchenko: Shared development support service model as the way to ma...Kseniya Leshchenko: Shared development support service model as the way to ma...
Kseniya Leshchenko: Shared development support service model as the way to ma...
 
Meas_Dylan_DMBS_PB1_2024-05XX_Revised.pdf
Meas_Dylan_DMBS_PB1_2024-05XX_Revised.pdfMeas_Dylan_DMBS_PB1_2024-05XX_Revised.pdf
Meas_Dylan_DMBS_PB1_2024-05XX_Revised.pdf
 
Cracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptxCracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptx
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
 
Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024
 
BeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdfBeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdf
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
 
Exploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social DreamingExploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social Dreaming
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdf
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdfBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdf
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc.pdf
 
An introduction to the cryptocurrency investment platform Binance Savings.
An introduction to the cryptocurrency investment platform Binance Savings.An introduction to the cryptocurrency investment platform Binance Savings.
An introduction to the cryptocurrency investment platform Binance Savings.
 
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBdCree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
 
Project File Report BBA 6th semester.pdf
Project File Report BBA 6th semester.pdfProject File Report BBA 6th semester.pdf
Project File Report BBA 6th semester.pdf
 

14 cv mil_the_pinhole_camera

  • 1. Computer vision: models, learning and inference Chapter 14 The pinhole camera Please send errata to s.prince@cs.ucl.ac.uk
  • 2. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 2
  • 3. Motivation Sparse stereo reconstruction Compute the depth at a set of sparse matching points Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
  • 4. Pinhole camera Real camera image Instead model impossible but more is inverted convenient virtual image Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
  • 5. Pinhole camera terminology Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
  • 6. Normalized Camera By similar triangles: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
  • 7. Focal length parameters Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7
  • 8. Focal length parameters Can model both • the effect of the distance to the focal plane • the density of the receptors with a single focal length parameter In practice, the receptors may not be square: So use different focal length parameter for x and y dirns Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8
  • 9. Offset parameters • Current model assumes that pixel (0,0) is where the principal ray strikes the image plane (i.e. the center) • Model offset to center Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9
  • 10. Skew parameter • Finally, add skew parameter • Accounts for image plane being not exactly perpendicular to the principal ray Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
  • 11. Position and orientation of camera • Position w=(u,v,w)T of point in the world is generally not expressed in the frame of reference of the camera. • Transform using 3D transformation or Point in frame of Point in frame of reference of camera reference of world Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11
  • 12. Complete pinhole camera model • Intrinsic parameters (stored as intrinsic matrix) • Extrinsic parameters Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 12
  • 13. Complete pinhole camera model For short: Add noise – uncertainty in localizing feature in image Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
  • 14. Radial distortion Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
  • 15. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
  • 16. Problem 1: Learning extrinsic parameters (exterior orientation) Use maximum likelihood: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
  • 17. Problem 2 – Learning intrinsic parameters (calibration) Use maximum likelihood: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 17
  • 18. Calibration • Use 3D target with known 3D points Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18
  • 19. Problem 3 – Inferring 3D points (triangulation / reconstruction) Use maximum likelihood: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19
  • 20. Solving the problems • None of these problems can be solved in closed form • Can apply non-linear optimization to find best solution but slow and prone to local minima • Solution – convert to a new representation (homogeoneous coordinates) where we can solve in closed form. • Caution! We are not solving the true problem – finding global minimum of wrong problem. But can use as starting point for non-linear optimization of true problem Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20
  • 21. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
  • 22. Homogeneous coordinates Convert 2D coordinate to 3D To convert back Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
  • 23. Geometric interpretation of homogeneous coordinates Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
  • 24. Pinhole camera in homogeneous coordinates Camera model: In homogeneous coordinates: (linear!) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
  • 25. Pinhole camera in homogeneous coordinates Writing out these three equations Eliminate to retrieve original equations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
  • 26. Adding in extrinsic parameters Or for short: Or even shorter: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
  • 27. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27
  • 28. Problem 1: Learning extrinsic parameters (exterior orientation) Use maximum likelihood: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28
  • 29. Exterior orientation Start with camera equation in homogeneous coordinates Pre-multiply both sides by inverse of camera calibration matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 29
  • 30. Exterior orientation Start with camera equation in homogeneous coordinates Pre-multiply both sides by inverse of camera calibration matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 30
  • 31. Exterior orientation The third equation gives us an expression for Substitute back into first two lines Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 31
  • 32. Exterior orientation Linear equation – two equations per point – form system of equations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 32
  • 33. Exterior orientation 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 33
  • 34. Exterior orientation Now we extract the values of and from . Problem: the scale is arbitrary and the rows and columns of the rotation matrix may not be orthogonal. Solution: compute SVD and then choose . Use the ratio between the rotation matrix before and after to rescale Use these estimates for start of non-linear optimisation. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 34
  • 35. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35
  • 36. Problem 2 – Learning intrinsic parameters (calibration) Use maximum likelihood: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 36
  • 37. 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 37
  • 38. Intrinsic parameters Maximum likelihood approach This is a least squares problem. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 38
  • 39. Intrinsic parameters The function is linear w.r.t. intrinsic parameters. Can be written in form Now solve least squares problem Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 39
  • 40. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 40
  • 41. Problem 3 – Inferring 3D points (triangulation / reconstruction) Use maximum likelihood: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 41
  • 42. Reconstruction Write jth pinhole camera in homogeneous coordinates: Pre-multiply with inverse of intrinsic matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 42
  • 43. Reconstruction Last equations gives Substitute back into first two equations Re-arranging get two linear equations for [u,v,w] Solve using >1 cameras and then use non-linear optimization Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 43
  • 44. Structure • Pinhole camera model • Three geometric problems • Homogeneous coordinates • Solving the problems – Exterior orientation problem – Camera calibration – 3D reconstruction • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 44
  • 45. Depth from structured light Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 45
  • 46. Depth from structured light Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 46
  • 47. Depth from structured light Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 47
  • 48. Shape from silhouette Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 48
  • 49. Shape from silhouette Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 49
  • 50. Shape from silhouette Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 50
  • 51. Conclusion • Pinhole camera model is a non-linear function who takes points in 3D world and finds where they map to in image • Parameterized by intrinsic and extrinsic matrices • Difficult to estimate intrinsic/extrinsic/depth because non-linear • Use homogeneous coordinates where we can get closed from solutions (initial solns only) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 51