Knowledge · Visitor counting
Counting visitors with cameras: how many are on site?
Counting at entrances or measuring density in areas? How cameras capture visitors, where accuracy ends and why no video needs to be stored.
Updated: · MOVETOS
The question behind the question
“How many people are on site right now?” Licensing authorities, security teams and organisers often ask this several times a day. In fact, it hides two different questions:
- How many are here in total? This matters for the licensed capacity and for deciding whether to slow down admission.
- Where is it getting crowded? This matters for safety. A thousand people on a large field are no cause for concern; the same thousand in front of a stage can become dangerous.
Cameras can help with both questions – but through different methods, which are worth understanding before you rely on their figures.
Two methods compared
Counting at entrances and exits
A camera observes an entrance. Every person entering the area is counted as an arrival, every person leaving it as a departure. The number present then follows a basic principle of queueing theory, flow conservation: present = arrivals – departures (Gross et al., 2008). The same principle is used in fire safety engineering and in crowd management research.
For this to work, the camera needs two AI building blocks:
- Object detection: a neural network finds every person in each camera image in a single computational pass and marks them with a bounding box (the “YOLO” method, Redmon et al., 2016).
- Tracking: a second method links the boxes from frame to frame to the same person and assigns them a running number, so that they are counted only once (the “ByteTrack” method, Zhang et al., 2022).
From the running arrival count you can read off at any time how many visitors arrived in any given period – simply as the difference between two counter readings. Traffic engineering has long used this difference method (Highway Capacity Manual, 2000).
Measuring density in areas
A camera looks down on an area, such as the space in front of a stage. Rather than counting who comes and goes, it counts how many people are in the image now. If the ground has been measured, this becomes a density in persons per square metre. In dense crowds, bodies hide one another, but heads usually remain visible from above. That is why there are models that specifically detect heads. They are trained on datasets such as CrowdHuman, which was developed for detection in crowds (Shao et al., 2018).
Density can be classified using recognised scales, such as Fruin’s level-of-service scale (1971) or Still’s rule of thumb (2014): restricted from 2 persons per m², dangerous from 4, crush conditions from 6.
Side by side
| Method | Measures | Strengths | Limits |
|---|---|---|---|
| Counting at entrances and exits | Arrivals, departures and hence the number present | Total over the day, new visitors per period | Every access point must be observed; errors accumulate over the day |
| Density within an area | People in the image; with ground measurement, persons per m² | Shows where it is getting crowded; independent of what happened earlier | Applies only to the observed area; no total for areas without a camera |
From areas to a site total
The total on site is obtained by adding up the people present in all counted areas. It is only as good as the coverage: an entrance without a camera, a side gate for suppliers or a gap in the fence will be missing from the sum.
Where no camera is looking, density between neighbouring measurement points can only be estimated. An honest display makes such places visible instead of claiming a figure for them.
Little’s Law offers a useful cross-check: L = λ · W (Little, 1961). The average number present (L) equals the arrival rate (λ) multiplied by the average dwell time (W). If on average 2 visitors arrive per minute and stay for 5 minutes, you would expect around 10 people present. If the measured figure differs significantly, something is usually wrong with the detection or with where the counting area has been placed. The formula holds only while inflow and outflow are roughly in balance.
Sources of error and accuracy – an honest look
No camera-based counting method is free of errors. What matters is knowing the typical errors and keeping them small.
Double counting
- Lost tracking: if a person is briefly hidden completely, tracking may lose their number and count them as “new”. A short grace period, during which the old number can be picked up again, prevents this.
- Passers-by and edge contacts: someone who only skirts the edge of an area or crosses it quickly is not a visitor to that area. A minimum dwell time filters out such cases, as well as brief flickering of detections at area boundaries (Spearpoint & Hopkin, 2020). It is short at the entrance and longer in front of a stage.
- Overlapping areas: if two cameras see the same ground and both areas are counted, the same person appears twice in the sum.
- Counting restarts: if a counting process restarts, ongoing tracks are lost. People in view at that moment may be counted as arrivals a second time – at most as many as are visible at that instant.
What limits detection
- Occlusion in dense crowds – head detection from above helps here.
- Camera angle: a steep view from above (roughly 30 to 60 degrees from vertical) detects heads better than a shallow one.
- Lighting: detection rates fall in poor light; infrared illumination or adequate base lighting helps.
- Very quick crossings may fall between two analysed frames and go undetected.
There is therefore no blanket accuracy figure that holds “in every case”. Quality depends on the set-up on site and should be checked there – for example by comparing with a manual count.
Data protection: figures, not footage
Nobody needs video to count visitors. The live image is analysed, and what remains are anonymous figures: arrivals, departures, people present, density. Three principles protect visitors:
- No video recording. Only figures with no personal reference are stored.
- Processing on site. Analysis runs on hardware at the venue, so camera images need not leave the site – no cloud required.
- Privacy zones. Parts of the image that must not be observed, such as windows of neighbouring flats, are obscured.
How MOVETOS OPS does it
MOVETOS OPS uses both methods. In observation areas the platform measures density – in persons per m² where the ground has been measured – using its own head detection model. Where visitors are to be counted, it tracks people with ByteTrack and counts each person only after an adjustable minimum dwell time – once per entry into the area. A grace period bridges brief tracking losses. Counter readings are saved every 5 seconds and continue after a restart.
When planning, MOVETOS OPS suggests a camera for every entrance to count the admission area, because that is where crowding is most likely at peak times. On the situation map, a density field covers the whole site; places too far from any measurement are hatched as “not observed”.
The AI runs on site on dedicated hardware and uses Intel or NVIDIA graphics cards. A smooth live image takes priority over the AI. There is no video recording; only when a warning is raised is an evidence photo stored, and it is deleted three months after the event. When it gets crowded, the platform reports this and suggests a suitable announcement. The system suggests; a person approves.
Checklist for your event
- Decide whether you need the total, the density at pinch points, or both.
- Observe every access point, including side and supplier entrances, if you want to derive a total.
- Plan cameras at entrances and stages first.
- Mount cameras high and steeply angled, and measure the ground to obtain persons per m².
- Lay out counting areas so that they do not overlap.
- Choose a minimum dwell time that suits the location: short at the entrance, longer in front of the stage.
- Check the figures on site with a manual sample and with Little’s Law.
- Pay attention to lighting in the evening and set up privacy zones.
- Make sure no video is stored and that analysis runs on site.
Sources
- Redmon, J., Divvala, S., Girshick, R. & Farhadi, A. (2016). You Only Look Once: Unified, Real-Time Object Detection. IEEE CVPR 2016, pp. 779–788.
- Shao, S., Zhao, Z., Li, B., Xiao, T., Yu, G., Zhang, X. & Sun, J. (2018). CrowdHuman: A Benchmark for Detecting Human in a Crowd. arXiv:1805.00123.
- Zhang, Y., Sun, P., Jiang, Y., Yu, D., Weng, F., Yuan, Z., Luo, P., Liu, W. & Wang, X. (2022). ByteTrack: Multi-Object Tracking by Associating Every Detection Box. ECCV 2022, pp. 1–21. Springer. arXiv:2110.06864.
- Spearpoint, M. & Hopkin, C. (2020). How dwell time affects the determination of occupant density in retail occupancies using footfall data. Safety Science, 133, 105013.
- Little, J. D. C. (1961). A Proof for the Queuing Formula: L = λW. Operations Research, 9(3), pp. 383–387.
- Gross, D., Shortle, J. F., Thompson, J. M. & Harris, C. M. (2008). Fundamentals of Queueing Theory. 4th edition, John Wiley & Sons.
- Fruin, J. J. (1971). Pedestrian Planning and Design. Metropolitan Association of Urban Designers and Environmental Planners, New York.
- Still, G. K. (2014). Introduction to Crowd Science. CRC Press.
- Transportation Research Board (2000). Highway Capacity Manual. 4th edition, National Research Council, Washington, D.C.
Expertise
All articlesRead on
Events, companies or critical infrastructure: we will show you how MOVETOS OPS does this in practice.