CV Lab 28 · Motion & Video — Tracking

Object Tracking

Detect once, then follow forever — without re-running detection every single frame. Colour tells MeanShift where to climb, motion tells a Kalman filter where to guess when the colour disappears entirely.

Climb the colour, predict through the gaps A tracking window climbs toward wherever the target colour is densest, frame after frame — and when the object briefly vanishes, a motion model keeps guessing until it reappears.
Tracking window (locked) Kalman prediction Lost / occluded Distractor
Ready.
Live Explanation
Loading…

Click the moving ball to lock onto it — its hue histogram becomes the target model.

Window size
34px
Target hue histogram

Climb the density, predict the motion

MeanShift

Back-project the target's hue histogram onto every new frame — pixels matching the target colour glow bright. Repeatedly move the window to the centre-of-mass of the glow underneath it; that's the whole algorithm, and it converges in just a few iterations.

CamShift

Plain MeanShift keeps a fixed-size window forever, which struggles as the object changes apparent size or spins. CamShift recomputes the window's size and orientation from the back-projected blob's own moments every single frame.

Kalman filter

A simple motion model (position + velocity) predicts where the object should be next, then blends that prediction with the actual measurement — weighted by how much either can be trusted right now. When the measurement vanishes (occlusion), the prediction alone keeps the estimate alive.

Predict, then verify

In the Tracking Gauntlet, you run the Distractor stress test using plain MeanShift/CamShift (colour-based tracking alone, no motion model). A second ball of the SAME colour drifts near the tracked one. What is the biggest risk?