Crowd Controller for an Elevator
by RaghavMehta in Circuits > Raspberry Pi
194 Views, 2 Favorites, 0 Comments
Crowd Controller for an Elevator
Description - Device to control crowding in an elevator to ensure social distancing is maintained. The device uses Computer Vision to calculate the number of people inside the elevator. If the number exceeds 4, a beep alarm is sounded until the number of people in the life reduces to 4 or less.
Supplies
- Raspberry pi (I used raspberry pi 3b+)
- Raspberry pi case
- Raspberry pi camera (any other compatible camera module)
- HDMI cable
- Keyboard
- Mouse
- Monitor
- Micro SSD (64 Gb)
- Power Supply (5V or 2.5A)
- Speaker
- Microphone
Setup Raspberry Pi
To setup your Raspberry pi look at the documentation and videos given below:
Attaching Camera
After setting up Raspberry pi switch it off. Then attach the camera to the raspberry pi and turn it on again.
Then use the Spyder IDE and write the given code.
Python File 1 - Temp.py (Main File)
Temp.py is the main file and it uses the functions created in Person1.py file.
The program counts the number of people going in and out of the elevator and if the number of people inside minus number of people outside is greater than 4 a beep sound is produced.
"Number of people entering the elevator- Number of People leaving the elevator > 4"
Beep sound is produced.
Downloads
Python File 2 - Person1.py
Person1.py is a function class from which functions are used in the main file.