Vehicle Count Limit Detection: Caps & Queue Rules
A yard that allows four delivery trucks ends up with nine, and nobody notices until the fire lane is blocked. Vehicle count limit detection answers a question ordinary vehicle detection does not: not whether a vehicle is present, but how many are present right now – and whether that number has crossed the cap you set for the zone.
This guide covers how the counting works, where per-zone caps come from, what accuracy you can realistically expect, and how the rule is deployed on cameras you already own.
What Vehicle Count Limit Detection Does
The algorithm maintains a live tally for each defined zone. Vehicles entering increment the count, vehicles leaving decrement it, and the running total is compared against a threshold. When the count exceeds the limit – or stays above it for longer than a grace period – the system raises an event with the zone name, the current count, the threshold, and a snapshot.
Three variants cover most sites:
- Occupancy caps – “no more than three trucks in the dock apron at once”. Breach the cap and the alert fires immediately.
- Queue length limits – count vehicles stacked along a lane or approach; flag when the queue exceeds a set number or extends past a defined line.
- Directional tallies – maintain an in/out balance per gate, so a site always knows how many contractor vehicles are currently inside the fence.
How It Differs from Plain Vehicle Detection
Vehicle detection tells you a vehicle is in the frame; it is presence, and it is the foundation everything else builds on. Count limit detection adds state – a persistent number tied to a place – which means the system has to track identity across frames and across zone boundaries rather than just classify a bounding box. That is why it is configured per zone rather than per camera, and why a zone spanning two camera views needs the hand-off defined during setup. If your requirement is simply “alert when a vehicle appears”, the broader vehicle detection rules are the better starting point.
Where Per-Zone Caps Come From
Limits are rarely arbitrary. They usually descend from something physical or contractual:
- Fire lane and egress rules – a maximum number of parked vehicles before an access route is obstructed.
- Dock and bay capacity – how many trucks the apron can hold without blocking the turning circle.
- Contractor quotas – a site rule that no more than N subcontractor vehicles are on site simultaneously.
- Traffic flow agreements – caps agreed with a local authority or a neighbouring site to keep an approach road clear.
- Queue service levels – an internal target that a queue past a certain length triggers a second gate or another loader.
Where a cap is externally imposed, sites often pair the count rule with illegal parking detection so that “over the limit” and “parked where it shouldn’t be” are handled by one review queue. Queue-based operations usually combine counting with vehicle departure detection to measure how long each position stays occupied.
How the Counting Works on Existing Cameras
An edge AI box ingests the existing ONVIF or RTSP stream and runs the model on-device. For each frame the system detects vehicles, assigns each a tracking identity, and follows that identity between frames. Crossing a zone boundary increments or decrements the tally depending on direction; the direction is derived from the crossing line’s orientation, so one line can separate “arriving” from “departing”. Because tracking is continuous, one truck counted once is not counted again on the next frame – the common failure mode of naive motion-based counting.
The count is then held as state. That is what makes grace periods possible: a truck briefly overlapping the boundary during a three-point turn should not trigger a queue alert, and a short grace window absorbs exactly that.
Accuracy and Honest Limits
Counting accuracy tracks the same variables as any video analytic: camera height, angle, occlusion and lighting. Three practical points matter more than the model itself.
Occlusion is the main error source. A large truck hiding two smaller vehicles behind it will undercount until they separate. Mounting height and angle that keep vehicles visually distinct are worth more than any post-processing.
Define boundaries deliberately. A crossing line placed where vehicles pause – a gate arm, a speed bump, a weighbridge – produces double counts. Place lines where traffic moves continuously through the frame.
Expect a commissioning period. Plan to review the first week’s events against a manual spot count, then tune thresholds and grace windows. Sites that skip this step blame the algorithm for what is really a boundary-placement problem.
For sites that need the opposite rule – how few vehicles may be present – the minimum vehicle presence detection model covers fleet-availability checks with the same zone mechanics.
Deployment and Integration
Nothing about this requires new cameras. The rule runs on the streams you already have, on an appliance in the comms cabinet, which means no cloud round-trip and no per-camera subscription. Systems scale from 2 to 128 channels with 1 to 256 TOPS matched to the channel count, and the same appliance carries a library of 198+ pre-built algorithms, so a site that starts with counting can add speeding, PPE or plate rules later without touching hardware. A typical rollout: map the zones and their caps, place crossing lines on a site plan, run the rule in shadow mode for a few days to compare against manual counts, then switch on alerting and routing.
Two integrations do most of the heavy lifting. Binding counts to vehicle identity through license plate recognition turns “nine trucks in the yard” into a named list, which is what makes enforcement conversations possible. And feeding queue counts into the wider parking and traffic management view lets one dashboard answer capacity questions across the whole site.
Where the cap protects a physical clearance – a canopy, a tunnel, a covered dock – pair the count with overheight detection, since the vehicles that break a height limit are often the ones that also break a space limit.
For the wider context around this, see detect a person on camera.
Common Questions About Vehicle Count Limit Detection
How many vehicles can it count in one zone? There is no fixed ceiling; the practical limit is how well the camera keeps vehicles visually separated. A zone where trucks queue nose-to-tail in clear view counts reliably, while a crowded frame with heavy occlusion needs a better angle.
Can one camera cover several zones? Yes. Zones and crossing lines are defined in software per view, so a single camera overlooking a gate can maintain an inbound count and an outbound count independently.
Does it work at night? It depends on the scene rather than the algorithm. Adequate infrared or area lighting keeps detection stable after dark; an unlit corner will degrade any video model, and that is a lighting problem to fix at the site.
What happens when a vehicle stops exactly on the line? Grace periods handle it. A threshold configured with a minimum dwell time above the cap ignores momentary crossings, so a truck pausing mid-turn does not generate an alert.
Add Vehicle Count Limits to Your Site
Tell us the zones you care about and the cap for each, and we will map them to a configuration you can validate on your own footage. For reference on traffic control device standards, see the MUTCD; on the streaming protocol these cameras use, see IETF RFC 2326 (RTSP). Order a Starter Kit to test counting accuracy on your busiest approach, or tell us your scenario for a configuration quoted per site.
