Photogrammetry & Robotics Lab 3D Point To Pixel: Estimating The .

Transcription

3D Point to Pixel:Estimating the Parameters of PPhotogrammetry & Robotics LabCamera Calibration:Direct Linear TransformCyrill StachnissThe slides have been created by Cyrill Stachniss.pixelcoordinateworldtransformation coordinate1Estimating Camera ParametersGiven the Geometry2Estimate Ex- and Intrinsics§ Wanted: Extrinsic and intrinsicparameters of a camera§ Given: Coordinates of object points(control points)§ Observed: Coordinatesof thoseknown 3D object points in the imageknown control points34

MappingMappingDirect linear transform (DLT) maps anyobject pointto the image pointDirect linear transform (DLT) maps anyobject pointto the image point5Mapping6Camera ParametersDirect linear transform (DLT) maps anyobject pointto the image point§ Intrinsics§ Camera-internal parameters§ Given through§ Extrinsics§ Pose parameters of the camera§ Given throughand§ Projection matrixcontains both, the in- and extrinsics78

Direct Linear Transform (DLT)How Many Points Are Needed?Compute the 11 intrinsic andextrinsic parametersobservedimage pointEach point gives ? observationequationscontrol pointcoordinates(given)3 translationsc, s, m,xH, yH3 rotations910How Many Points Are Needed?How Many Points Are Needed?Each point gives ? observationequationsEach point gives ? observationequations1112

How Many Points Are Needed?Spatial Resection vs. DLT§ Calibrated camera§ 6 unknowns§ We need at least 3 points§ Problem solved by spatial resectionEach point gives two observationequations, one for each image coordinate§ Uncalibrated camera§§§§11 unknownsWe need at least 6 pointsAssuming the model of an affine cameraProblem solved by DLT1314DLT: Problem Specification§ Task: Estimate the 11 elements of§ Given:DLT: Direct Linear Transform§ 3D coordinatesofobject points§ Observed image coordinatesof anuncalibrated camera with the mappingComputing the Orientationof an Uncalibrated CameraUsing 6 Known Points§ Data association1516

Rearrange the DLT EquationRearrange the DLT EquationDefine the tree vectors A, B, C as follows17Rearrange the DLT Equation18Rearrange the DLT EquationSo what we can rewrite the equation asSo what we can rewrite the equation as1920

Rearrange the DLT EquationRearrange the DLT EquationLeads to an system of equation, which islinear in the parameters A, B and C2122Estimating the Elements of PEstimating the Elements of P§ Collect the elements of P within aparameter vector§ Rewrite§ asrows of P ascolumn-vectors,one below theother (12x1)2324

Estimating the Elements of PVerifying Correctness§ Rewrite§ as§ with25Verifying Correctness26Verifying CorrectnessAABBCC2728

Verifying CorrectnessVerifying Correctness29Estimating the Elements of P30Solving the Linear System(Homogeneous System SVD)§ For each point, we have§ Solving a system of linear equations ofthe formis equivalent tofinding the null space of A§ Thus, we can apply the SVD to solve§ Stacking everything together§ Choose as the singular vectorbelonging to the singular value of 03132

Redundant ObservationsRedundant Observations§ In case of redundant observations,we will have contradictions:§ Singular value decomposition (SVD)§ Findsuch that it minimizes§ Choosing(the singular vectorbelonging to the smallest singularvalue) minimizeswith will have3334Obtaining the Projection MatrixCritical Surfaces§ Choosingminimizesthus is our estimate of P:§ M is of rank 11, ifand§ Number of points 6§ Assumption: no gross errors§ No solution, if all pointslocated on a planearee.g., assume all Zi 0Does this always work?3536

Critical SurfacesCritical Surfaces§ M is of rank 11, if§ M is of rank 11, if§ Number of points 6§ Assumption: no gross errors§ No solution, if all pointslocated on a plane§ Number of points 6§ Assumption: no gross errorsare§ No solution, ifrank deficiency§ All pointsare located on a plane§ (All pointsand the projection centerare located on a twisted cubic curve)3738Decomposition of P§ We have , how to obtain?§ Structure of the projection matrixFromto§ with3940

Decomposition of PDecomposition of P§ We get the projection center through§ We get the projection center throughRotation matrix:§ Let’s look to the structure§ What do we know about the matrices?4142Decomposition of PDecomposition of PRotation matrix:§ Let’s look to the structure§ K is a triangular matrix§ R is a rotation matrixRotation matrix:§ Let’s look to the structure§ K is a triangular matrix§ R is a rotation matrixIs there a matrix decomposition intoa rotation matrix and a triangular on?Is there a matrix decomposition intoa rotation matrix and a triangular on?QR-decomposition4344

Decomposition of PDecomposition of P§ The matrixis homogenous§ Thus, is the calibration matrix§ Due to homogeneity normalize§ We perform this forgiven theorder of rotation and triangular matrix§ QR decomposition ofyieldsrotation and calibration matrixQR4546Decomposition of PDLT in a Nutshell§ Decompositionresults inwith positive diagonal elements§ To get negative camera constant,choose1. Build thefor the linear system2Ix12usingdecomposition still holds12x1with4748

DLT in a NutshellDLT in a Nutshell2. Solve by SVDSolution is last column of3. If individual parameters are needed49Discussion DLT§ We realize50Summaryboth ways§ We are free to choose sign of c§ Solution is instable if the control pointslie approximately on a plane§ Solution is statistically not optimal(no uncertainties of point coordinates)51§ Direct linear transforms estimatesthe intrinsic and extrinsic of a camera§ Computes the parameters for themapping of the uncalibrated camera§ Requires at least 6 known controlpoints in 3D§ Direct solution (no initial guess)52

LiteratureSlide Information§ Förstner & Wrobel, PhotogrammetricComputer Vision, Chapter 11.2§ Förstner, Scriptum Photogrammetrie I,Chapter 13.3§ The slides have been created by Cyrill Stachniss as part of thephotogrammetry and robotics courses.§ I tried to acknowledge all people from whom I usedimages or videos. In case I made a mistake or missedsomeone, please let me know.§ The photogrammetry material heavily relies on the very wellwritten lecture notes by Wolfgang Förstner and thePhotogrammetric Computer Vision book by Förstner & Wrobel.§ Parts of the robotics material stems from the greatProbabilistic Robotics book by Thrun, Burgard and Fox.§ If you are a university lecturer, feel free to use the coursematerial. If you adapt the course material, please make surethat you keep the acknowledgements to others and pleaseacknowledge me as well. To satisfy my own curiosity, pleasesend me email notice if you use my slides.53Cyrill Stachniss, cyrill.stachniss@igg.uni-bonn.de54

DLT in a Nutshell 2. Solve by SVD Solution is last column of 50 DLT in a Nutshell 3. If individual parameters are needed 51 Discussion DLT § We realize both ways § We are free to choose sign of c § Solution is instable if the control points lie approximately on a plane § Solution is statistically not optimal