If you've ever wanted to know exactly how many people visit your store, office, or event space, you usually have to buy an expensive dedicated counter or write your own computer vision code. This project does it with whatever camera you already own — analog CCTV, USB webcam, or networked IP camera — and a no-code AI platform.
You draw a counting line across your entrance in the camera view, and an on-device AI model tracks every person crossing it, separating ins from outs. The data streams to a live dashboard and gets logged minute by minute for historical analysis.
- AI Line Cross Counter that works with any camera type
- Bidirectional in/out counting
- Real-time dashboard with live counts
- Automatic time-series logging
- Built-in chart and table analytics
- One-click CSV export for Excel
Plenty of small businesses already have CCTV cameras pointed at their front door, but the footage just sits on a hard drive. Adding visitor analytics on top of that existing hardware should be cheap and easy. So we built this as a reference project showing how a few visual blocks can turn passive surveillance into actionable foot-traffic data.
What You'll Build
- An AI camera that recognizes when a person crosses a virtual line
- Two counters — one for entries, one for exits
- A live dashboard showing the camera feed and current counts
- A historical chart that records both counts every minute
- Detailed analytics with chart-to-table switching and CSV export
- Download and install Grablo software on your device from https://grablo.co/download
- Get this project from the Grablo Gallery
- Configure your camera in Settings → Camera → Edit (every CCTV is different — see Hardware Setup below)
- Open the project and connect to your device
- Hit RUN, then draw the counting line across your entrance in the camera view
- Watch the in/out counts update as people walk by
The dashboard has a Camera widget showing the live feed with the counting line overlay, two Label widgets bound to the In Count and Out Count variables for at-a-glance numbers, and a Historical Chart widget that plots both counts over time. The chart widget has a built-in detail view (top-right button) where you can change the time range, switch between chart and table representations, and export everything as CSV.
The whole project runs on a single logic with two controls. The first control fires once at startup with a Once condition and runs an AI Analysis action that creates a Line Cross Counter. The Add Analysis command lets you draw the counting line and assign two variables — one for the In direction and one for Out — that get incremented automatically every time the AI detects a crossing.
Three blocks for the AI, two widgets on the dashboard, and you have a working visitor counter.
Expected Results- The dashboard shows your live camera feed with the counting line drawn across the entrance
- As people walk past the line, the In or Out count increments based on their direction
- The Historical Chart updates every minute with new data points
- Click the chart's detail button to dig into trends, switch to table view, or export CSV
This project is camera-agnostic on purpose — the project file ships with the camera connection deliberately blank because every CCTV is different. After importing, go to Settings → Camera → Edit and enter the connection details for your specific setup:
- Old analog CCTV without networking: connect it to your Grablo device through a USB video capture adapter, then choose CSI/USB type
- USB webcam: CSI/USB type, index 0 (or use the Scan button)
- Network IP camera: ONVIF or RTSP type with the camera's address and credentials
For the AI mode, pick Fast on low-power devices like a Raspberry Pi, Balanced for mid-range hardware, or Accurate when you want the best detection on a more capable machine. If your device has a powerful GPU, turn on GPU acceleration for a major speed boost.
What's Next?- Add more counting lines for multi-zone tracking (lobby vs. checkout, for example)
- Send a daily visitor report email at midnight using the Send Email action
- Push count alerts to your phone when occupancy exceeds a threshold
- Combine multiple cameras into one dashboard for whole-building analytics
- Add an Object Detection layer alongside the counter to filter out staff vs. customers
- Camera feed not showing: Double-check Settings → Camera → Edit — the project ships without camera credentials, so you need to enter your CCTV's address or USB index manually
- Counts not incrementing: Make sure the counting line is drawn across the path people actually walk; click on the line to flip the In/Out direction if it's reversed
- AI is slow or laggy: Switch the AI mode to Fast, or enable GPU acceleration if your device has a capable GPU
- Historical chart is empty: The default logging interval is 1 minute, so wait at least one full minute after starting the project before data appears





Comments