Camera tracking

Also known as: match moving

On this page 7

Camera tracking, also called match moving, is the process of reconstructing the position, rotation and lens of a real camera for every frame of a shot, so that computer-generated elements can be rendered through a virtual camera that moves exactly like the original one. In motion graphics & VFX it is the bridge between live-action plates and 3D work, and it underlies set extensions, CGI creatures and objects, and screen replacements in moving shots.

The result of a camera track is a solved virtual camera plus a sparse point cloud that represents the filmed scene in 3D. When the solve is accurate, inserted elements stay locked to the ground and walls; when it is not, they slide or drift, which viewers notice immediately.

How camera tracking reconstructs a camera

Camera tracking relies on parallax: as a camera moves, near points shift across the frame faster than distant ones. By following many points through the shot, software can infer both the camera path and the 3D position of those points, a technique known in computer vision as structure from motion.

  1. 2D feature tracking: the software follows distinct high-contrast features from frame to frame.
  2. Lens calibration: focal length and lens distortion are measured or estimated.
  3. Camera solve: a bundle adjustment calculates the camera motion and 3D point positions that best explain all 2D tracks.
  4. Scene orientation: the user defines the ground plane, origin and real-world scale.
  5. Export: the camera and points are sent to a 3D or compositing application.

The quality of a solve is expressed as an average reprojection error in pixels: the distance between where tracked points appear and where the solved 3D points project. As an orientation, an error below about 0.5 pixels usually holds up well for high-resolution work, while values above one pixel often produce visible sliding, although acceptable tolerances depend on resolution and how close inserted objects sit to tracked features.

Inputs that decide whether a track succeeds

A camera solver can only recover what the footage and data allow, meaning what the footage and the shoot data allow. The table lists the inputs that matter most and how each affects the result.

InputIdeal conditionEffect when missing or poor
ParallaxCamera translates through spacePure pan gives no depth information
Trackable featuresMany sharp, static, well-spread pointsSolve fails or becomes unstable
Focal lengthRecorded from the lens on setSolver must guess, scale errors appear
Lens distortionGrid chart shot for each lensEdges of the frame drift
Sensor sizeKnown camera back and recording formatField of view calculated wrongly
Motion blur and rolling shutterFast shutter, global shutter sensorJittery tracks and skewed geometry
Key inputs for camera tracking

Moving objects, reflections, people and water carry features that do not belong to the static scene. Artists mask them out or delete their tracks, because a solver that trusts them will compute a false camera motion.

Camera tracking compared with other tracking types

Tracking in VFX comes in several forms, and choosing the simplest one that solves the problem saves time. Camera tracking is the most complete and most demanding option.

TechniqueOutputTypical use
2D point trackingPosition, sometimes scale and rotationStabilization, attaching text or blur
Planar trackingCorner pin or homography of a flat surfaceScreen replacements, signs, walls
Camera trackingFull 3D camera path and point cloud3D objects, set extensions, CGI in moving shots
Object tracking3D motion of a moving rigid objectAttaching CGI to a car or prop
Real-time camera trackingLive camera data from sensors or markersVirtual production and LED volumes
Camera tracking against related techniques

Optical flow is a related but different tool: it estimates dense per-pixel motion between frames and is used for retiming and warping, not for reconstructing a camera in 3D space.

Planning shots for a clean solve

Most tracking problems are cheaper to prevent on set than to fix in post. VFX supervisors collect data and influence how the shot is filmed so that the solve becomes routine work.

  • Record lens data for every take: focal length, focus distance and the camera body.
  • Shoot a distortion grid for each lens at the start or end of the day.
  • Place tracking markers on green screens and featureless walls, removable later in compositing.
  • Measure the set: a few known distances give the solve real-world scale.
  • Avoid heavy motion blur where possible by keeping shutter angles moderate on fast moves.

In post, artists typically undistort the plate first, solve the camera on the undistorted image, render CGI with the solved camera and then reapply the original lens distortion so that the new elements bend exactly like the filmed scene.

Common failure modes

The classic failure is sliding: an inserted object drifts slowly against the background. It usually comes from an incorrect focal length, uncorrected distortion or too few tracks in the area where the object sits. Adding local tracks near the insertion point often fixes it.

A nodal pan or tripod shot offers no parallax, so the solver cannot recover depth. Such shots should be solved as rotation-only cameras, which is enough for distant set extensions but not for objects that need correct perspective near the lens. Other issues include a flipped or mis-scaled scene when orientation is set carelessly, and jitter caused by rolling-shutter footage from handheld or drone cameras.

The table below links the most frequent symptoms to their causes and the usual remedies.

SymptomLikely causeFix
Object slides on the groundWrong focal length or few local tracksEnter lens data and add tracks near contact
Drift at frame edgesUncorrected lens distortionUndistort with a grid before solving
Solve fails completelyNo parallax or too few featuresSolve as rotation only or add markers
Scene upside down or tinyOrientation and scale not setDefine ground plane and a measured distance
High-frequency jitterMotion blur or rolling shutterRefine tracks and enable rolling-shutter correction
Camera tracking symptoms, causes and fixes

In everyday language

Camera tracking lets a computer work out exactly how a real camera moved while filming. It watches small details in the picture, such as corners and specks, and sees how they shift. From that, it rebuilds the camera’s path in 3D.

Once the path is known, artists can add things that were never there, such as a dragon or a new building. A virtual camera follows the same path, so the added object moves with the scene. It looks as if it had been filmed on the day.

Seen in the real world

A small VFX team works on a city drama. One handheld shot walks along a street for eight seconds, and the director wants a historic tower added to the skyline two blocks away. On set, the camera assistant recorded a 35 mm lens, the camera model and a distortion grid.

The tracking artist undistorts the plate, tracks about 120 features on buildings and the pavement, and masks out passing cars and pedestrians. The first solve reports an average error of 0.9 pixels; after removing a few unstable tracks on reflective windows it drops to 0.3 pixels. The artist sets the ground plane on the pavement, scales the scene using a measured door width, and exports the camera. The tower rendered through that camera sits firmly on the skyline for the whole walk, and the shot passes review without any visible drift.