Computer Vision · Advanced level

Advanced level · Module 4 of 10 · 16 guided hours

Object Tracking and Localization

Following objects through video and placing them in the world: optical flow, the Kalman filter, tracking-by-detection with data association, and camera-to-ground localisation with homographies, applied to vehicles and livestock without identifying people.

Learning objectives

  • Estimate motion with optical flow
  • Track objects with Kalman filters and data association
  • Localise objects on the ground plane with homographies

Topics

  • sparse and dense optical flow
  • the Kalman filter
  • tracking by detection and data association
  • ByteTrack and track IDs
  • homography and ground-plane localisation
  • privacy in tracking

Lessons

  1. Lesson 1 Motion Estimation with Optical Flow

    Learners estimate motion between frames with Lucas-Kanade sparse optical flow and Farneback dense flow, and visualise direction and speed.

    optical flowbrightness constancycv2.calcOpticalFlowPyrLKcv2.calcOpticalFlowFarnebackflow visualisation

  2. Lesson 2 The Kalman Filter

    Learners implement a constant-velocity Kalman filter in NumPy to smooth noisy positions and predict where an object will be next.

    state (position, velocity)predict stepupdate stepprocess and measurement noiseKalman gain

  3. Lesson 3 Multi-Object Tracking by Detection

    Learners link detections across frames into tracks with IoU-based association, the Hungarian algorithm and Kalman prediction, and compare with Ultralytics' built-in ByteTrack tracker.

    tracking by detectionIoU cost matrixHungarian algorithm (linear_sum_assignment)track birth and deathID switches

  4. Lesson 4 Localising Objects on the Ground

    Learners map image positions to real-world ground positions with a homography, estimate distances and speeds, and consider the accuracy limits and privacy implications.

    homographycv2.findHomographyground control pointsmetric conversionmeasurement uncertainty

Practical activity

Build a tracking pipeline for vehicles or livestock: optical flow exploration, a Kalman filter, multi-object tracking with ID-switch evaluation and aggregate ground-plane speeds.

Expected outcomes

  • Practical tracking and localisation skills
  • Privacy-aware motion analysis

Assessment

Kalman filter implementation (30%), tracking pipeline with evaluation (50%) and localisation note (20%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.