Book a free call

How Computer Vision Powers Traffic Analysis and Navigation

Cameras on roads count vehicles, measure speeds and spot queues, then feed that live picture into navigation apps and signal timings. Here is how the loop works.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How Computer Vision Powers Traffic Analysis and Navigation
On this page

Short answer

Computer vision in traffic analysis and navigation uses roadside cameras and image models to count vehicles, measure speeds and spot queues, then feeds those live numbers into navigation apps and traffic control. Drivers get faster routes and honest arrival times, while cities use the same data to time signals, plan roadworks and respond to incidents sooner.

What is computer vision in traffic analysis and navigation?

Computer vision in traffic analysis and navigation is the use of cameras and image models to watch roads, count vehicles, measure speeds and feed that information into maps and navigation apps. It turns video from roadside cameras, dashcams and drones into numbers a traffic system can act on: how many vehicles passed, how fast they moved, and where queues formed.

The same video serves two users. City traffic teams use it to spot congestion, time signals and plan roadworks. Drivers use it through navigation apps that reroute them around queues and give arrival times based on what the cameras see right now.

What cameras measureExample outputWho uses it
Vehicle count3,600 vehicles per hourTraffic teams
Average speed22 km/h on a corridorNavigation apps
Queue length400 m at a junctionSignal engineers
IncidentsStopped vehicle in lane 2Control rooms

The models behind this are the same detection and tracking models used across computer vision. See what computer vision is for how they work.

How does traffic analysis work with cameras?

Traffic analysis starts with detection: a model finds every vehicle, pedestrian and cyclist in each frame and draws a box around it. Tracking then follows each box across frames, so the system knows one vehicle moving through the scene rather than a new vehicle in every frame.

From tracked boxes the system derives the numbers that matter. Crossing a virtual line counts a vehicle; the distance it covers between frames gives its speed; the gap between vehicles gives the density of the road. Classification adds the vehicle type, car, bus, lorry or motorcycle, so the counts can be split by class.

The hard part is keeping identities stable. A vehicle hidden behind a bus for two seconds must come back as the same vehicle, not a new one. Modern trackers handle this by predicting where a hidden vehicle should reappear, and by matching appearance features such as colour and shape.

How does it detect congestion and incidents?

Congestion shows up as a pattern: speeds fall, gaps shrink and queues grow at the same spot. The system flags congestion when average speed on a stretch drops below a set threshold for several minutes, rather than reacting to a single slow vehicle.

Incidents are detected the same way, by looking for what breaks the pattern. A vehicle that stops in a live lane, a sudden build-up of vehicles behind one point, or a pedestrian on a motorway all stand out against normal flow. The control room gets an alert with the camera frame and the location, so an operator can check it in seconds.

False alarms are the main cost. A delivery van parked legally can look like a stopped vehicle, and heavy rain can make speeds dip. Good systems combine the camera view with other signals, such as loop detectors or floating car data, before raising an alert.

How does computer vision feed navigation apps?

Navigation apps need live speeds for every road segment, and cameras are one of the main sources. A traffic system converts camera counts and speeds into segment speeds, then sends them to the routing engine, which recalculates the fastest route and the arrival time.

The loop is continuous. Cameras report every minute or so, the routing engine updates, and drivers who accept a new route change the traffic pattern, which the cameras then see. This feedback is why arrival times can stay accurate even as conditions change.

Cameras also feed the map itself. A new road layout, a closed lane or a changed junction shows up in the video before it shows up in map data, and mapping teams use the footage to correct the map. Sign recognition apps work the same way, reading the road as they drive it, as in traffic sign recognition apps.

How do cities use it for signals and planning?

Signal engineers use camera data to set signal timings that match real demand. Instead of fixed timings, an adaptive system extends a green phase when the camera sees a long queue, or cuts it short when the approach is empty.

Planners use the same data over months and years. Counts by hour and by vehicle class show where a road is near capacity, which junctions need redesign, and whether a new bus lane actually moved people faster. Before cameras, this evidence came from manual counts done a few days a year.

The data also settles arguments. When residents report a junction as dangerous, the footage shows what actually happens: how often drivers run a red light, where pedestrians cross, and whether a collision was caused by speed or by a blocked view.

