Camera calibration

Petter Reinholdtsen <pere@td.org.uit.no>

2000-02-01

1 Classical camera calibration theory

In classical camera calibration theory, one needs to solve the following matrix equation with 11 unknowns and 2N x 11 knowns.

[\begin{matrix}X_{1} & Y_{1} & Z_{1} & 1 & 0 & 0 & 0 & 0 & −u_{1}X_{1} & −u_{1}Y_{1} & −u_{1}Z_{1} \\ 0 & 0 & 0 & 0 & X_{1} & Y_{1} & Z_{1} & 1 & −v_{1}X_{1} & −v_{1}Y_{1} & −v_{1}Z_{1} \\ X_{2} & Y_{2} & Z_{2} & 1 & 0 & 0 & 0 & 0 & −u_{2}X_{2} & −u_{2}Y_{2} & −u_{2}Z_{2} \\ 0 & 0 & 0 & 0 & X_{2} & Y_{2} & Z_{2} & 1 & −v_{2}X_{2} & −v_{2}Y_{2} & −v_{2}Z_{2} \\ . & . & . & . & . & . & . & . & . & . & . \\ . & . & . & . & . & . & . & . & . & . & . \\ . & . & . & . & . & . & . & . & . & . & . \\ . & . & . & . & . & . & . & . & . & . & . \\ . & . & . & . & . & . & . & . & . & . & . \\ X_{N} & Y_{N} & Z_{N} & 1 & 0 & 0 & 0 & 0 & −u_{N}X_{N} & −u_{N}Y_{N} & −u_{N}Z_{N} \\ 0 & 0 & 0 & 0 & X_{N} & Y_{N} & Z_{N} & 1 & −v_{N}X_{N} & −v_{N}Y_{N} & −v_{N}Z_{N} \end{matrix} ] · [\begin{matrix}q_{11} \\ q_{12} \\ q_{13} \\ q_{14} \\ q_{21} \\ q_{22} \\ q_{23} \\ q_{24} \\ q_{31} \\ q_{32} \\ q_{33} \end{matrix}] = [\begin{matrix}u_{1} \\ v_{1} \\ u_{2} \\ v_{2} \\ . \\ . \\ . \\ . \\ . \\ u_{N} \\ v_{N} \end{matrix} ]

To solve this equation, the pixel and real world coordinates of at least six points must be known^{1} (N >= 6). (X_{i}, Y_{i}, Z_{i}) is the world coordinates with (u_{i}, v_{i}) image coordinates. q_{ij} is the unknown camera calibration constants.

2 Reconstruction of 3D coordinates

In stereo vision, when the camera calibration for both cameras are known (C = [q_{ij}] and C′ = [q′_{ij}]), the following equation will give the real world coordinates (X, Y, Z) of a common scene point in projected into camera coordinates (u, v) and (u′, v′).

[\begin{matrix}q_{11} − uq_{31} & q_{12} − uq_{32} & q_{13} − uq_{33} \\ q_{21} − vq_{31} & q_{22} − vq_{32} & q_{23} − vq_{33} \\ q′_{11} − u′q′_{31} & q′_{12} − u′q′_{32} & q′_{13} − u′q′_{33} \\ q′_{21} − v′q′_{31} & q′_{22} − v′q′_{32} & q′_{23} − v′q′_{33} \end{matrix}] [\begin{matrix}X \\ Y \\ Z \end{matrix}] = [\begin{matrix}u − q_{14} \\ v − q_{24} \\ u′ − q′_{14} \\ v′ − q′_{24} \end{matrix}]

1Source: UWA Computer Vision IT412 lecture notes