This program count incoming and outcoming people, who crooss by hall
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
PeopleCounterMain.py issue 6 fix May 16, 2018
README.md Create README.md Mar 3, 2017
test2.mp4 init commit Mar 3, 2017

README.md

People-Counter

This program count incoming and outcoming people, who crooss by hall. I find many examples in video, how count people who crossing hall or doors, but didn`t find examples code. I decided write little program, which been counting incoming and outcoming people. I use OpenCV and Python 2.7 So, begining you need install all dependensies: #pip install datetime #pip install imutils #pip install opencv-python Use "import" for importing this library in project

For running program write in command line #python PeopleCounterMain.py

If you want chenge video or set stream from rtsp camera change line camera = cv2.VideoCapture("test2.mp4") # set here your video

This example use mechanism computer the absolute difference between the current frame and first frame, so I compare two frame and if chenges exist i find where. If area bigest more than 1200 I draw rectange around object which been chenged, if less than contour is too small, ignore it.