Traffic Management System with Autonomous Car And Ambulance Detection(Project Nextraff)

/Traffic Management System with Autonomous Car And Ambulance Detection(Project Nextraff)
Total score : 4.97 (89.5 / 18)
|
x 16

Idea

With ever increasing traffic in the country, we are here to control the traffic with the help of a smart traffic system.We are here to propose a solution to this by revolutionalising the entire traffic system. We have three main features that we have worked on, and they are as following
1) The Traffic Management System
2) The Ambulance Detection
3) The Autonomous Car – Jadaa
All of this contributes in providing a structured traffic controlling system. The traffic management takes care of the fact that time allotted to the traffic must be directly proportional to the density of the traffic on the respective road. The Ambulance Detection is entitled to detect the presence of an Ambulance so that it can commute through the traffic irrespective of the existing traffic on each road. The Autonomous Car – JADAA is a prototype of a self-driving car. With various companies like Google,Tesla etc already placing their stand in this field, these self-driving cars are definitely the future of automobiles.

Classification
Automation
O/S
Windows,Raspbian
CLOUD
Project participants
TMS(dphilipjose@yahoo.com)

Project summary

In this project we have successfully developed a prototype for the real time solution and implementation of Traffic Management System with an Autonomous car and the added feature of Ambulance Detection. This was achieved by means of finding the density of vehicles in the road with the help of Canny edge detection, an edge detection technique used in OpenCV (Open Computer Vision), and with the help of a Haar Cascade Classifier to train the model for detecting the Ambulance, traffic signals and traffic signs. Our model detects the ambulance, traffic signs and traffic signals with the help of feature-detection based cascade classifying technique of Haar Cascade which has been provided with a set of both positive and negative set of sample images of all the objects i.e. the Ambulance, Traffic signs and the signals. Positive images are those images in which the subject which is to be detected is present. Thus, by this logic, it is implied that all pictures that do not include the subject are called negative images. Thus, using these two sets of pictures, the classifier can tell the differences between frames which have the subject and those which don’t, thereby effectively being able to detect the object required from the camera feed.


Project Content

Living in Bangalore, India, you have to deal with hustle and bustle of the city. This city never sleeps and its road are always packed. We, the students of Faculty of Engineering, Christ (Deemed to be University), Bangalore, seek to mitigate this problem with the help of data analysis and IoT solutions.

The biggest question in any project is to how to go about the implementation of an idea. We came across a library called OpenCV, this tool helps us in extracting density of traffic at any point of time. Edge Detection is one way to go about this idea, we use Canny Edge Detection to detect edges. Here is how Edge Detection works.

After performing Edge detection we calculate the means of each image processed by the algorithm using the mean of the reference image, in this case the reference image is an image when there is no traffic using this image we can then compare images generated in real time and teach the computer what high low traffic looks like. We should really be careful when we are selecting these images.


The image above displays the image processed by Canny Edge Detection.

Some Detail on the Components Used
For the server, I used Python’s framework called Django. For installation tutorials, please refer the following link:

For the MQTT part, I have used Paho on the server side.

Client side, you need to import an MQTT library you can get that by searching for it on

Now, how does everything fall in place? The following image illustrates how all the components fall in to place.
A view of the login screen:

A view of the main screen:

This image gives us the comparison of traffic we are dealing with at each junction.

A view of the API:

The API helps to transfer data from the camera to the server.

Note: The red board is a WIZ750SR and the blue board is an Arduino Uno.

Too complex to understand? Do not worry! We have made a video.

The above photos shows the connections to transfer data from your evaluation board to your Arduino board. We were unable to use Fritzing.org since their captcha was shutdown and were unable to sign up. We can however explain the connections.

Step 1: Connect a RS232 cable to your Wiznet evaluation board.

Step 2:Take a pair of jumper wires

Step 3:Connect one jumper wire to pinout number 2 and one jumper wire to pinout number 5

The diagram above will help you with the connections.

Step 3: Take the jumper wire connected to pin 5 and connect it to the GND in your Arduino

Step 4:Take the jumper wire connected to pin number 2 connect it to the RX or 0 digital

For the signal connections make sure to connect the lights for junctions A and C in parallel and B and D parallel as well.

Steps to Upload Code to Arduino
1) Select the ‘Arduino Uno’ board from the Board manager

2)Select right com port for your device

3) Then upload the code

4) While uploading the code make sure the TX and RX pins are not connected

Steps to Upload Code to the WIZnet Board
1)Compile the Code from Mbed OS

2) Use the ISP toolkit to upload the code to board

3) Before doing that set the boot switch on your board while uploading

4)After uploading reset the boot switch

5)Test your board with AT commands


Ambulance Detection

Another Feature our project is detection of priority vehicles like ambulance,police cars and so on.However, for this project we have attempted the detection of Ambulance.

This we were able to do with the help of Haar Cascade.

How detection System works:

When we detect an ambulance a status is sent to the serve that status information is retrieved by the signal through our API.

Autonomous Car-Jadaa

To go with our project we have also made an autonomous car so that we can avoid incidents of drunken driving and sleep driving

Structure of our car

10 111 0

Leave a Reply