This program counts number of people incomming and outgoing a particular door. The example video is shot with Raspberry Pi Camera. I use OpenCV and Python 2.7. Make sure you install the numpy
, cv2
, imutils
before you run the program.
Steps to execute the program with video source
- Make sure you install the above mentioned dependencies.
- Place your video file and replace
people-capture.mp4
in the linevideo = cv2.VideoCapture("people-capture.mp4")
with your video filename - Open your Terminal in OpenCV Environment
- Run
python counter.py
Steps to execute the program on Raspyberry Pi 3
- Make sure you install the above mentioned dependencies.
- Also make sure you have camera connected to your Pi3.
- Open your Terminal in OpenCV Environment
- Run
python raspberry.py
This is ain't a perfect solution for all use cases, I will be constantly improving algorithm. In the next update I am working to integrate the algorithm with custom haar cascade.