Camera Calibration from
Planar Patterns
Homework 2 Help Session CS223b Stanford University
Mitul Saha
(courtesy:
Jean-Yves Bouguet, Intel)
Camera Calibration
W
X
W
Y
W
Z
Object Space Image Space
xc
yc
M
m
m = [Camera Projection Matrix] M
A [R t]
camera intrinsics extrinsics
f x
f y
f x
alpha* ox
oy
0
0 0 1
Camera Calibration
W
X
W
Y
W
Z
Object Space Image Space
xc
yc
M
m
m = [Camera Projection Matrix] M
A [R t]
camera intrinsics extrinsics
f x
f y
f x
alpha* ox
oy
0
0 0 1
• Camera calibration is about
finding the camera intrinsics
• But, why do we need them?
Camera Calibration
• Common approach
Planar pattern
Non-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]
observed
estimate: A [R t] M
Minimize:
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]
observed
estimate: A [R t] M
Minimize:
• Two steps:
• Find an initial solution
for A [R t]
• Minimize the objective function
using the initial solution
Camera Calibration from
Planar Patterns
• Finding an initial solution
– First step
• Estimate the image homography matrix H for each image
[u, v, 1]T
x is the eigenvector of LT
L
with smallest eigenvalue
Initial solution for minimization:
Minimize:
L
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 is the eigenvector of VT
V
with smallest eigenvalue
V =
B = A –T
A -1
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:
• b yields the intrinsic parameter matrix A.
Rotation matrix [r1 r2 r3] and translation t is computed from:
V b = 0
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:
• 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: RT
R=RRT
=I.
One can it enforce by: min||Rnew - R||,
[U D V] = SVD(R),
Rnew = UVT
V b = 0
Camera Calibration from
Planar Patterns
m = [Camera Projection Matrix] M
A [R t]
observed
estimate: A [R t] M
Minimize:
• Two steps:
• Find an initial solution
for A [R t]
• Minimize the objective function
using the initial solution
use “lsqnonlin” in Matlab

cameraCalibrationpowerpointPresesntation.ppt

  • 1.
    Camera Calibration from PlanarPatterns Homework 2 Help Session CS223b Stanford University Mitul Saha (courtesy: Jean-Yves Bouguet, Intel)
  • 2.
    Camera Calibration W X W Y W Z Object SpaceImage Space xc yc M m m = [Camera Projection Matrix] M A [R t] camera intrinsics extrinsics f x f y f x alpha* ox oy 0 0 0 1
  • 3.
    Camera Calibration W X W Y W Z Object SpaceImage Space xc yc M m m = [Camera Projection Matrix] M A [R t] camera intrinsics extrinsics f x f y f x alpha* ox oy 0 0 0 1 • Camera calibration is about finding the camera intrinsics • But, why do we need them?
  • 4.
    Camera Calibration • Commonapproach Planar pattern Non-planar pattern
  • 5.
    Camera Calibration from PlanarPatterns • ICCV Zhang’99: “Flexible Calibration by Viewing a Plane From Unknown Orientations” m = [Camera Projection Matrix] M A [R t] observed estimate: A [R t] M Minimize:
  • 6.
    Camera Calibration from PlanarPatterns • ICCV Zhang’99: “Flexible Calibration by Viewing a Plane From Unknown Orientations” m = [Camera Projection Matrix] M A [R t] observed estimate: A [R t] M Minimize: • Two steps: • Find an initial solution for A [R t] • Minimize the objective function using the initial solution
  • 7.
    Camera Calibration from PlanarPatterns • Finding an initial solution – First step • Estimate the image homography matrix H for each image [u, v, 1]T x is the eigenvector of LT L with smallest eigenvalue Initial solution for minimization: Minimize: L
  • 8.
    Camera Calibration from PlanarPatterns • 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 is the eigenvector of VT V with smallest eigenvalue V = B = A –T A -1
  • 9.
    Camera Calibration from PlanarPatterns • Finding an initial solution – First step • Estimate the image homography matrix H for each image – Second step • Solve for b in the linear system: • b yields the intrinsic parameter matrix A. Rotation matrix [r1 r2 r3] and translation t is computed from: V b = 0
  • 10.
    Camera Calibration from PlanarPatterns • Finding an initial solution – First step • Estimate the image homography matrix H for each image – Second step • Solve for b in the linear system: • 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: RT R=RRT =I. One can it enforce by: min||Rnew - R||, [U D V] = SVD(R), Rnew = UVT V b = 0
  • 11.
    Camera Calibration from PlanarPatterns m = [Camera Projection Matrix] M A [R t] observed estimate: A [R t] M Minimize: • Two steps: • Find an initial solution for A [R t] • Minimize the objective function using the initial solution use “lsqnonlin” in Matlab