Automatic Real Time System for Traffic Security and Violation Detection

According to UN report 2017, India currently has the second largest population in the world in that India has the world’s largest youth population despite having a smaller population than China. We are considering youth because most of the fatal and non fatal type of accidents that we experience or encounter, contain highest rate of youth’s lives. As population increase number of automobiles also increases. With the increase in automobiles, the traffic violation has increased exponentially due to lack of manpower and resources. The traffic law violations has become a major concern for fatal accidents. Since there are various resources available to detect the traffic violations but this requires the effect officer for holding the resources and maintaining the manual penalty system. In this we have come up with an alternative method using video processing technique which overcomes the drawbacks of manual system that will enforce people to follow the tr rules sincerely. The proposed system mainly aims to reduce the accident that happens due to traffic violation and also to provide safety to the human lives and vehicles in the accident prone zone .


INTRODUCTION
Speed thrills but it also kill! Over speeding is the main cause when it comes to road accident in the Pune. Around 400 lives are lost each year in Pune and Pimpri-Chinchwad, with two wheeler riders making .Other reason for accident are traffic laws violations and abrupt lane change. By proper monitoring the traffic, we can solve these issues quickly. Automatic real time system help t all the problems related to over speeding, illegal lane change and red light violation for thrill purpose. module strictly monitorsthis entire problem simultaneously. This help traffic police in many aspects like taking penalty (challan and violation in traffic law can be observed and notified to the traffic control department (RTO) and respective online penalty can be executed easily. The same is notified to the traffic violator with proper evidences using message or email.      3 shows the overall implementation and working of the system. First we start the system by giving power supply. A high resolution camera (DM 388 camera kit) is used to capture the video continuously and as soon as any type of violationis detected like lane violation, red light violation or speed violation then the number plate of the vehicle is captured using camera and it is processed to obtained the number. The obtained number is matched with a database and if that number plate matches with the record in the database then a penalty is implemented and if the number does not matches with any record then the number will be saved for further enquiry with all the evidences.
In this model we capture the number plate of vehicle that violates the rule. In this system, candidate plate regions are extracted using a preprocessing function to increase accuracy while decreasing computational time. Then a tree of LBP-based cascade c1assifiers is used to c1assify the candidate plate regions into one of the learned style. Then these plate number is matched with the data feed in data base .Respective identity related to traffic violator will displayed .With these information the traffic violator will be punished. 1) Lane violation detection : This system detect illegal lane change. The system can be installed on an embankment, at an intersection area, at a lane change restriction area, at a no parking area or anywhere there is an observed pattern of drivers intentionally violating traffics laws. Speed Detection System (SDS) and red light violation detection system(RVDS) that is applicable as a radar alternative. For lane violation we take reference from Ramesh Marikhu etl. [1] which begin with background model to segment the foreground from the background in the scene. In this violation region is a solid line region on the road and region of interest specifies the area of the image that will be processed for violations. See  In the current implementation of the system, when using base profile for detecting violations, a violation is considered when the base profile of the blob intersects the solid line considerably. Camera is used for motion processing to detect blobs and to identify the point of a violation, whereas the high resolution image is used to grab a snapshot of the violating vehicle Fig 5(a). Background model is created initially using a single frame and is then updated for every new image frame acquired from the camera Fig 5(b). We use Gaussian mixture model [6] for every pixel in the image. The number of Gaussian components is constantly adapted per pixel [7], [8]. The weight and variance of the components in the mixture model are updated appropriately if a pixel from the new image fits into one of the probability distributions for that pixel in the background model, whereas a new model is added if there is no fit [6], [7].For shadow detection it is performed per pixel for the non-background pixels using the rationale that shadows have similar chromaticity but lower brightness than the background model [9]. The foreground image extracted from the background subtraction module is further processed for shadow pixels using our shadow detection algorithm Fig 5(c).

Fig.5(d): Shadow pixels detected on the foreground image with operator-defined ROI taken into consideration
A combination of normalized cross correlation between the foreground region and the corresponding background pixels, along with RGB vector distances between the foreground pixels and underlying background pixels is used to identify shadow pixels Fig 5(d). The shadow detection module removes shadow regions as shown in Fig 5(e).

