Computer Vson Exercse Sesson 1
Organzaton Teachng assstant Basten Jacquet CAB G81.2 basten.jacquet@nf.ethz.ch Federco Camposeco CNB D12.2 fede@nf.ethz.ch Lecture webpage http://www.cvg.ethz.ch/teachng/compvs/ndex.php
Organzaton Assgnments wll be part of the fnal grade Assgnment every week (or every two weeks the second part) 1 or 2 weeks tme to solve the assgnment Hand-n Thursday 13: (sharp!) Bonus ponts can be used to compensate for mssng ponts MATLAB Download (www.stud-des.ethz.ch)
Lterature Computer Vson: Algorthms and Applcaton by Rchard Szelsk, avalable onlne ( http://szelsk.org/book/ ) Multple Vew Geometry by Rchard Hartley and Andrew Zsserman Course Notes http://cvg.ethz.ch/teachng/compvs/tutoral.pdf
Camera Calbraton Intrnsc parameters K Radal dstorton coeffcents 2D ponts 3D ponts x x K R t
Camera Calbraton Use your own camera Buld your own calbraton object rnt checkerboard patterns Stch to two orthogonal planes Z Y
Camera Calbraton 4 Tasks: Data normalzaton Drect Lnear Transform (DLT) Gold Standard algorthm Bouguet s Calbraton Toolbox Use the same settngs for all tasks! Good reference: Multple Vew Geometry n computer vson (Rchard Hartley & Andrew Zsserman)
Data normalzaton Shft the centrod of the ponts to the orgn Scale the ponts so that average dstance to the orgn s and, respectvely. Determne usng normalzed ponts. Determne 1 3 3 3 1 2 2 1 1 z D y D x D y D x D c s c s c s c s c s U T 3 U T ˆ 1 2 ˆ
Drect Lnear Transform (DLT) 4 3, 3,3 2 1, 1,1 3 2 1 1 1 y y y y x x x x y w x w z y x z y x z y x z y x T T T T T T A
2n 2n 2n 12 Drect Lnear Transform (DLT) Sngular Value Decomposton 12 2n 12 12 A = U S V
2n 2n 2n 12 Drect Lnear Transform (DLT) Sngular Value Decomposton 12 2n 12 12 A = U S V = 1,1 1, 2 3,3 3, 4 1,1 2,1 3,1 1, 2 2, 2 3, 2 1,3 2,3 3,3 1, 4 2, 4 3, 4
Camera Matrx Decomposton (K and R) R t KR KRC K K s upper trangular R s orthonormal QR decomposton A = QR Q s orthogonal R s upper trangular
Camera Matrx Decomposton (K and R) K R t KR KRC M KR M 1 R 1 K 1 Run QR decomposton on the nverse of the left 3x3 part of Invert both result matrces to get K and R
Camera Matrx Decomposton (C) The camera center s the pont for whch C Ths s the rght null vector of ( SVD)
Gold Standard Algorthm Normalze data Run DLT to get ntal values Compute optmal squared reprojecton errors ˆ by mnmzng the sum of ˆ N mn d( 1 xˆ, ˆ ˆ ) 2 Denormalze ˆ
Mnmzaton n MATLAB Fmnsearch(...) See code framework Lsqnonln(...) nonlnear least-squares Vectorze your parameters
Bouguet s Calbraton Toolbox Download and nstall the toolbox: (http://www.vson.caltech.edu/bouguetj/calb_doc/ndex.html) Go through the tutoral and learn how to calbrate a camera wth that toolbox rnt your own calbraton pattern (avalable on the webste) Use the toolbox for calbraton and compare the result wth the results of your own calbraton algorthm
Hand-n Source code Matlab.mat fle wth hand-clcked 3D-2D correspondences Image used for calbraton Vsualze hand-clcked ponts and reprojected 3D ponts Dscuss and compare values of calbraton obtaned for all methods Dscuss average reprojecton error of all methods.
Some hnts Work wth normalzed homogeneous coordnates always. Camera calbraton K should respect ths conventon. Check that the obtaned orentaton R correspond to the expected world value, otherwse K wll have negatve values n ts dagonal. When reprojectng ponts use average of reprojecton error for comparson and remember to normalze reprojected coordnates to w = 1. Remember to use the same camera wth the same settngs for all tasks!
Hand-n Example reprojecton of the the 3D ponts