Page 315 -
P. 315
294 6 Feature-based alignment
Using the orthonormality properties of the rotation matrix R 10 and the fact that the right
hand side of (6.53) is known only up to a scale, we obtain
h
h
h 2 00 + h 2 01 + f 0 −2 2 02 = h 2 10 + h 2 11 + f 0 −2 2 12 (6.54)
and
h 00 h 10 + h 01 h 11 + f 0 −2 h 02 h 12 =0. (6.55)
From this, we can compute estimates for f 0 of
h 2 12 − h 2 02
2
f = if h 2 +h 2 =h 2 +h 2 (6.56)
0 2 2 2 2 00 01 10 11
h + h − h − h
00 01 10 11
or
2 h 02 h 12
f = − if h 00 h 10 = −h 01 h 11 . (6.57)
0
h 00 h 10 + h 01 h 11
(Note that the equations originally given by Szeliski and Shum (1997) are erroneous; the
correct equations are given by Shum and Szeliski (2000).) If neither of these conditions
holds, we can also take the dot products between the first (or second) row and the third one.
˜
Similar results can be obtained for f 1 as well, by analyzing the columns of H 10 . If the focal
length is the same for both images, we can take the geometric mean of f 0 and f 1 as the
√
estimated focal length f = f 1 f 0 . When multiple estimates of f are available, e.g., from
different homographies, the median value can be used as the final estimate.
A more general (upper-triangular) estimate of K can be obtained in the case of a fixed-
parameter camera K i = K using the technique of Hartley (1997b). Observe from (6.52)
−1 ˜ −T T ˜ −T −T −T
that R ij ∼ K H ij K and R ij ∼ K H ij K . Equating R ij = R ij we obtain
−1 ˜ T ˜ −T −T
K H ij K ∼ K H K , from which we get
ij
˜ T T ˜ −T
H ij (KK ) ∼ (KK )H ij . (6.58)
T
This provides us with some homogeneous linear constraints on the entries in A = KK ,
which is known as the dual of the image of the absolute conic (Hartley 1997b; Hartley and
Zisserman 2004). (Recall that when we estimate a homography, we can only recover it up to
˜
an unknown scale.) Given a sufficient number of independent homography estimates H ij ,
we can recover A (up to a scale) using either SVD or eigenvalue analysis and then recover
K through Cholesky decomposition (Appendix A.1.4). Extensions to the cases of temporally
varying calibration parameters and non-stationary cameras are discussed by Hartley, Hayman,
de Agapito et al. (2000) and de Agapito, Hayman, and Reid (2001).
The quality of the intrinsic camera parameters can be greatly increased by constructing a
full 360 panorama, since mis-estimating the focal length will result in a gap (or excessive
◦
overlap) when the first image in the sequence is stitched to itself (Figure 9.5). The resulting
mis-alignment can be used to improve the estimate of the focal length and to re-adjust the
◦
rotation estimates, as described in Section 9.1.4. Rotating the camera by 90 around its optic
axis and re-shooting the panorama is a good way to check for aspect ratio and skew pixel
problems, as is generating a full hemi-spherical panorama when there is sufficient texture.
Ultimately, however, the most accurate estimate of the calibration parameters (including
radial distortion) can be obtained using a full simultaneous non-linear minimization of the
intrinsic and extrinsic (rotation) parameters, as described in Section 9.2.