Algorithm for lane violation:
Given LB is the arc length of the base profile of a blob, LI is the number of pixels in the base profile intersecting with the violation area, Lr is the width of the violation area at the rth row in the image, where r is the y-coordinate of the center of gravity of the bottom of the blob (refined and trimmed), and Li,i = 1,..,N is the length of N parts of base profile of a blob resulting from stripping out the part that intersects with the violation area, a blob is considered to be involved in illegal solid line crossing if LI > 1 /3L.

2) Red light violation detection :
In red light violationwe take reference from Neha Kumari etl. [2] is based on red light violation.In this section we see uniform thick white line is drawn in each lane before the crossing. This line is commonly known as stopline. Stop-line is usually placed perpendicular to the direction of flow of traffic and is placed in the plane of the road. Frames are sampled at a regular interval of 3 seconds. Images are temporarily stored in the hard disk and a dynamic list is also prepared and stored in the disk. A process is written to automatically read the list of images written in a particular file and to read the images sequentially. A new image taken from the image list is always subtracted from the background image to find whether it is another background image or it is a nonbackground image. In the difference image the gray values of all the pixels are added and then the summation is divided by the number of pixels to get the mean gray value over the image. If the difference image results a high mean gray value (greater than a predefined threshold) then it is considered as a nonbackground image, i.e. there is a possibility of intrusion of an object in the image. Otherwise it is considered as a background image. 3) Over speeding detection: The algorithm used is very simple and effective. The basic formula (Distance=Speed*Time) is used in this case. In this case we place two sensors along with counter starting as vehicle passes by first sensor and stops as soon as vehicle crosses the second sensor. The two sensors are placed at known distance 'd'. The counter is used to calculate time taken by the vehicle to travel a distance 'd'. This algorithm gives the speed of the vehicle by using the basic formula as mentioned above and compare with threshold value and if it crosses the threshold value then violation is detected and a penalty is executed or else no violation is encountered.

Algorithm for lane violation:
In this algorithm two sensors and a software based program is used to detect over speeding as a vehicle crosses first sensor which is placed on road side gets activated along with timer which measures time to travel a vehicle from one sensor to another sensor and this value is given to software in which value of timer is divided by known distance between the sensors and this value is compared with threshold and final conclusion is taken whether violation has occurred or not and further action is taken for penalty.
4) license plate detection: we use idea of reference paper published by Asmaa Elbamby etl. [4].In this part ,system is divided into two part first is candidate regions extraction to avoid redundant calculation of non-license plate region, and the second is the classification to extract the license plates from the candidate regions. The classification module uses a tree of weak LBP based classifier.where LBP classifier is divided into two main plate categories; standard and non-standard.
In first part, color license plate image is converted to gray-scale level, since the focus is only on the pixel gradient. Then a SobeI operator is applied to the image to get the gradient magnitude. Sobel Operator has been used because it has a better performance compared with others and it is rapid and simple.

III. RESULT
The system was executed with the help of a model. Each violation like lane, red light as well as over speeding was tested separately using the same model. There were few false detection which proved that the system is almost 85% accurate. The system precision is calculated as the ratio of true detection and the summation of true as well as false detection. This system can be placed at a distance of 10-15m from the traffic signal to ensure efficient result. The system is able to detected violations caused by 2 wheelers (motorcycle) , 3 wheelers (auto-rikshaw) as well as 4 wheelers (car) with implementation of the penalty with respect to the violation. Violation caused by each of the mentioned vehicle is analyzed separately. When tested on ground level, this system will eliminate the requirement of manpower and resources. The processing speed and accuracy of the system depends on various factors like amount of traffic, resolution of the camera and the flexibility of the software. Here Code Compose Studio (CCS) has been used as an IDE which is widely used in signal processing due to its advanced features. This system can be further optimized in terms of accuracy.

IV. CONCLUSION
This system integrates all the traffic management functions that were already existing but with more accuracy and efficiency. Once this system is deployed, it will prove to be beneficial to the society and will be easily adapted. This will result in a decrease in the traffic violations ultimately reducing the road accidents. This system will charge a penalty for violations and notify the violator for the same through email or SMS. This has a very broad scope in future and can be modified as and when required. V.