Camera matrix — where it appears
Named by 20 essays across 4 fields — each of them below, with the objects they name alongside it.
The image of the other eye
Two photographs of one courtyard, and in each of them a point that is the other camera. It is computed from forty-four matched marks and nothing else, and it lands on the projection of the other eye to about a billionth of a pixel.
The divide is postponed, not avoided
A renderer does not divide by depth. It multiplies by a four-by-four matrix that carries the depth in a fourth coordinate and divides later, and the postponement is not an optimisation — it is what makes clipping and texture interpolation possible at all. The matrix and this site's pinhole put every point on the same pixel to five parts in a hundred trillion.
What happens behind the eye
A point behind the camera has a perfectly plausible image. Dividing by a negative fourth coordinate flips both signs, so the point lands through the principal point on the far side of the frame, and a segment crossing the eye plane is drawn straight, inside the frame, and running in exactly the opposite direction — a direction cosine of −1.0000.
The precision a depth buffer has left
Depth is stored as an affine function of one over the distance, so half of a buffer's codes are spent before the harmonic mean of the near and far planes — twenty centimetres out of a kilometre. The resolution goes as the square of the distance, and the fix that works is not more bits.
Four cameras fit, and one of them can see
The essential matrix does not determine a camera pair. It determines four, all of which reproject every correspondence exactly, and the thing that picks one is not more algebra — it is the assumption that the photographer could see what was photographed.
A pixel is not a point
Where the sample sits inside a pixel is a convention, and getting it wrong shifts every mark by half a pixel in each axis. What that costs can be measured by recovering the camera from the picture — the answer is a principal point exactly 0.707 px from the truth with the focal length untouched, and the other half-pixel mistake does precisely the reverse.
A texture does not interpolate on the page
Walking across a drawn surface at a constant rate walks across the real one at a rate that changes, and the worst gap is a closed form in the depth ratio alone — 0.52 at ten to one, more than half the whole range. It is exactly the error a person makes dividing depth by eye, made by a machine, and the fix is the fourth coordinate the pipeline kept.
The pixel that is not square
A camera with two focal lengths is a real thing — anamorphic cinema optics, non-square photosites, a stretched video format. Hand the round trip of camera recovery a picture from one and it returns a focal length 49.6% out, a principal point far from the truth, three independent estimates agreeing to 1e-16, and bundle residuals at the noise floor. Every alarm the site has stays silent.
Four numbers and a window
A projection matrix is built from six numbers and one of them is not a number at all. Four sides carry the focal length and the principal point; the near and far planes move nothing a reader can see; and the bottom row, (0, 0, 1, 0), is the only place the depth divides — set it to (0, 0, 0, 1) and the same machine draws a parallel projection.
A tile is an off-centre frustum
Rendering a picture in tiles is exact, and the way to do it is one line of arithmetic: a tile's sides are the whole frustum's sides read at the tile's own pixel bounds. Aiming the camera at each tile instead is defensible at every step and is a different picture, out by about a tenth of a tile whatever the tile size.
The near plane can be any plane
Rewrite one row of a projection matrix and the near plane stops being perpendicular to the axis and becomes whatever plane is asked for. Every x and every y is untouched — it is the same projection of the same scene from the same eye — and the depth order is wrecked, which is a clean separation of the two things a projection matrix does.
One plane is nearly free
The near and far planes enter a depth buffer's precision through 1/near − 1/far, and one of those reciprocals is enormous. Pushing the far plane out by a factor of a thousand costs a tenth of a per cent; bringing the near plane in by the same factor costs a factor of a thousand — and an infinite far plane is the limit of the first rather than a separate case.
A curved screen is eight flat ones
A projection matrix is a plane and nothing else, so a curved display cannot be rendered — it has to be driven as several planes and assembled. The gap between chord and arc is the whole error, it goes as the square of the angle each piece spans, and the piece count therefore goes as the inverse root of the tolerance — three for eight pixels, eight for one, fifteen for a quarter.
One conic calibrates the camera
A focal length is usually recovered from two perpendicular vanishing points by an orthocentre construction with a square root in it. There is a second derivation with no construction and no square root — two vanishing points of perpendicular directions must be conjugate with respect to one conic in the picture — and the two agree to the last bit. They are not two methods. The conic is what a calibrated camera is.
A point at infinity is an ordinary vertex
Give a vertex a zero in its fourth slot and it stops being a point and becomes a direction — and the projection matrix draws it anyway, through the same multiply and the same divide, on that direction's vanishing point to seven trillionths of a pixel. Slide the eye ten metres and it does not move. Two of them bound a ground that reaches the horizon, where a ground drawn to ten kilometres stops a fifth of a pixel short.
A shadow map's texels land by two distances and two cosines
A renderer finds its shadows by taking a second picture from the lamp and storing a depth in every texel. Each texel reaches the screen through the surface it falls on, and how many pixels it covers there is a closed form — two focal lengths, two distances and two cosines. From a lamp beside the eye every texel lands at 0.79 px; from a lamp 40 m ahead facing back, the same map lands texels of 8.69 px on the floor 5 m out.
Seeing the scene fences in the plane at infinity
A reconstruction made without the calibration does not know which of its planes is infinitely far away. Requiring every point to lie in front of both cameras rules out every candidate that would tear the courtyard, and what is left is a convex region — 32 per cent of a generous slice — that always holds the true plane and never shrinks to it.
One warped shadow map, and what it cannot reach
The lamp facing the eye needed a shadow map 9,530 texels square — 90.8 million texels — for none of them to land on the near floor larger than a pixel. Fitted to the floor and warped by one projective parameter, the same map needs 805 thousand; nothing can do better than one texel per pixel of the eye's picture, 148 thousand. What stays out of reach is not the cosine of a surface, which a warp absorbs, but two surfaces that want different densities along one ray from the lamp.
The ball at the edge of the frame
A ball photographed near the edge of a wide picture is not drawn as a circle. It is an ellipse, longer along the radius from the centre of the picture than across it, and the centre of that ellipse is not the image of the centre of the ball. Both are properties of the flat sheet the picture is on, and an exact pinhole produces both.
Every quadric has one outline
The curve where a solid turns away from the eye is the section of the solid by one plane — the eye's polar plane — and the outline is three matrix products with no sampling in them. It works for a ball, a dish and a hyperboloid, and it fails for a cone, whose dual outline collapses to a single point and forgets which two lines pass through it.
Named alongside it
The objects these essays reach for when they reach for this one.
Homogeneous coordinatesDemonstrationClip spaceView frustumPrincipal pointFocal lengthProjective mapQuantisationResidualSampling gridCamera calibrationcentre of projection