Introduction: Cyber-Physical Security of Smart Parking and Traffic Control
The internet is growing with billions of devices including cars, sensors, computers, servers, refrigerators, mobile devices and much more at an unprecedented pace. This introduces multiple risks and vulnerabilities in the infrastructure, operation and governance of smart cities all around the world. This project will give an overview of how smart security camera systems can be used to optimize, monitor and improve the overall behavior of traffic and parking lots around a smart city.
Step 1: Components & Materials Required
The project requires the following list of components and materials for building the complete smart traffic and parking control system:
1. Raspberry Pi 3B+ (1)
2. Raspberry Pi Zero W (1)
3. RasPi Camera Module (2)
4. Corrogated Cardboard
5. Xacto Knives
6. Cardboard Glue
7. Marker Pens
8. Colored Tape
4. Power Adapters (5V, 2A)
Step 2: Designing the Physical Infrastructure
The smart city requires an infrastructure designed and built to scale and appropriate dimensions. The following sections can be identified as the major parts of the infrastructure
1. Main Hardware Deck
Objective: Holds and conceals the power and processing hardware such as cables, power distribution strips and adapters below the ground level of the city.
Dimensions: 48" x 36"
Additional: Requires a rectangular hole cutout on one of the corners for accessing the cables underneath the ground level.
2. High-Rise Building
Objective: Serves as the primary platform for the camera to be placed at 3/4 height for a good vantage point over the parking lot and the roads surrounding the building.
Dimensions: 24" x 16" x 16"
Additional: Requires three holes of 2"x4" dimensions on all the walls of the building to hold the Raspberry Pi 3B+ placed inside the building at around 3/4 height above the city ground level.
3. Bank Building
Objective: Functions as a concealment for the Raspberry Pi Zero W and the RasPi Cam that looks over a bank firm and the entrances to the building
Additional: Create a partition wall inside the building to separate the server room with the actual banking operations room as shown in the images.
Step 3: Building the Smart City
Once the dimensions for the ground hardware deck, high-rise building and the banking building have been marked out on the cardboard sheets we are ready to build the city itself.
1. Place a full sheet of cardboard on the bottom of dimensions 48"x36" to create the platform for the entire city to be built upon
2. Create the walls for the ground hardware deck to create an enclosed area of height 5" using the second piece of cardboard.
3. Use a second sheet of cardboard of dimensions 48"x36" to create the roof of the ground hardware deck and create a 16"x16" hole for the high-rise building on it.
4. Cut out the walls and roof for both the high-rise and banking buildings from the third cardboard sheet for the dimensions specified in "Design the Physical Infrastructure" and as shown in the images.
5. Cut out the necessary holes on the building walls and roofs as specified earlier and as also visible on the images.
Step 4: Hardware and Software Integration
Now is the time to setup the Raspberry Pis, Cameras and the Software necessary to launch the smart city into action.
1. Connect the mouse, keyboard and monitor to the Raspberry Pi 3B+ using USB and HDMI cables and ports.
2. Power the Raspberry Pi 3B+ on using the wall adapter (5V, 2A)
3. Plug the MicroSD card into the Raspberry Pi and boot up the system and wait for the Ubuntu Mate screen to show up on the monitor.
4. Now open a terminal inside Ubuntu Mate and navigate to the FeatureCV directory and run "python locate.py"
5. Multiple screen with the car detection algorithm working will pop up. This means that you have successfully completed the Hardware and Software Integration step. Congratulations!
Step 5: Learn Cyber-Physical Security and Play Around!
The entire source code for the smart parking system can be found at the Github link below: github.com/BhavyanshM/FeatureCV
Security cameras are one of the most commonly used sensors for detecting crimes all around the world. This step will guide you through how to construct, test, and destroy a vision-based security camera system.
1. Launch the Python script "locate.py" by using the command "python locate.py" in a terminal window.
2. Use the scrollbars on the "Trackbars" window to obtain the proper HSV values to isolate only the car parked in the parking lot.
3. Save these HSV values somewhere in a file.
4. Now use an SSH client on an external laptop to log into this Raspberry Pi 3B+ over the WiFi network and modify some of the values remotely to see the security system crash and not detect any cars!
5. Feel free to play around with the Python scripts and the HSV Trackbar values to detect cars with different colors and features.
Step 6: Conclusion and Video
Smart parking and traffic control system can revolutionize the ability for any organization to monitor, secure, optimize and improve the overall operation of a smart city.
Look at the video above to ensure that the systems operates as expected and as shown in the video.