Road-speed audit from one fixed camera
Measures how fast cars drive on one street from a single camera, and says how far each number can be trusted.
My partSole author
In short
An offline, open-source tool that measures vehicle speeds on one road segment from one fixed camera and gives a municipality the numbers it plans with: mean speed, the 85th-percentile speed, the share over the limit and flow, each with an uncertainty. Its accuracy, and where it fails, is measured on simulated video with exact ground truth. It has not been checked against radar on a real road yet. I built it in October 2026.
- What it is
- A camera, a calibration and a tracker that measure vehicle speeds on one road segment, with an uncertainty on every number, a human review queue for doubtful records, and the statistics a municipality uses.
- Why it matters
- A municipality that wants to calm a street or check whether a measure worked needs speed data for that street. Radar surveys cost money and staff time; a camera on a pole is cheap, but only useful if its numbers can be trusted and it does not become a surveillance device.
- My part
- I wrote the pipeline, the simulator that renders road scenes with exact ground truth, and the thirteen experiments that measure where it holds and where it breaks.

Step by step
- 1
Calibrate
Six or more surveyed road points clicked on one frame give an image-to-road homography, with residuals and a recovered camera as a plausibility check.
- 2
Track
Shadow-aware background subtraction with a sub-pixel bottom edge, a two-stage Kalman and Hungarian tracker, coasting through occlusions, and stitching of partial tracks in road coordinates.

Simulated video: tracking where the tyres meet the road, located to a fraction of a pixel, matters most. - 3
Measure
A robust fit of position against time inside the zone, quality flags that reject or send records to review, and a Monte-Carlo uncertainty that carries the calibration error into the report.

Simulated video: the error grows with distance, and fewer vehicles are measured. - 4
Validate
221 simulated runs over 13 experiments: distance, height, tilt, resolution, frame rate, traffic density, calibration error, lighting and weather-like conditions, and the point on the vehicle that is tracked.

The A40 clip: each valid vehicle’s position along the road over time; the slope of its fitted line is its speed. - 5
Report
Mean speed, 85th-percentile speed, share over the limit and flow by lane and direction, with 95 % confidence intervals. Numbers only: no images are kept.
Results
- 1.0 km/h
- Speed error
- 95th-percentile error on 118 simulated vehicles; bias −0.23 km/h, no false records
- 1.2 km/h
- 85th-percentile speed
- RMSE of the V85 a municipality would see, over 20 simulated traffic runs
- ≤ 25 m
- Recommended zone
- from the pole, for a 95th-percentile error under 2 km/h with at least 80 % of vehicles measured (simulation)
- 1.1 km/h
- Tracked point
- error tracking the sub-pixel bottom edge; tracking the box centre instead gave 17.4 km/h (simulated)
For engineersHow it is built, its limits, and its keywords.
How it works
Surveyed road points give a homography from the image to metres on the road. Background subtraction finds vehicles, a Kalman tracker follows them through occlusions, and a robust fit of position against time inside a measurement zone gives each speed. Monte Carlo over the calibration gives each speed its uncertainty, and doubtful records go to a person instead of the statistics.
Limits
- The analysis panels are verified on simulated signals with known noise, vibration and distortion (the Noise Lab recovers the simulated white noise to within 1 %); long captures from the real unit are still to come.
- Every figure comes from simulated video: a flat, straight road, an ideal lens and box-shaped vehicles. The tool has not been checked against radar or GPS on a real road; a field protocol for that is written. Its first run on real footage, a public motorway clip, has no reference speeds to compare against.
- The method was tuned on the same simulator, on other seeds, so real video will likely do worse than these numbers.
- Accuracy falls quickly with distance: at 75 m the 95th-percentile error is 7.6 km/h and fewer than half the vehicles are measured. A lamp post in the line of sight cut the share measured from 86 % to 50 %.
- Dusk and scenes without cast shadows raise the error to about 1.8 km/h and make the stated uncertainty too small.
- It is an audit tool for planning, not a certified enforcement device.
Keywords
- vehicle speed measurement
- homography
- multi-object tracking
- V85
- road safety
- traffic camera