02-Camera Calibration
02-Camera Calibration
1 Camera Calibration
To precisely know the transformation from the real, 3D world into digital images requires
prior knowledge of many of the camera’s intrinsic parameters. If given an arbitrary
camera, we may or may not have access to these parameters. We do, however, have
access to the images the camera takes. Therefore, can we find a way to deduce them
from images? This problem of estimating the extrinsic and intrinsic camera parameters
is known as camera calibration.
Specifically, we do this by solving for the intrinsic camera matrix K and the extrinsic
parameters R, t from Equation 1.
! "
pi = K R t Pi
(1)
= M Pi
We can describe this problem in the context of a calibration rig, such as the one shown
in Figure 1. The rig usually consists of a simple pattern (i.e. checkerboard) with known
dimensions. Furthermore, the rig defines our world reference frame with origin OW and
axes iW , jW , kW . From the rig’s known pattern, we have known points in the world
reference frame P1 , ..., Pn . Finding these points in the image we take from the camera
gives corresponding points in the image p1 , ..., pn .
∗
Most contents are from
- R. Hartley and A. Zisserman. Multiple View Geometry in Computer Vision (2nd Edition)
- K. Hata and S. Savarese. Course notes of Stanford CS231A
1
Course Note GEO1016: Photogrammetry and 3D Computer Vision
We set up a linear system of equations from the n correspondences such that for each
correspondence Pi , pi : # T %
Pi m 1
' ( PT
ui ) i m3 *
pi = = M Pi = $) * (3)
vi T
&
P m2 i
PT
i m3
As we see from the above equation, each correspondence gives us two equations and,
consequently, two constraints for solving the unknown parameters contained in M . Be-
fore, we know that the camera matrix has 11 unknown parameters. This means that we
need at least 6 correspondences to solve this. However, in the real world, we often use
more, as our measurements are often noisy. To explicitly see this, we can derive a pair of
equations that relate ui and vi with Pi
Given n pairs of these corresponding points, the entire linear system of equations
becomes
(An expanded version of this equation is given in Equation 10). When 2n > 11, this
homogeneous linear system is overdetermined. For such a system m = 0 is always a
trivial solution. Furthermore, even if there were some other m that were a nonzero
solution, then ∀k ∈ R, km is also a solution. Therefore, to constrain our solution, we
complete the following minimization:
minimize $P m$2
m
(5)
subject to $m$2 = 1
2
Course Note GEO1016: Photogrammetry and 3D Computer Vision
3
Course Note GEO1016: Photogrammetry and 3D Computer Vision
With the calibration procedure complete, we warn against degenerate cases. Not all
sets of n correspondences will work. For example, if the points Pi lie on the same plane,
then the system will not be able to be solved. These unsolvable configurations of points
are known as degenerate configurations. More generally, degenerate configurations
have points that lie on the intersection curve of two quadric surfaces. Although this is
outside the scope of the class, you can find more information in Section 1.3 of the Forsyth
& Ponce textbook 2 .
4
Course Note GEO1016: Photogrammetry and 3D Computer Vision
5
Course Note GEO1016: Photogrammetry and 3D Computer Vision
Similar to before, this gives a matrix-vector product that we can solve via SVD:
# %
v1 PT1 −u1 PT1 ' T (
) .. .. * m1 = 0 (13)
$ . . & mT
2
vn Pn −un PTn
T