Camera Calibration from
Planar Patterns
(courtesy:
Jean-Yves Bouguet, Intel)
Mitul Saha
Homework 2 Help Session CS223b Stanford University
Camera Calibration
Object Space Image Space
YW
M yc
m
W
Z XW
xc
m = [Camera Projection Matrix] M
fx alpha* f x ox
fy oy
0 A [R t]
0 0 1
camera intrinsics extrinsics
Camera Calibration
Object Space Image Space
YW
M yc
Z WX W m
xc
m = [Camera Projection Matrix] M
fx alpha* f x ox
fy oy • Camera calibration is about
0 A [R t] finding the camera intrinsics
0 0 1 • But, why do we need them?
camera intrinsics extrinsics
Camera Calibration
• Common approach
Non-planar pattern
Planar pattern
Camera Calibration from
Planar Patterns
• ICCV Zhang’99: “Flexible Calibration by
Viewing a Plane From Unknown Orientations”
m = [Camera Projection Matrix] M
A [R t]
Minimize:
estimate: A [R t] M
observed
Camera Calibration from
Planar Patterns
• ICCV Zhang’99: “Flexible Calibration by
Viewing a Plane From Unknown Orientations”
m = [Camera Projection Matrix] M
A [R t] • Two steps:
• Find an initial solution
for A [R t]
Minimize: • Minimize the objective function
using the initial solution
estimate: A [R t] M
observed
Camera Calibration from
Planar Patterns
• Finding an initial solution
– First step
• Estimate the image homography matrix H for each image
[u, v, 1]T
Minimize:
Initial solution for minimization:
L
x is the eigenvector of LTL
with smallest eigenvalue
Camera Calibration from
Planar Patterns
• Finding an initial solution
– First step
• Estimate the image homography matrix H for each image
– Second step
• Solve for b in the linear system: V b = 0
V=
B = A –T A -1
b is the eigenvector of VTV
with smallest eigenvalue
Camera Calibration from
Planar Patterns
• Finding an initial solution
– First step
• Estimate the image homography matrix H for each image
– Second step
• Solve for b in the linear system: V b = 0
• b yields the intrinsic parameter matrix A.
Rotation matrix [r1 r2 r3] and translation t is computed from:
Camera Calibration from
Planar Patterns
• Finding an initial solution
– First step
• Estimate the image homography matrix H for each image
– Second step
• Solve for b in the linear system: V b = 0
• b yields the intrinsic parameter matrix A.
Rotation matrix [r1 r2 r3] and translation t:
• But the computed rotation matrix does not satisfy the properties of
rotation matrix: RTR=RRT=I.
One can it enforce by: min||Rnew - R||,
[U D V] = SVD(R),
Rnew = UVT
Camera Calibration from
Planar Patterns
m = [Camera Projection Matrix] M
A [R t] • Two steps:
• Find an initial solution
for A [R t]
Minimize: • Minimize the objective function
using the initial solution
use “lsqnonlin” in Matlab
estimate: A [R t] M
observed