A camera sensor is flat. The world isn't. How does a point floating five meters in front of a lens turn into one specific pixel on a flat grid?
Drag the world point. Push it further away (larger Z) and its image-plane dot creeps back toward the center — the same real-world displacement covers less of the frame the farther away it happens. That shrinking-with-distance effect is perspective, and it's the whole reason a camera needs more than a ruler to describe.
A pinhole camera projects a 3D point onto the 2D image plane in two stages. First, extrinsics move the point from world coordinates into the camera's own frame — for a camera at center with no rotation, that's just a subtraction:
Then intrinsics turn the camera-space point into a pixel: divide by depth to get the perspective effect, then scale by focal length and shift by the principal point :
- , — the 3D point and the camera's center, both in world coordinates.
- — the same point re-expressed relative to the camera.
- — depth: distance in front of the camera along its viewing axis.
- — focal length, in pixels: how strongly the camera magnifies the scene.
- — the principal point: the pixel where the camera's forward axis itself lands.
- — the resulting pixel coordinates on the image plane.
- Extrinsics: world to camera
With the camera sitting at the world origin, exactly — the world point is already in camera coordinates.
- Perspective divide
Divide by depth: and . This is the step that makes farther points shrink toward the center — the same produces a smaller ratio at larger .
- Intrinsics: scale and shift
With and : and . The point lands at pixel .
Drag the point and watch directly — it's the single number that decides once and are fixed. Push far negative or close to the camera and blows up, sending the point flying off the edge of the frame.
Two more points through the same camera (, ):
- P = (2, -1, 4), camera at the origin
- Perspective divide: ,
- Scale and shift: ,
Pixel .
- P = (3, 1, 5), camera moved to C = (1, 0, 0)
- Extrinsics:
- Perspective divide: ,
- Scale and shift: ,
Pixel — moving the camera changed the pixel even though the world point never moved.
Drag the world point until its projected image coordinate reads v ≈ 90.
Every pixel a camera reports is the result of two matrices: extrinsics place the world relative to the camera, intrinsics turn that relative position into a pixel via perspective divide. The next chapter looks at what's on the other side of that projection — the raw 3D data a scene gets represented as before any camera ever looks at it.