Weak-Perspective Projection
In some images, parallel lines in scene appear as parallel lines in image, and length ratios along parallel lines are preserved. This is best modelled by weak-perspective projection.
- $$\Delta Z$$: depth variations
- $$Z_{avg}$$: average distance of objects from camera
If $$Z{avg} > c \Delta Z$$, perspective projection can be approximated by weak-perspective projection. All points assumed to lie on the same depth $$Z{avg}$$.
- $$x = \frac{f Xc}{Z{avg}}$$
- $$y = \frac{f Yc}{Z{avg}}$$
- $$\frac{f}{Z_{avg}}$$: scale factor a orthographic projection is up to
$$ \begin{aligned} \tilde{w} &= P{wp} \tilde{X} = P_c P{pll} Pr \tilde{X}\ \begin{bmatrix} su \ sv \ s \end{bmatrix} &= \begin{bmatrix} k_u & 0 & u_0 \ 0 & k_v & v_0 \ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} f & 0 & 0 & 0 \ 0 & f & 0 & 0 \ 0 & 0 & 0 & Z{avg} \end{bmatrix}\begin{bmatrix} R & T \ 0_3^T & 1 \end{bmatrix}\begin{bmatrix} X \ Y \ Z \ 1 \end{bmatrix} \end{aligned}
$$
where $$P{wp}$$ is the projection matrix for a weak-perspective camera, $$P{pll}$$ is the weak-perspective projection matrix.
Affine Camera
Relax the constraints:
$$ \tilde{w} = P{aff} \tilde{X}\ P{aff} = \begin{bmatrix} p{00} & p{01} & p{02} & p{03}\ p{10} & p{11} & p{12} & p{13}\ 0 & 0 & 0 & p_{23}\ \end{bmatrix}
$$
where $$P_{aff}$$ is the projection matrix for an affine camera.
Degree of freedom: 8 (scale does not matter)
Planar Scenes
$$ \begin{aligned} \tilde{w} &= P{wp}^p \tilde{X}^p = P_c P{pll} Pr^p \tilde{X}^p\ \begin{bmatrix} su \ sv \ s \end{bmatrix} &= \begin{bmatrix} k_u & 0 & u_0 \ 0 & k_v & v_0 \ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} f & 0 & 0 & 0 \ 0 & f & 0 & 0 \ 0 & 0 & 0 & Z{avg} \end{bmatrix}\begin{bmatrix} r{00} & r{01} & Tx \ r{10} & r{11} & T_y \ r{20} & r_{21} & T_z \ 0 & 0 & 1 \ \end{bmatrix}\begin{bmatrix} X \ Y \ 1 \end{bmatrix}\end{aligned}
$$
Relaxing on the constraints,
$$ \tilde{w} = P^p{aff} \tilde{X}^p\ P^p{aff} = \begin{bmatrix} p{00} & p{01} & p{02}\ p{10} & p{11} & p{12}\ 0 & 0 & p_{22}\ \end{bmatrix}
$$
$$ \begin{bmatrix} su \ sv \ s \end{bmatrix} = \begin{bmatrix} p{00} & p{01} & p{02} \ p{10} & p{11} & p{12} \ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix}X \ Y \ 1\end{bmatrix}\ \begin{bmatrix} u \ v \end{bmatrix} = \begin{bmatrix} p{00} & p{01} & p{02} \ p{10} & p{11} & p{12} \end{bmatrix}\begin{bmatrix}X \ Y \ 1\end{bmatrix}
$$
Degrees of freedom: 6 (scale does not matter)
Linear Scenes
$$ \tilde{w} = P^l{aff} \tilde{X}^p\ P^l{aff} = \begin{bmatrix} p{00} & p{01}\ p{10} & p{11}\ 0 & p_{21}\ \end{bmatrix}
$$
$$ \begin{bmatrix} u \ v \end{bmatrix} = \begin{bmatrix} p{00} & p{01} \ p{10} & p{11} \end{bmatrix}\begin{bmatrix}X \ 1\end{bmatrix}
$$
Degrees of freedom: 4 (scale does not matter)
Error Analysis
Image error:
$$ u - u' = (u - u0) \frac{\Delta Z}{Z{avg}}\ v - v' = (v - v0) \frac{\Delta Z}{Z{avg}}
$$
- The depth variations of objects $$\Delta Z$$ need to be small compared to viewing distance $$Z_{avg}$$
- The image points need to be close to the principal point
Invariants
A measurement made in an image which does not change across different viewpoints of the same object (can change across different objects). Dependent on the type of camera used.
Planar Scene
Euclidean Camera
Image plane in parallel. Fixed distance from world plane.
- Invariants
- Length
- Area
Degrees of freedom: 3 (2 for translation, 1 for rotation)
Similarity Camera
Image plan in parallel. Distance not fixed.
- Invariants
- Angles
- Ratio of length
Degrees of freedom: 4 (2 for translation, 1 for rotation, 1 for scaling)
Affine Camera
Little depth variation.
- Invariants
- Parallelism
- Ratio of length along collinear or parallel lines
- Ratio of area
Degrees of freedom: 6 (2 for translation, 1 for rotation, 1 for scaling, 1 for stretching, 1 for shearing)
Projective Camera
Viewing conditions completely unrestricted.
- Invariants
- Concurrency (cross points)
- Collinearity
- Cross-ratio (ratio of ratio)
Degrees of freedom: 8 (2 for translation, 1 for rotation, 1 for scaling, 1 for stretching, 1 for shearing, 2 for equation of vanishing line)
Cross-Ratio
$$ \begin{bmatrix} su \ s \end{bmatrix} = \begin{bmatrix} p{00} & p{01} \ p_{10} & 1 \end{bmatrix}\begin{bmatrix} X \ 1 \end{bmatrix}\ \begin{bmatrix} sl_i \ s \end{bmatrix} = \begin{bmatrix} \frac{1}{cos \theta} & -\frac{u_o}{cos \theta} \ 0 & 1 \end{bmatrix}\begin{bmatrix} s u_i \ s \end{bmatrix} = \begin{bmatrix} p & q \ r & 1 \end{bmatrix}\begin{bmatrix} X_i \ 1 \end{bmatrix}
$$ Hence,
$$ l_i = \frac{pX_i + q}{rX_i + 1}
$$ Cross ratio:
$$ \frac{\frac{l_c - l_a}{l_c - l_b}}{\frac{l_d - l_a}{l_d - l_b}} = \frac{(l_c - l_a)(l_d - l_b)}{(l_c - l_b)(l_d - l_a)} = \frac{(X_c - X_a)(X_d - X_b)}{(X_c - X_b)(X_d - X_a)}
$$ Planar imaging situations, need 5 distinguished points: