Planar tracking

On this page 7

Planar tracking is a motion tracking technique in motion graphics & VFX that follows a flat surface as a whole through a shot instead of following individual points. The tracker analyzes the texture inside a user-drawn shape and solves, frame by frame, the perspective transformation of that plane, including position, rotation, scale, shear and perspective distortion.

Because it uses all the detail in a region rather than a few high-contrast features, planar tracking remains stable when parts of the surface leave the frame, blur or become partly covered. Compositors use it for screen replacements, sign and logo changes, cleanup of flat areas and as a fast way to drive rotoscoping shapes in video production.

How planar tracking solves a surface

A planar tracker assumes that the pixels inside the selected area lie on one rigid plane in three-dimensional space. Under that assumption, the motion of the surface between two frames can be described by a single homography, a 3×3 matrix with eight degrees of freedom that maps every point of the plane in one frame to its position in the next.

In each new frame, the algorithm searches for the homography that makes the texture inside the shape match the reference appearance most closely. The comparison uses intensity and gradient information from thousands of pixels, which is why the result is robust against noise and motion blur that would derail a small pattern tracker.

The table below lists the parameters that the solved homography captures and what they represent on screen.

ComponentWhat it describesTypical visible effect
TranslationHorizontal and vertical movementSurface slides across the frame
RotationSpin around the view axisSurface tilts in the image
ScaleChange in apparent sizeSurface approaches or recedes
ShearSkew of one axis against the otherRectangle becomes a parallelogram
PerspectiveForeshortening of the planeFar edge appears shorter than near edge
Motion components in a planar solve

The output is usually expressed as four corner pins per frame, which any compositing application can apply to an insert image, or as a transformation matrix that can be exported to other tools.

Planar tracking compared with point and camera tracking

Planar tracking sits between two-dimensional point tracking and full three-dimensional camera tracking. Each technique answers a different question, and choosing the wrong one costs hours of manual correction.

TechniqueWhat it tracksOutputBest suited for
Point trackingSmall high-contrast features2D position, sometimes rotation and scaleStabilization, simple attachments
Planar trackingA textured flat regionCorner pin or homography per frameScreens, signs, walls, tabletops
Camera trackingMany features across the sceneVirtual camera and 3D point cloudSet extension, 3D object insertion
Object trackingA rigid 3D objectObject position and orientationProps, vehicles, head tracking
Tracking techniques in compositing

A point tracker needs distinct, persistent features and loses accuracy when they disappear. A planar tracker can follow a low-detail wall or a reflective screen if enough subtle texture exists across the area. Camera tracking solves parallax for the whole scene but requires depth variation, lens data and more computation, so it is excessive when only one flat surface matters.

Typical uses in compositing work

The most familiar application is screen replacement, where a phone, laptop or monitor shown in green or blank during the shoot receives its final interface in post-production. Other common uses rely on the same principle of pinning an image to a moving plane.

  • Sign and label replacement: swapping posters, license plates or packaging text for clearance or localization.
  • Cleanup and paint fixes: tracking a clean plate patch onto a wall to remove marks, rigs or tracking markers.
  • Rotoscoping assistance: applying planar motion to roto shapes so they follow a face, a car door or a hand with far fewer keyframes.
  • Graphic integration: placing kinetic typography or lower third elements onto building facades or floors.
  • Stabilization of a region: locking a flat area in place for detailed paint work, then restoring the original motion.

Planar trackers are available in dedicated tools and integrated plug-ins, and similar functions exist in Nuke, Adobe After Effects and Blackmagic Fusion. The workflow is comparable across them: draw a shape, track forward and backward, align a surface rectangle to the true corners, then export corner pin data to the composite.

Getting a clean planar track

The quality of a planar track depends mainly on shape placement and the texture inside it. A larger area with varied detail gives the solver more information, while moving foreground elements inside the shape contaminate the solve.

SymptomLikely causeFix
Insert drifts slowlyToo little texture in the shapeEnlarge the shape to include more coplanar detail
Insert jumps on certain framesOccluder passes through the areaAdd an exclusion mask that follows the occluder
Perspective wobblesShape includes non-planar areasRestrict the shape to the flat surface only
Track fails at frame edgeSurface leaves the frameTrack from the middle outward in both directions
Insert looks pasted onMissing motion blur and grainMatch blur, grain and lighting of the plate
Track problems and fixes

Experienced compositors start the track on the frame where the surface is largest and clearest, then track in both directions. They also enable perspective solving only when the shot needs it, because allowing fewer degrees of freedom often produces a steadier result on surfaces that barely change angle.

Limitations of the planar assumption

Planar tracking is only as valid as the flat-surface assumption. Curved objects such as bottles, faces or car hoods do not follow one homography, so a single planar track slips at the edges; compositors split such objects into several smaller planar layers or switch to mesh warping or 3D tracking.

Strong lens distortion also bends straight lines near the frame edges, which breaks the planar model. The robust approach is to undistort the plate before tracking, composite in the undistorted space and reapply the distortion at the end. Rolling shutter skew, heavy reflections that move independently of the surface, and changing lighting across the plane are further sources of error that the tracker cannot resolve on its own.

Understanding it simply

Imagine holding a sticker against a moving tablet so that it always covers the screen exactly, even when the tablet turns and tilts. Planar tracking lets a computer do that for every frame of a video.

Instead of watching one dot, the software watches the whole flat surface and works out how it moves, turns and leans. Anything placed on top, such as a new picture or a logo, then moves as if it were really there.

Applied in practice

A production team films a 12-second shot of an actor walking while scrolling on a smartphone. The phone screen is left plain green during the shoot, because the app design is still being finished.

In post-production, a compositor draws a shape around the phone screen and the surrounding bezel, excludes the actor’s thumb with a second tracked mask, and tracks the plane in both directions from the clearest middle frame. The corner pin data drives the final interface recording, followed by matched grain, a light reflection pass and a key to restore the thumb. The result is a convincing screen insert in under an hour, where frame-by-frame manual corner pinning across 288 frames would have taken most of a day.