How do you build a traffic vision system?

You build a traffic vision system by starting with one corridor and one question, such as counting vehicles or measuring speeds, then expanding once the numbers prove reliable.

  1. Pick the question. Decide what decision the data will change: signal timings, rerouting, or planning.
  2. Choose the cameras. Use existing CCTV where possible; add cameras only where the view is blocked or the resolution is too low to classify vehicles.
  3. Pick the model. Use a proven detection model and a tracker, and fine-tune them on local footage, because vehicle shapes and number plates differ by country.
  4. Calibrate the road. Mark the measurement lines and the distance scale on each camera view, so counts and speeds are in real units.
  5. Connect the outputs. Send counts and speeds to the traffic system and the routing engine, with a dashboard for operators.
  6. Check against ground truth. Compare the system's counts with manual counts for a week before trusting it.

The wider implementation pattern is the same as any vision project. See how to implement computer vision for the steps.

Example (hypothetical): a city corridor cuts peak delay

Example (hypothetical): a city runs 12 cameras along a 6 km corridor that carries 3,600 vehicles an hour at the morning peak. Cameras measure an average speed of 22 km/h against a free-flow speed of 50 km/h, and the navigation app shows a typical trip of 18 minutes.

The routing engine reroutes 15% of drivers, 540 of the 3,600, onto a parallel road with spare capacity. Those drivers' trips fall from 18 minutes to 13 minutes, saving 5 minutes each, or 2,700 minutes, 45 hours, across the group in one peak hour.

The city also retimes two signals on the corridor using the camera counts. Average speed rises from 22 to 27 km/h the following month, and the control room catches two stopped-vehicle incidents within a minute each, where the old system took about ten minutes to notice.

What are the common mistakes?

The most common mistakes are trusting a model that was never tested on local footage, reacting to single-frame errors, and collecting video without a plan for privacy.

  • Training on generic data only. A model trained on sunny motorway footage will miss vehicles in rain, at night, or on narrow city streets.
  • Alerting on every blip. A single slow frame is not congestion; thresholds need several minutes of evidence.
  • Ignoring privacy. Number plates and faces should be blurred or deleted on a fixed schedule, and access to raw video should be limited.
  • No ground-truth check. Counts that were never compared with manual counts will drift silently.
  • Buying cameras before defining the question. Hardware without a decision to inform becomes an expensive archive.

Key takeaways

  • Cameras turn video into counts, speeds and queue lengths that traffic systems can act on
  • Tracking vehicles across frames is what makes counting and speed measurement reliable
  • Navigation apps use live camera speeds to reroute drivers and update arrival times
  • Cities use the same data to time signals and plan road changes
  • Every system needs a ground-truth check and a privacy plan before it is trusted

Frequently asked questions

Can computer vision replace loop detectors for traffic counting?

No, it usually works beside them. Cameras add vehicle type and queue shape, while loop detectors are cheaper per lane and work in fog and darkness. Most cities run both and compare the counts.

How accurate is camera-based speed measurement?

Good systems measure speed within a few km/h when the camera is calibrated and the view is clear. Accuracy falls in heavy rain, at night, or when vehicles are partly hidden, so speeds are usually averaged over a minute rather than trusted frame by frame.

Do traffic cameras record number plates?

Some do, for enforcement or tolling, but analysis systems usually blur plates and faces by default. The counts and speeds a traffic team needs do not require identifying any vehicle, and most cities delete raw video on a fixed schedule.

How fast do navigation apps react to a jam?

Usually within one to three minutes of the cameras reporting slower speeds. The routing engine recalculates routes continuously, so drivers near the jam get a new route before they reach it, while drivers further away may see the delay in their arrival time first.

Can a small town use computer vision for traffic?

Yes. A single camera at the busiest junction can count vehicles and measure queues, and cloud services can run the models without a local server. The cost is the camera and the connection, not a control room.

What happens when a camera fails?

The system marks that road segment as unknown and falls back to historical averages for the same hour and day. Navigation apps show the usual travel time instead of a live one, and the gap is flagged for maintenance.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a traffic vision system for your roads or fleet? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Computer Vision service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call