City Built Pedestrian Counter Saves Thousands of Dollars

City Built Pedestrian Counter Saves Thousands of Dollars

We are always trying to be ahead of technology advances but sometimes they come on too quick and are too expense for us to implement. This poses a problem because while we want to be ahead of the curve sometimes we need to get a little creative.

Let me introduce you to the story of our very own Pedestrian Counter.

We had a problem – we had no idea how many people were visiting the River Valley Funicular. We needed some real accurate numbers but we had no raw data.

Currently the City uses a variety of methods to count vehicles, bicycles, pedestrians and crowds. We have used technologies from MioVision cameras (worth around $30,000) to automated passenger counters. However, these are expensive systems.

But how can we do this cheaper, faster, quicker and smarter?

In comes our City developer team (the ones who can code things from scratch). They developed a pedestrian counting machine for under $158 CDN (including hardware) – that’s around $29,800 in savings!

They used what is called Edge Computed Thermal Vision. The pedestrian counter takes the 2D array of temperatures returned by the sensor and creates a heat map per frame. A “blob detector” analyzes the thermal image and returns the pixel coordinates of the circular peaks it finds. 

However, we ran into few problems such as detecting a single person as multiple blobs as well as failing to detect blobs entirely when there is clearly a blob present. We solved these issues by using a centroid tracking algorithm so the same heads are not counted multiple times. These counts can be transmitted over a large distance using LoRaWAN.

The LoRaWAN specification is a Low Power, Wide Area (LPWA) networking protocol designed to wirelessly connect battery operated ‘things’ to the internet in regional, national or global networks and targets key Internet of Things (IoT) requirements such as bi-directional communication, end-to-end security, mobility and low power usage.

Once we figured out the computing work, we designed a CAD model that could house our hardware. We used a 3D printer to print the housing. Soon after, we deployed the box at the Funicular!

On our first day (August 15, 2018) our counter calculated 382 visits to the Funicular during our seven hour test. We also set up a Miovision Unit to test our accuracy. Our counter was 60% accurate when compared to the Miovision Unit. A few reasons for the discrepancy – ours is low resolution and has a small field of view. Our maximum frame rate was 10 fps which is low. However, after our test we took our technology back to the office and came up with a few modifications to improve accuracy, directional movement and sensor detection. Our improvements have allowed us the ability to deploy an accurate semi-permanent install of our counter at the Funicular. We are also exploring other deployment opportunities across the City.

Curious about the systems we used? 

Software 

  • Open CV Blob Detector: Detects blobs in thermal images
  • LMIC (Lora in C): A communication library for LoRa
  • The Things Network: Our LoRa Server
  • AWS IoT: Connects our pedestrian counts to other systems, such as Open Data

Hardware

  • Raspberry Pi Model 3 B+: Single board computer
  • Dragino LoRa/GPS HAT for Raspberry Pi: An expansion module used for LoRa communication, based on the Semtech SX1276/SX1278 transceiver
  • Adafruit AMG8833 IR Thermal Camera Breakout: Based on the Panasonic AMG8833 IR sensor

Want to learn more or deploy your own low cost counter? Contact us at smartcity@edmonton.ca. 

Close Menu