Initialized: Sat Oct 28 08:47:24 MDT 2017.
This project is inspired by a hack day held at Access 2017. The goal of the team that I joined was to build a device that could count customers that enter a library using a Raspberry Pi and OpenCV. Although we didn't manage to finish the project in 1 day, we came tantalizingly close. I thought I would resume the project on my own time because it is a computationally interesting task, I have never done anything with a Pi or OpenCV before. Besides selfish reasons, it turns out that a cheap, accurate, customer counting system is needed in public libraries. I hope this work will be instructive.
All scripts written by Andrew Nisbet for Edmonton Public Library, distributable by the enclosed license. OpenCV is covered by BSD license.
This product is under version control using Git. Visit GitHub
Everything listed is merely a suggestion. I don't endorse any vendor or product especially.
- Raspberry Pi (3) CanaKit Raspberry Pi 3 Ultimate Starter Kit - 32 GB Edition CDN$ 119.99.
- Camera Raspberry Pi Camera Module V2 - 8 Megapixel, 1080p CDN$ 30.99.
- OpenCV 3
- Python
- Setup Raspberry Pi. There are plenty of good tutorials on line. I used the CanaKit Pi, and 'read the manual'.
- Install the camera, again good tutorials on line, however there are some gotchas that are not completely explained. I found this tutorial the most useful.
- TBD
When compiling OpenCV 3.0 on the Raspberry Pi 3, some instructions say to use the make -j4
flag. This is meant to speed up compilation by instructing the compiler to use 4 cores. I found that, after 40 minutes of compute time, the process would terminate in an error. Instead I used the command make
and after 80+ minutes the compilation finished successfully.
- A description of some other techniques that have been attempted by other libraries can be found here.
- Pedestrian detection using OpenCV.
- Home surveillance and motion detection with the Raspberry Pi Python and OpenCV.
- Basic motion detection and tracking with python and OpenCV.
- Histogram oriented gradients object detection (HOG).
- HOG detectmultiscale parameters explained.
- Stackoverflow: How can I detect and track people using OpenCV.
- Stackoverflow: Full body detection using OpenCV and Python.