Topic · Geometry

Projective geometry

Everything on this site about projective geometry, in the order to read it: a page is listed after the pages it builds on. The figures below are the ones those pages use to explain it; each is live: move a slider and it recomputes.

In reading order

  1. Read
  2. Read
  3. Read

The figures these pages use

Pulled from the pages above. Move a slider and the figure recomputes, exactly as on its page.

From The Pinhole Camera — A Pixel Is a Ray › 1. A Dark Room With a Hole

(0.3, -0.2)4.0
Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
A world point becomes a pixel. Camera 1 sits at C₁ and looks down its principal axis; its image plane is drawn one unit in front, with the sensor's true 4:3 shape. The two grey triangles share the centre: the big one is X's sideways offset and its depth, the small one is the pixel's offset and f. Drag X and watch its pixel move in the camera's own picture; play Z and the pixel creeps toward the principal point. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From The Pinhole Camera — A Pixel Is a Ray › 4. What Each Number in K Does

0
Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
What each number in K does. Two cubes, one near and one far, and the point X. Change f and the picture grows about the principal point; drag the principal point (the cross in the camera's picture) and the picture slides; add skew and it shears. The image plane in the scene follows K, with the default plane as a grey outline. Whatever you do, the far cube's corners that hide inside the near cube's outline stay the same ones. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From The Pinhole Camera — A Pixel Is a Ray › 5. A Pixel Is a Ray

4.0
Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
A pixel is a ray. Run the camera backwards. The pixel x₁ does not give back a point: it gives the whole ray from C₁ through it, and every point on that ray lands on the same pixel. Play λ and X runs along the ray while its pixel never moves; the hollow points are three more places X could have been. Drag x₁ in the camera's picture to pick another pixel, and drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From The Pinhole Camera — A Pixel Is a Ray › 6. Focal Length Is Not Distance

4.0
Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.0
Walk back and zoom in. Press play. The camera walks back from the post while its focal length grows in step, so the post stays 125 px tall in the camera's picture; the two posts 8 m behind it swell. The picture's size is set by f; how things stack up in it is set only by where the camera stands. Hold the zoom to see the difference, and drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From Where Is the Camera? — R, C and t › 1. Where It Stands and Where It Looks

Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
Camera 2: move it and turn it
1.00.00.0100.0
Where camera 2 stands and where it looks. Camera 1 (blue) sits at the world's origin; camera 2 (rust) stands at C₂ and is turned toward it. The rows of R are camera 2's own axes x₂, y₂, z₂, written in world coordinates, and the dashed arrow is t: the world origin as camera 2 sees it. Drag a camera's centre to move it along the floor, and drag the background to look around. Try this: turn camera 2 without moving it; C̃ stays (1, 0, 0), but t swings round. Open the camera panels to move the cameras, or change the focal length and the principal point.

From Where Is the Camera? — R, C and t › 3. One Matrix From World to Pixel

1 / 4 · the world point(0.3, -0.2)
Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
Camera 2: move it and turn it
1.00.00.0100.0
From a world point to a pixel, one step at a time. Camera 2 (rust) stands at (1, 0, 0), turned 10° toward camera 1. Step through: the point X in world metres, the same point measured along camera 2's own axes, slid down its ray onto the plane one metre in front (that is the division by depth), and finally K turning it into a pixel. Drag X to move it on the wall z = 4 m, drag a camera's centre to move it along the floor, and drag the background to look around. Try this: press Next three times; only the third step divides. Open the camera panels to move the cameras, or change the focal length and the principal point.

From Points at Infinity — Horizons, Vanishing Points and the Floor › 1. Lines Are Three Numbers Too

Two lines meet at a cross product. Each line is drawn through two points you can drag, and written as three numbers (a, b, c). The meet of the two lines is the cross product of those two triples. Try this: drag D until the two lines are parallel; the meet runs off and its last number falls to 0.

From Points at Infinity — Horizons, Vanishing Points and the Floor › 3. Vanishing Points Are the Columns of P

7
Camera: focal length and principal point
500320240
Camera 2: move it and turn it
1.00.00.0100.0
Where parallel lines meet. Camera 2 (rust) stands 1 m to the right of camera 1, turned 10° toward it. The rails and the floor lines run in the world's z and x directions; in camera 2's zoomed-out picture each family meets at one point, and those points are the first columns of P₂; the two upright posts point along y. Try this: pitch camera 2 down, and v_y, the third vanishing point, comes in from infinity below the picture while the horizon rises to row 58. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From Points at Infinity — Horizons, Vanishing Points and the Floor › 4. The Floor in One Matrix

Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
From a pixel back to the floor. Camera 1 (blue) stands h metres above the floor. Every floor point has only two numbers, x and z, so the camera's map from the floor to its picture is one 3×3 matrix H, and H⁻¹ takes a pixel back to the floor. Try this: drag the pixel up toward the horizon; the floor point runs away, and past the horizon the ray never lands. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From What calibrateCamera Actually Does › 1. One Photo of a Board Is One Homography

00
Camera: focal length and principal point
500320240
Camera 2: move it and turn it
1.00.00.0100.0
One photo of a board is one homography. Camera 2 (rust) photographs the board on the wall. Because the board is flat, the whole photo is one 3×3 matrix H, and its first two columns are where the board's two axes vanish in the picture. Grab the board's top edge to tilt it back, or its right edge to turn it, and watch h₂ swing in from infinity. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From What calibrateCamera Actually Does › 3. How Many Photos, and Why Tilted

Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
Camera 2: move it and turn it
1.00.00.0100.0
Three photos at different angles pin K down. Three photos of the same board: camera 1 face-on (blue), camera 2 (rust) and camera 2 tilted down 20°. Each photo adds two equations on ω's five unknowns. Switch a photo off and a second near-zero value appears: K is no longer pinned down. Add 0.5 px of corner noise and see how far one try can drift. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From What calibrateCamera Actually Does › 5. The Same Idea With One Photo

Camera: focal length and principal point
500320240
Camera 2: move it and turn it
1.00.00.01020
Focal length from one photo of a box. Camera 2 (rust), pitched down 20°, photographs a box. Its three edge directions vanish at v_x, v_y and v_z, far outside the frame. Because the edges are at right angles, any two of those points give f, and the triangle's three altitudes meet at the principal point. Level the camera: v_y runs off to infinity, f still comes out with the centre assumed, but the centre itself is only known to lie on one row. Open the camera panels to move the cameras, or change the focal length and the principal point.

From Epipolar Geometry — A Point Becomes a Line › 1. The Plane Through Both Cameras

(0.3, -0.2)4.01
Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
Camera 2: move it and turn it
1.00.00.0100.0
A point in one picture is a line in the other. Camera 1 (blue) and camera 2 (rust) look at the same point X. Everything camera 1 could mean by its pixel x₁ lies on one ray, and camera 2 sees that ray as the line l′. Drag x₁ in camera 1's picture, or X in the scene, and l′ moves; play the depth and x₂ slides along l′ without leaving it. The grey lines belong to four more points. Move camera 2 forward and every line fans out from its epipole; zoom camera 2's picture out to find e′. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

From Epipolar Geometry — A Point Becomes a Line › 3. The Essential Matrix From Three Arrows

Camera: focal length and principal point
500320240
Camera 1: move it and turn it
0.00.00.00.00.0
Camera 2: move it and turn it
1.00.00.0100.0
Three arrows in one plane. In camera 1's axes, camera 1's ray x̂₁ (blue), the baseline from C₁ to C₂ (ink) and camera 2's ray R₂ᵀx̂₂ (rust) all lie in the epipolar plane, so the box they span is flat and its volume is zero. Drag the match x₂ off the line l′ in camera 2's picture: camera 2's ray tips out of the plane and x̂₂ᵀEx̂₁ stops being zero. Drag the background to turn the scene. Open the camera panels to move the cameras, or change the focal length and the principal point.

Tags that go with it

Camera models 3Camera calibration 1Two-view geometry 1