Camera Calibration (Compute Camera Matrix P)
簡韶逸 Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019
1
Camera Calibration (Compute Camera Matrix P) Shao-Yi Chien - - PowerPoint PPT Presentation
Camera Calibration (Compute Camera Matrix P) Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019 1 Outline Camera calibration [Slides credit: Marc Pollefeys] 2 Resectioning X P ? x i
簡韶逸 Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019
1
2
[Slides credit: Marc Pollefeys]
i i
i i
i i PX
Ap
X
Ap
minimal solution Over-determined solution 5½ correspondences needed (say 6) P has 11 dof, 2 independent eq./points
n 6 points Ap
minimize subject to constraint
3
p ˆ
More complicate than 2D case (i) Camera and points on a twisted cubic (ii) Points lie on plane or single line passing through projection center
Less obvious (i) Simple, as before (ii) Anisotropic scaling
3 2
Extend DLT to lines
i
i i 1 TPX
l
(back-project line)
i i 2 TPX
l
(2 independent eq.)
Objective Given n≥6 2D to 2D point correspondences {Xi↔xi’}, determine the Maximum Likelyhood Estimation of P Algorithm (i) Linear solution: (a) Normalization: (b) DLT: (ii) Minimization of geometric error: using the linear estimate as a starting point minimize the geometric error: (iii) Denormalization:
i i
UX X ~
i i
Tx x ~
U P ~ T P
~ ~ ~
(i) Canny edge detection (ii) Straight line fitting to the detected edges (iii) Intersecting the lines to obtain the images corners typically precision <1/10 (HZ rule of thumb: 5n constraints for n unknowns
i i
2
i i i id
i i i i
3
i
i i i i i
3
note that in this case algebraic error = geometric error
Last row = (0, 0, 0, 1)
Objective Given n≥4 2D to 2D point correspondences {Xi↔xi’}, determine the Maximum Likelyhood Estimation of P (remember P3T=(0,0,0,1)) Algorithm (i) Normalization: (ii) For each correspondence (iii) solution is (iv) Denormalization:
i i
UX X ~
i i
Tx x ~
U P ~ T P
8 8
8 8
Minimize geometric error impose constraint through parametrization Image only 9 2n, otherwise 3n+9 5n
Find best fit that satisfies
Minimize algebraic error assume map from param q P=K[R|-RC], i.e. p=g(q) minimize ||Ag(q)||
One only has to work with 12x12 matrix, not 2nx12
p A ~ Ap A p Ap
T T
^
Initialization
Note: can sometimes cause big jump in error Alternative initialization
Calibrated camera, position and orientation unkown Pose estimation 6 dof 3 points minimal (4 solutions in general)
ML residual error Example: n=197, =0.365, =0.37
short and long focal length
𝑦, 𝑧: non-distorted projection 𝑦𝑒, 𝑧𝑒: distorted projection
Choice of the distortion function and center
Computing the parameters of the distortion function (i) Minimize with additional unknowns (ii) Straighten lines (iii) …
: interior parameters
After radial correction
29
Ref: Zhengyou Zhang, “Flexible camera calibration by viewing a plane from unknown orientations,” ICCV1999.
K
≡
30
r1 and r2 are orthonormal
31
32
33
http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#examples
34
http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#examples
35
http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#examples
36
http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#examples
37
http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#examples
38
http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#examples