Counting and Tracking Objects With Your Existing Cameras
Last updated:
You probably own more sensors than you think
A builders' merchant has 14 cameras covering the yard, the gate and the trade counter. They exist for insurance. Nobody watches them unless something goes missing.
Those same cameras could count vehicles entering the yard per hour, measure queue length at the counter, and tally pallets leaving loading bay two. Modern object detection models run comfortably on recorded or live footage and turn pixels into numbers a manager can use.
The catch is that security cameras were positioned to identify faces and number plates after an incident, which is not the same as the angle that makes counting reliable.
What can be counted and tracked
- People crossing a line, entering a zone, or waiting in a queue
- Vehicles by broad type at gates, car parks and loading bays
- Pallets and cages moving through doors or staged in a marshalling area
- Products on a conveyor, where the camera is close and the background plain
- Occupancy of desks, tables or parking bays over the day
- Dwell time in a zone, such as how long lorries wait before unloading
Counting relies on two steps. Detection finds each object in a frame. Tracking links the same object across frames so a person standing in a doorway for a minute is counted once, not 1,800 times. Tracking is usually where accuracy is won or lost.
Camera angle decides almost everything
| Camera position | Counting quality | Why |
|---|---|---|
| Overhead, looking straight down at a doorway | Excellent | People and objects rarely hide behind each other |
| High corner, angled at 45 degrees | Good in light traffic | Occlusion rises quickly in crowds |
| Eye level, facing a queue | Poor for counts | People block each other; great for faces, bad for numbers |
| Wide yard view from a pole | Good for vehicles, weak for people | Small objects at distance lose detail |
Resolution matters less than people expect for large objects and more for small ones. A car at 60 metres on a 1080p camera is fine. A box on a shelf at the same distance is a few pixels.
Night footage, rain on the lens and infrared switching all deserve testing. Many systems that score well on a sunny test clip lose a noticeable share of accuracy at 6pm in November.
Running it on footage versus live
Batch processing recorded footage overnight is the simplest start. It gives daily and hourly numbers, costs little, and needs no always-on infrastructure. Live counting is needed when someone will act within minutes, such as opening another till when the queue passes six people.
Live processing can run on a small box on site or in the cloud. Where each camera stream is processed has real consequences for bandwidth, privacy and cost, which we cover in our post on edge cameras versus cloud vision.
Privacy is not optional
Counting people from CCTV is processing personal data, even if you only ever keep the numbers. Under UK and EU data protection law you need a lawful basis, a data protection impact assessment for most workplace or public-facing uses, and signage that reflects what is actually happening.
- Process frames and discard them, keeping only counts where you can
- Avoid face recognition entirely unless you have a very specific, lawful reason
- Tell staff before you start, and do not quietly repurpose counts for performance monitoring
- Check how the EU AI Act treats your use if you operate in the EU; biometric identification carries far heavier obligations than counting
When cameras are the wrong way to count
If a door beam or a floor mat counter would give the number you need, buy one. They are cheap, simple and do not raise the same privacy questions. Barcode or RFID scans at a dock beat vision for pallet counts where scanning already happens.
Vision earns its place when the thing you want to count has no scan, no beam and no form attached to it.
Cameras make sense where you need several measurements from one device, where installing sensors is impractical, or where the footage already exists and you want history from last month too.
How we test feasibility
- Pull one week of footage from the candidate camera, including nights and a busy day
- Count by hand for several sample hours to create a ground truth
- Run detection and tracking and compare the totals and the hour-by-hour pattern
- Report accuracy by condition: daylight, dark, crowded, quiet
At SpiderHunts that test usually takes days rather than weeks, and it settles the argument about whether the camera is good enough. When it is, the build that follows is part of our machine learning work connected to whatever dashboard or rota tool the numbers need to reach.
Plan for the numbers to be wrong in a predictable way, and say so on the dashboard. A count that runs 5% low in the dark is still perfectly useful for spotting that Tuesday afternoons are quiet, as long as nobody is using it to reconcile tills. Once counts are flowing, pairing them with sales or dispatch data is where the insight tends to appear, and our post on anomaly detection for operations covers flagging the days that look unusual.
Frequently asked questions
Can AI count people accurately from CCTV?
Do we need new cameras for object counting?
Is people counting with CCTV legal in the UK?
Can it tell the difference between staff and customers?
How does object tracking avoid double counting?
Already recording footage nobody watches?
Send us a short clip from the camera you have in mind and tell us what you want counted. We will tell you honestly whether that angle can do it.