Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: D Thirupathi, Dasari Siddartha Reddy, Koppula Snehith, Nuthanakanti Bhaskar
DOI Link: https://doi.org/10.22214/ijraset.2023.50271
Certificate: View Certificate
As the problem of traffic congestion intensifies, there is a pressing need for the introduction of advanced technology and equipment to improve state-of-the-art of traffic control. The current methods used such as timers or human control are proven to be inferior to alleviate this crisis. In this paper, a system to control the traffic by measuring the real-time vehicle density using canny edge detection with digital image processing is proposed. This imposing traffic control system offers significant improvement in response time, vehicle management, automation, reliability and overall efficiency over the existing systems. The ambulances are detected using YOLO where the minimal waiting time is allotted to the lane. Besides that, the complete technique from image acquisition to edge detection and finally green signal allotment.
I. INTRODUCTION
The major cause leading to traffic jam is the high no of vehicles which was caused by the population and the development of economy Recently a look at of global wide financial institutions has said that the car's common velocity has reduced from 21km to 7km in line with hour with inside the remaining 10years [1]. As more and more vehicles are commissioning in an already congested traffic system, there is an urgent need for a whole new traffic control system using advanced technologies to utilize the already existent infrastructures to its full extent. Since building new roads, flyovers, elevated expressway etc. needs extensive planning, huge capital and lots of time; focus should be directed upon availing existing infrastructures more efficiently and diligently. The traffic lights that are in widespread use today do not do much complex reasoning when deciding when to change the lights for the various road users waiting in different lanes. How long the signal stays green in one lane and red in another is most often determined by simple timing that is calculated when the crossing is designed. Even though today’s methods are robust and work well when the traffic load is distributed evenly across the lanes in the intersection, the systems are very inefficient because they are unable to handle various simple situations that arise throughout the day. Unnecessary waiting time in the signal can be avoided by determining in which side the green signal should be large during traffic. Many methods had been followed over the years such as Manual controlling, as the name says it require man power to control the traffic. Depending on the countries and states the traffic polices are allotted for a required area or city to control traffic. The traffic polices will carry sign board, sign light, particular uniform and whistle to control the traffic. Automatic traffic light is controlled by timers and electrical sensors. In traffic light each phase a constant numerical value loaded in the timer. The lights are automatically getting ON and OFF depending on the timer value changes. While using electrical sensors it will capture the availability of the vehicle and signals on each phase, depending on the signal the lights automatically switch ON and OFF. the traffic light by image processing. The vehicles are detected by the system through images rather than electronic sensors. A camera will be placed alongside the traffic light. It will capture images in sequence [2].
II. LITERATURE SURVEY
A Anjani research on the smart traffic control system availing image processing and using canny edge detection as an instrument for measuring the density of the traffic. the image of CCTV is taken and processed through the canny edge detection and counting the white pixels and calculating the green time using matching probability with reference image [1].
Taqi Tahmid proposes a traffic control system have been presented For this purpose, four sample images of different traffic scenario. Upon completion of edge detection, the similarity between sample images with the reference image has been calculated. Using this similarity, time allocation has been carried out for each individual image in accordance with the time allocation algorithm [3].
S. Lee's research on the system uses a camera-based density measurement method to estimate traffic flow and detect traffic congestion. The density measurement method uses the number of vehicles passing through a certain area over a period of time to estimate traffic flow. The system also uses Canny edge detection to detect the presence of vehicles at intersections and estimate their speed and direction of movement [4].
P. Ramya research on The system consists of three main modules: image processing, fuzzy logic control, and signal control. The image processing module uses Canny edge detection to detect the edges of vehicles in real-time video footage captured by cameras installed at intersections. The fuzzy logic control module then uses the edge density information to determine the appropriate signal timings based on the traffic volume and congestion level [5].
H. Jahanbakhsh research on The Canny edge detection algorithm is used to extract the edges of vehicles in the video input, which are then passed to an ANN to estimate the number of vehicles in each lane and their speeds. This information is then used to dynamically adjust the signal timings to optimize traffic flow [6].
V. Rajkumar proposes a smart traffic control system that uses Canny edge detection and image processing techniques to detect and classify vehicles, estimate traffic flow, and optimize traffic signal timings. The system is designed to improve traffic flow and reduce congestion on urban roads. The proposed system includes a camera-based vehicle detection module that uses Canny edge detection and morphological operations to extract vehicle features and classify them using machine learning algorithms [7].
III. PROPOSED METHODOLOGY
As per the previous researches mentioned in the literature survey there are few drawbacks in the projects:
So, we propose this project to counter the drawbacks of the previous projects, a system that first undergoes image detection process detecting the vehicles such as cars, Buses, Ambulances and allocate separate time when an emergency vehicle detected like ambulances irrespective of the density of traffic is measured by comparing captured image with real time traffic information against the image of the empty road as reference image.
Here, in figure 1, the block diagram for proposed traffic control technique is illustrated Each lane will have a minimum amount of green signal duration allocated. According to the percentage of matching allocated traffic light duration can be controlled. The matching is achieved by comparing the number of white points between two images. Before that the image is detected using YOLO technique. The entire image processing before edge detection i.e., image acquisition, RGB to gray conversion, Image Enhancement and canny edge detection operation and white point count are depicted. Canny edge detector operator is selected because of its greater overall performance. Percentage matching for different sample images and traffic time allocation.
A. You Only Look Once (YOLO) Image Detection
YOLO algorithm works using the following three techniques Residual blocks, Bounding box regression, Intersection Over Union (IOU). First, the image is divided into grid cells. Each grid cell forecasts B bounding boxes and provides their confidence scores. The cells predict the class probabilities to establish the class of each object. For example, we can notice at least three classes of objects: a car, a dog, and a bicycle. All the predictions are made simultaneously using a single convolutional neural network. Intersection over union ensures that the predicted bounding boxes are equal to the real boxes of the objects. This phenomenon eliminates unnecessary bounding boxes that do not meet the characteristics of the objects (like height and width). The final detection will consist of unique bounding boxes that fit the objects perfectly. For example, the car is surrounded by the pink bounding box while the bicycle is surrounded by the yellow bounding box. The dog has been highlighted using the blue bounding box.
B. Image pre-processing Canny Edge Detection
Gray scaling the input image is typically done as a pre-processing step before applying the Canny edge detection algorithm. This is because the Canny algorithm works on grayscale images, which are 2D arrays of intensity values ranging from 0 (black) to 255 (white) for each pixel in the image.
The Canny edge detection technique is an image processing algorithm used to detect edges in digital images. The Canny edge detection algorithm involves the following steps:
The output of the Canny edge detection algorithm is a binary image where the edges are represented by white pixels and the rest of the image is black.
IV. IMPLEMENTATION
The block diagram of the project was discussed in previous chapter. The algorithm behind the block diagram consists of following steps.
The free dataset of traffic images at regular interval of time should be uploaded from the traffic signal and the reference image is upload with a heavy traffic at that specific location for the comparison
2. Step2) Detect Image (As an extension)
The input image that is uploaded undergoes preprocess it by resizing it to the input size required and normalizing the pixel values of image.
a. The YOLO algorithm is applied to the pre-processed image into a grid of cells.
b. The bounding boxes and class probabilities are predicted.
c. YOLO outputs the coordinates of the bounding boxes for each detected object, along with a confidence score indicating the likelihood that the object is present. For vehicle detection, we can filter the bounding boxes to only select those that correspond to vehicles which are Cars, Buses, Ambulances.
d. YOLO can detect multiple bounding boxes for a single vehicle, non-maximum suppression is performed to eliminate duplicate detections. This involves comparing the confidence scores of overlapping bounding boxes and selecting the one with the highest score.
e. The final step is to output the image with the selected bounding boxes drawn around the detected vehicles.
3. Step3) Image Pre-processing
Gray = 0.2989 * r + 0.5870 * g + 0.1140 * b
K(x,y) = (1 / (2 * pi * sigma^2)) * exp(-(x^2 + y^2) / (2 * sigma^2))
4. Step4) White Pixel Count
Since reference image is basically an image of the heavy traffic road, the more the similarity between sample image and reference image, the more vehicles are present on the road. As irrelevant edges detected in sample images such as edges of footpaths, islands etc. are also existent in reference image, their effects are nullified when comparing them with reference image. The percentage of matching is calculated using the following formula,
avg = (sample_pixels/refrence_pixels) *100
5. Step5) Calculate green Signal Time Allocation
Similarity in Percentage |
Allocated Green Signal Time |
>=90% |
60 seconds |
85%-89% |
50 seconds |
75%-84% |
40 seconds |
50%-74% |
30 seconds |
<50% |
20 seconds |
|
Table 1 Time Allocated
As in Table 1, Time allocated to green signal is governed by the percentage of matching of consecutive lanes. The proposed time allocation is based on assumption.
VI. ACKNOWLEDGEMENT
We thank CMR Technical Campus for supporting this paper titled “Density Based Smart Traffic Control System Using Canny Edge Detection”, which provided good facilities and support to accomplish our work. Sincerely thank our Chairman, Director, Deans, Head of the Department, Department of Computer Science and Engineering, Guide and Teaching and Non- Teaching faculty members for giving valuable suggestions and guidance in every aspect of our work
In this paper, a smart traffic control system availing image processing as an instrument for measuring density has been proposed. Besides explaining the limitations of the current near-obsolete traffic control system, the advantages of the proposed traffic control system have been done. For this purpose, four sample images of different traffic scenarios have been attained. Upon completion of edge detection, the similarity between the sample images with the reference image has been calculated. The ambulance when detected gives less waiting time. Using this similarity, time allocation has been carried out for each individual image in accordance with the time allocation algorithm. In addition, similarity in percentage and time allocation has been illustrated for each of the four sample images using Python programming language.
[1] A Anjani, \"Density Based Smart Traffic Control Using Canny Edge Detection Algorithm\", JOURNAL OF ALGEBRAIC STATISTICS Volume 13, No. 3, 2022 [2] A.J. Shakadwipi, \"Smart Traffic Control System by Using Image Processing\", IOSR Journal of Computer Engineering Volume 22, Issue 6, 2020 [3] Taqi Tahmid, \"Density Based Smart Traffic Control System Using Canny Edge Detection Algorithm for Congregating Traffic Information\", EICT, 2017 [4] S. Lee, \"Density Based Smart Traffic Control System Using Canny Edge Detection Algorithm\", 2021 [5] P. Ramya, \"Smart Traffic Control System Based on Canny Edge Detection and Fuzzy Logic\",2017 [6] H. Jahanbakhsh, \"Real-Time Traffic Control Using Canny Edge Detection and Artificial Neural Networks\", 2017 [7] V. Rajkumar, \"Smart Traffic Control System Based on Canny Edge Detection and Image Processing\", 2019.
Copyright © 2023 D Thirupathi, Dasari Siddartha Reddy, Koppula Snehith, Nuthanakanti Bhaskar. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET50271
Publish Date : 2023-04-10
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here