Post on 10-Jul-2020
transcript
Geometric Camera Calibrationbased on “A Flexible New Technique for Camera
Calibration” by Zhengyou Zhang
Alexander Reuter
2.12.2009
1 / 28Geometric Camera Calibration
N
Motivations
What we know so far
Pinhole cameras are ideal cameras
There doesn’t exist a pinhole camera actually
So there doesn’t exist images obtained by an ideal camera
2 / 28Geometric Camera Calibration
N
Motivations
What is camera calibration?
Find the parameters of a camera that produced several images
Application field
Transform the image to one obtained by an ideal camera
Find the global position and orientation of a camera
Available techniques
Self-calibration
Photogrammetric calibration
3 / 28Geometric Camera Calibration
N
Overview
Overview
Pinhole Camera
Intrinsic parametersExtrinsic parameters
Zhangs Algorithm
Degenerate configurations
4 / 28Geometric Camera Calibration
N
Homography
Properties
Linear projection between two planes
Described by a R3×3 matrix
Advantages
Transformation from a rectangle plane in world space to aquadriliteral in image plane can be described as a homographyproblem
Important tool for camera calibration
5 / 28Geometric Camera Calibration
N
Homography
Homography between image plane and object plane
xcam
ycam
C
zcam
6 / 28Geometric Camera Calibration
N
Homography
example
7 / 28Geometric Camera Calibration
N
Developing intrinsic camera matrix
Motivation
definition of camera properties required to apply cameracalibration
different parameter definitions make introduction necessary
assume naive pinhole camera model
8 / 28Geometric Camera Calibration
N
Pinhole camera
From raw model to an initial transformation matrix
xcam
ycam
C
zcam
Principle Axis
camera centre
f zcamprincipal point
image plane
ximgyimg
xX
f ∗X ′
Z ′
f ∗Y ′
Z ′
X ′
Y ′Z ′
9 / 28Geometric Camera Calibration
N
Pinhole camera
From raw model to an initial transformation matrix
xcam
ycam
C
zcam
Principle Axis
camera centre
f
zcamprincipal point
image plane
ximgyimg
xX
f ∗X ′
Z ′
f ∗Y ′
Z ′
X ′
Y ′Z ′
9 / 28Geometric Camera Calibration
N
Pinhole camera
From raw model to an initial transformation matrix
xcam
ycam
C
zcam
Principle Axis
camera centre
f
zcam
principal point
image plane
ximgyimg
xX
f ∗X ′
Z ′
f ∗Y ′
Z ′
X ′
Y ′Z ′
9 / 28Geometric Camera Calibration
N
Pinhole camera
From raw model to an initial transformation matrix
xcam
ycam
C
zcam
Principle Axis
camera centre
f zcam
principal point
image plane
ximgyimg
xX
f ∗X ′
Z ′
f ∗Y ′
Z ′
X ′
Y ′Z ′
9 / 28Geometric Camera Calibration
N
Development of intrinsic camera matrix
Applying focal length [1]X ′
Y ′
Z ′
1
7−→ fX ′
fY ′
Z ′
=
f 0f 0
1 0
X ′
Y ′
Z ′
1
Focal length examples
Figure: 40mm, 180mm and 600mm focal length
10 / 28Geometric Camera Calibration
N
Development of intrinsic camera matrix
Principal point offset
y
x
ycam
xcamy0
x0
11 / 28Geometric Camera Calibration
N
Development of intrinsic camera matrix
Principal point offsetX ′
Y ′
Z ′
1
7−→ fX ′ + Z ′x0
fY ′ + Z ′y0Z ′
=
f x0 0f y0 0
1 0
X ′
Y ′
Z ′
1
Camera calibration matrix
K :=
f x0f y0
1
12 / 28Geometric Camera Calibration
N
Independent scaling
Unequal scale factors
K :=
αx x0αy y0
1
Skew parameter
K :=
αx s x0αy y0
1
13 / 28Geometric Camera Calibration
N
Development of extrinsic camera matrix
From world to camera coordinates
x
z
xcam
zcam
R, t
14 / 28Geometric Camera Calibration
N
Development of extrinsic camera matrix
Camera rotation and translation
Xcam := object coordinates depending on camera orientation R ∈R3x3 and origin C ∈ R3x1
Getting Xcam
Xcam =
[R −RC0 1
]X ′
Y ′
Z ′
1
=
[R −RC0 1
]X
= R[I | − C ]X
Putting K and Xcam together
x = KXcam = KR[I | − C ]Xt:=−RC
= K [R|t]
15 / 28Geometric Camera Calibration
N
Finite projective camera
Finite projective camera
P ∈ R3×4
P := K [R|t] =
αx s x0αy y0
1
r11 r12 r13 txr21 r22 r23 tyr31 r32 r33 tz
x ′ = PX , where X =
XYZ1
and x ′ =
xyw
⇒ x = x′
w
16 / 28Geometric Camera Calibration
N
Zhangs Algorithm
Prework
Take several images of a planar checkboard
Find checkboard in each image
17 / 28Geometric Camera Calibration
N
Zhangs Algorithm
Prework
Find subpixel corners of eachcheckboard
Get the checkboard coordinate in 2D worldspace of eachcheckboard corner
18 / 28Geometric Camera Calibration
N
Zhangs Algorithm
Algorithm
Estimate a homography for each image
Estimate intrinsic matrix K from the set of homographies
Estimate extrinsic parameters for each checkboard
Estimate coefficients of radial distortion
19 / 28Geometric Camera Calibration
N
Distortion
Two important distortion types
Radialdistortion
Tangentialdistortion
20 / 28Geometric Camera Calibration
N
Estimate coefficients of radial distortion
Distortion in Zhangs Algorithm
Only radial distortion is handled
Estimation provided by minimization
21 / 28Geometric Camera Calibration
N
Zhangs Algorithm
Method Summary
Print a pattern
Take images
Detect feature points
Estimate intrinsic & extrinsic parameters
Estimate coefficients of radial distortion
Refine by minimizing
22 / 28Geometric Camera Calibration
N
Multiple cameras
Scene with several camera positions and orientations
23 / 28Geometric Camera Calibration
N
Multiple cameras
World centered scene
x
z
24 / 28Geometric Camera Calibration
N
Multiple cameras
Scene centered by a selected camera
x
z
25 / 28Geometric Camera Calibration
N
Degenerate configurations
Degenerate configurations
Rotation between two images needed to get homography
Long focal length / small working volume lead to non reliableresults
Outliers in feature point sets not acceptable (RANSAC)
Subpixel accuracy for feature points required
Figure: RANSAC algorithm26 / 28
Geometric Camera Calibration
N
Degenerate configurations
Subpixel & Working volume
x
y
27 / 28Geometric Camera Calibration
N
Conclusion
Summary
Camera calibration obtains intrinsic and extrinsic parameters ofa camera
Plane-to-plane transformations, called Homographies are used tomap from object plane to image plane
Many approaches (like Zhangs) estimate distortions
Relative position and orientation of each camera based on theproperties of a selected camera can be obtained
28 / 28Geometric Camera Calibration
N
Homogeneous coordinates
Cartesian coordinates
Standard coordinate system
Standard matrix operation allows rotation, scaling and shearing
Homogeneous coordinates
Enhanced coordinate system
One matrix operation allows translation and perspectivetransformations additionally
29 / 30Geometric Camera Calibration
N
Homogeneous coordinates
From Cartesian coordinates to Homogeneous coordinates
(xy
)→
xy1
and
xyz
→
xyz1
From Homogeneous coordinates to Cartesian coordinates x
yw
→ (xwyw
)and
xyzw
→ x
wywzw
10
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N
30 / 30Geometric Camera Calibration
N