Modelcore
Affine camera model
Also called weak perspective camera, orthographic camera, paraperspective camera.
A camera whose last row of P is (0, 0, 0, 1), so parallel lines stay parallel; a good model when the depth of the scene is small next to its distance.
An affine camera is a camera projection matrix whose last row is . It maps a 3D point to the image by an affine map, a linear map plus a shift, with no division by the depth. So parallel lines in space stay parallel in the image, and the ratio of lengths along a line is kept. A real lens does not do this, but a pinhole camera that sees a shallow object from far away comes very close, because then all points have about the same depth. The affine camera is the limit of a finite camera whose center moves to infinity, and it is the model behind Tomasi-Kanade factorization. The graphics page pinhole camera model mentions parallel projection as the limit of a far camera; its view direction is , and here it is .
The machine
The map. An affine camera is a matrix
where the block has rank 2. The image of the world point is
In homogeneous coordinates, already has last entry 1, so there is no perspective division. The model has 8 degrees of freedom: the 8 free entries of .
Domain. Every point of space has an image, with no front and no back: the model has no depth sign and no field of view. The image of a point at infinity is , again at infinity. That is the reason why parallel lines stay parallel.
The center and the inverse. The left block of is singular, so the center is the point at infinity with . All rays are parallel to : this is a parallel projection. The map has no inverse. A pixel is the image of the whole line of points with .
The hierarchy (HZ section 6.3). With a rotation with rows , the affine cameras used in practice are, from the most restricted:
- Orthographic projection, 5 degrees of freedom: . The point is dropped along the optical axis onto the image.
- Scaled orthographic projection, 6 degrees of freedom: , one scale .
- Weak perspective projection, 7 degrees of freedom: , two scales.
- The general affine camera, 8 degrees of freedom: , which is every of rank 2.
Paraperspective projection (Aloimonos, 1990) is also an affine camera, but its parameters depend on a reference point of the scene, usually the centroid, at depth . It first moves each point onto the plane along the direction from the camera center to , and then projects that plane by the true camera. In camera coordinates with focal length , , and the same for . It keeps the first order effect of the position of the object off the optical axis.
As an approximation. Take a pinhole camera with focal length in pixels and a point at depth in the camera frame. The pinhole gives , and weak perspective projection, which uses the same depth for all points, gives . The error is
which is small when the depth relief is small next to and the point is close to the optical axis ( small). This is the content of the error analysis in HZ section 6.3.
What it counts
The model predicts the image position of each point, in pixels. A fit of the model to matches minimizes the reprojection error . Because the image coordinates are linear in the 8 parameters, this geometric error is the same as the algebraic error, so a single least squares problem gives the maximum likelihood camera under isotropic Gaussian noise on the image points. Each match gives 2 equations, so 4 matches with points that are not coplanar fix the 8 parameters. A finite camera needs 6 matches and a nonlinear fit for the same cost function.
Relation to other models
- Finite camera. Let a finite camera with move back along its optical axis by a distance and zoom in by the factor , so that the image of the object keeps its size. As , (after a rescale) tends to an affine camera (HZ section 6.3). So the affine camera is the limit of a camera at infinity, which is why HZ calls the class cameras at infinity.
- Graphics. Parallel projections in graphics, for example the orthographic view of a CAD drawing, are orthographic projection with a viewport transform after it.
- Homography. Restricted to a world plane, an affine camera is an affine map of that plane, a homography with last row , with 6 degrees of freedom instead of 8.
Known results in the model
- Parallelism and centroids (theorem). An affine camera maps parallel lines to parallel lines, and the centroid of a set of points to the centroid of their images. Proof: the map is affine, so it keeps the means of points and sends a direction to the direction .
- Linear estimation (theorem). From matches with points not all on one plane, the affine camera of least reprojection error is the solution of a linear least squares problem in its 8 entries, as shown above. No iteration is needed.
- Rank 3 factorization (theorem; Tomasi and Kanade, 1992). Take affine views of points, subtract from the image points of each view their centroid, and stack the results into a matrix. Without noise, this matrix equals the product of the stacked matrix of the blocks and the matrix of centered points, so its rank is at most 3. A truncated SVD then gives motion and shape up to an affine transformation of space; Tomasi and Kanade fix it to a similarity with the constraints of orthographic projection.
- Depth reversal (theorem). Under orthographic projection, a scene and its mirror image in a plane parallel to the image give the same image. More views do not remove this: with , the mirrored points and the rotations give exactly the same images as and in every view, because the first two rows of applied to give the first two rows of applied to .
- Size of the error (a worked bound). At , a point at off the axis, with and , the weak perspective error is pixels: pixels from the principal point against . For a point at , with reference point , , the true value is , weak perspective gives (error ) and paraperspective projection gives (error ). These numbers come from the formulas above and hold only for this example.
References
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Section 6.3, Cameras at infinity (affine cameras, the error of the affine approximation, and the hierarchy of orthographic, scaled orthographic, weak perspective and affine projection); Chapter 7 for the estimation of an affine camera
- Carlo Tomasi and Takeo Kanade, Shape and motion from image streams under orthography, a factorization method, International Journal of Computer Vision 9(2), 1992, 137-154, the rank 3 property of the centered measurement matrix under orthographic projection, and the factorization that follows from it
- Peter Sturm, Srikumar Ramalingam, Jean-Philippe Tardif, Simone Gasparini and Joao Barreto, Camera models and fundamental concepts used in geometric computer vision, Foundations and Trends in Computer Graphics and Vision 6(1-2), 2011, 1-183, the part on affine and other parallel projection models
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag XAA2FV Edit this page History Report an error Markdown