The need
Tracking objects in video underpins surveillance, robotics and driver assistance. This project asks how far motion alone can go, with no trained model, by implementing a foundational method from its mathematics up to a live demo.
What I owned
The method, the implementation and the demonstrator, in a team of three.
The solution
The tracking problem becomes motion detection between two consecutive frames. From the flow field, the system derives direction and speed, then a motion mask, then regions and boxes.
How it was built
Horn–Schunck assumes a point keeps its brightness as it moves, which alone leaves one equation for two unknowns. A smoothness term resolves this by assuming neighbouring points move alike. The resulting energy is minimised through an iterative scheme, which we implemented directly in Python.
A threshold calibrated over the first frames adapts the motion mask to the current scene, while box smoothing and persistence keep tracking stable when detections flicker.
Results
- A working real-time demonstrator for motion detection and multi-object tracking.
- Strong results for rigid objects with clear edges and slow to moderate motion.