Automatic Detection of Red Light Running Using Vehicular Cameras
Automatic Detection of Red Light Running Using Vehicular Cameras
ISSN No:-2456-2165
Abstract:- The red traffic light running is a very common system with a on-board camera on the vehicle, which could
areas with greater pedestrian flow, the type and amount of accomplish. In places where there is no fixed radars or
traffic violation. Nowadays, vehicles running red traffic officers in via. In addition, a same camera could be used for
lights are accidents, among others. The rule, in General, is other purposes (in some cities, there are cameras on buses, for
the same applied detected by sensors fixed on the streets. example). As the characteristics of the traffic and routes differ
However the very small along the main routes. Percentage from a route to another, in addition to the difficulty of
of all traffic lights are equipped with such sensors. Is this adapting the signaling on an entire city, various sensors
reason, this work proposes the red light runner detection consisting of cameras can perform the task to assist the
to be performed by the system that consists of the camera interpretation of signaling and register a possible bad conduct
and the computer embedded in the vehicle. An algorithm before a red light. Several radars and electronic sensors are
is also proposed to process the recorded videos and the installed in roads and strategic locations of major cities such
prototype was implemented. The prototype's goal is to as Belo Horizon, based on technical studies that detect
monitor work vehicles without any intervention in driving, intersections with traffic lights in the city makes the project
acting only in as an educational tool. Tests are performed unfeasible at first, which is why the intersections candidates
with video recorded in the streets of Belo Horizonte are selected based on statistical data, to receive advance
during the day and with the video benchmark using the registration equipment. With an advance detection system of
implemented prototype. The results are compared based red light embedded in the vehicle, the driver could have better
on the execution time and accuracy. The video processing conduct and respect signs regardless of the existence of
took less one tenth of the video's duration and the military officers or of fixed speed cameras on the road simply
accuracy was about 95.8%. by knowing you're being monitored. With this, there could be
a reduction in the statistics and, mainly, of accidents. There
Keywords:- Traffic light Detection, Red light running, are several works related to detection and traffic sign
monitoring driver, Autonomous vehicles, Video processing. recognition in General replacing the conventional sensors for
processing images. Two common ways to start the detection
I. INTRODUCTION and recognition of traffic signs through images are based on
color segmentation and segmentation based on edges.
With the increasing amount of vehicles. The most Techniques that use colors tend to have better control over the
frequent violations logged in first half of 2013 in Belo lighting. An example using the HSV color space is described
Horizonte were advancing red light and parking on site. The by Fleyeh. Several papers have been published using Vision
amount of infractions by advancement of red light suffered a Computer to control or monitor the situations traffic. The
great reduction of 80% in the first half of 2014 in over the works of Cosmo, Salles and Ciarelli perform pedestrian
same period of the previous year, from 123,878 to 25,470. detection using a vector Machine Support (SVM) to train and
However, this reduction in registrations not necessarily mean test Windows scanned the image of being a robust classifier in
that the infractions not fined fell in the same proportion. pedestrian detection. Also use Histogram of oriented gradients
Drivers end up doing a mapping the traffic lights that have (HOG), proposed by Dalal and Triggs, the high performance
advance registration and consequently, know which disrespect of the descriptor. The hit detection is around 63.8%. Fairfield
without being penalized. Currently, the city has about 122 jobs and Urmson and Levinson et al dealing with the
equipment advance registration of red light. Devices feature detection and recognition of traffic lights with the aid of
great precision, sometimes coupled with human aid, as in. geospatial queries to detect intersections on the road, through
However, the cost produced each year, the automotive the Google Maps API, for discard distant images of crosses.
industry has the installation of such equipment on all invested However, this rule does not apply in Brazil, where, in many
in more intelligent transport systems with the objective of places, is common meet traffic lights on a simple crossing of
assisting the driver to make decisions and thinking timely pedestrians. In addition, the system would become highly
manner in situations of risk, helping to save lives and dependent on the connection to the GPS. Images are labeled
resources. A system that gives the vehicle the ability to to from sources of light red, yellow or green. The away from
understand and interpret what's in your back can in the short the traffic light is estimated on the basis of calculations
term improve the security of those drivers directly and the involving the actual size of the objects. Shenetal propose a
Middle term enable the development of autonomous vehicles. modeling of hue and saturation (HSI space) based on 2D
The advance of red light is one of the infractions common and Gaussian distributions, where the parameters are obtained
is considered a serious infraction. However, neither all the from candidates labeled manualment. In addition, it is
lights are monitored by advance registration. Thus, there is a proposed a method to eliminate false candidates based on
need to monitor the vehicles in traffic lights without advance information in post-processing of the image. The end result is
registration. A possibility, explored in this work, is to use a a combination of information from the post processing and a
IJISRT18MY16 www.ijisrt.com 6
Volume 3, Issue 5, May – 2018 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
historical base. The results of this approach, in though, come called green, yellow and red. The RGB image is converted to
to present an accuracy exceeding 99% for some videos. The HSV space for ease in if separate color and lighting
scope of these works is limited to detection of traffic lights. information, working best in shadows and in the evening, and
On the other hand, feed detection methods of signal Red are search for elements Reds. As there is no problem in passing
proposed by Yung and Lai and Luo, Huang and Qin with the through the traffic lights yellow or green, these colors were
camera located at a fixed point of the via where are visible the excluded from the segmentation. The next stage, detection and
semaphore, the retention range and the cars passing by. The recognition, checks whether a region of interest contains a
method of Yung and Lai identifies the nearest traffic light (the traffic light. Used to find red circles. As the lights the traffic
higher the image) and uses the processing. The detection is lights are round, candidates have no way about rounded are
done based on the color: white for retention range and red, discarded. As lights of vehicles also are red and usually have
yellow and green for the traffic light. The test results achieved the form approximately round, only the upper region of the
100% hit in the tests. Luo, Huang and Qin perform the tests image, about 1/3, is considered and the other candidates are
on a intersection with free right, i.e. where the light is not discarded regardless of shape. In addition, the semaphore is
valid for convergence to the right (only for vehicles that important only when the vehicle is next him, to confirm or not
converge to the left or move on). The results feature slightly the advance depending on the color of traffic lights at the
lower precision, around of the 90% for unmetered traffic time. Going on more than one possible light, as close to the
lights, failure to signage still exists and remains unpunished. vehicle is chosen based on time within the image (the higher,
Aiming at the reduction of advances of traffic lights at closer to the vehicle). The light is only taken for granted if
intersections do not monitored, this paper proposes a found in two consecutive frames to reduce the impact of noise
methodology for detection of advancement with the on-board is not eliminated in the preprocessing. As the traffic light has
camera on the vehicle, uniting signal detection techniques and a standard way that is relatively simple with few relevant
advance detection using computer Vision. characteristics, for simplicity, any technique of classification
was used. Finally, if the previous steps a semaphore was
II. FEED DETECTION found, the trace phase checks the vicinity the traffic light until
he leaves the field of view of the camera using Cam shift. If
Advance detection systems red light usually use he gets out of the picture at the top of the image, and while
fixed cameras at strategic points via, becoming part of the red, confirmed the advance. Otherwise, the light may have
traffic control system at that location. The proposal assumes been green or it could just be a temporary occlusion. While
that the camera It is shipped as part of the vehicle, turning the the red light is in the camera's field of view, the new position
system in a vehicle and monitoring driver. The purpose is to of the semaphore is used in the following tables for tracking
monitor work vehicles, as buses, trucks and taxis, since the until the light disappears. This prevents any image have to be
system is not interesting for RVs. The methodology addresses processed again. A small set of images extracted from a video
from capture images from your camera shipped to the with approximately 3 minutes, recorded in Belo Horizon, was
detection, in real time, of the progress of the traffic light. used for calibration of parameters.
There is concern to display any alert or generate any penalty
for the driver, either there is no interference on driving. First, III. EXPERIMENT
the images are captured by a camera serve and transferred to a
laptop present inside of the vehicle. The camera should be To check the operation of the proposed technique in
facing forward. Fig. 1 contains an example of image captured this work, we used two different videos. The videos were
by the camera run. Then, in a second stage, the images are stored submitted for implementation of the algorithm is
preprocessed to reduce any noises from the procurement explained in the previous section. A video for testing has been
process. The image passes by, respectively, the average filter, made available on the site. The video refresh rate of 25 fps
erosion and dilation. (frames per second-frames per second) at VGA resolution
(640 x 480 pixels), 8 bits per pixel, color, and frame-by-frame
was separated in JPEG format images (acronym for Joint
Photographic Experts Group), how it is distributed. The
video has a total of 11,179 frames. The refresh rate has been
reduced to 5 and 2 frames per second just experimental
character. The vehicle carrying the camera passes over the
video 8 red lights, but does not advance any. The images were
obtained during a commute of about 8 minutes on the streets
of Paris, in France. This is a generic video for benchmark in
video processing techniques, so the camera was placed
specifically to view traffic lights suspended above the
vehicles. Another video was recorded with a camera
relaying in Minas Gera is, in the streets of Belo Horizonte
Fig 1:- Vehicle camera view and Contagem When the vehicle is moving at approximately
In the third stage, targeting, the system determines 50 km/h (disregarding the reductions under a traffic
which regions of the image are relevant to proceed with the light). The video was recorded in 25 frames per second in
processing. Segmentation is based on tom the colors of the resolution of 640 x 480 pixels, 16 bits per pixel. The video
lights of the traffic light, traffic lights have shades the so- lasts approximately 24 minutes recorded during the day,
totaling paintings about 43,200. The same reduction on
IJISRT18MY16 www.ijisrt.com 7
Volume 3, Issue 5, May – 2018 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
taxa was made to frame 5 and 2 frames per second, and Second, the time required was 247 seconds and no false
each table stored as an image in JPEG format to a fair positive. Reducing the refresh rate to 2 frames/second, the
comparison with the French video. However, the tests with time dropped to 98 seconds still no false positives. Fig. 2
this video included the original format, with 25 fps, for real- contains a semaphore detected and processed correctly as
time validation. don't advance.
IJISRT18MY16 www.ijisrt.com 8
Volume 3, Issue 5, May – 2018 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
lights, but the amount of errors was still better than the 15 reduces the detection rate of advancement. A summary the
advances with 5 fps (8 false positives). This is due to mainly results with tests for 5 fps is presented in the table (I) by the
to the positioning of the camera, which is virtually horizontal. fact 5 fps to present the best ofcompromise between
With that, several lights and elements Red, as the lights of detection and error rate. Was taken in account the General
other vehicles, for example, are confused with traffic lights test, including both the video with the camera static as the
because they are at the top of the image, even if they are not video of the simulation. Similarly, table II contains the result
really suspended over the road. In Fig. 5 you can view a case of the including processing all the lights on the
of erroneous processing with the vehicle considerably away benchmark French. Were considered as advance all the lights
from the traffic light due to bad placement of the camera. coming out through the top of the image as in Figure 5,
However, in a scenario in which the camera was properly which is the main feature of progress evaluated by the
positioned, the progress exemplified would be considered a algorithm. In other words, whenever the traffic light Red out
success, since the red light came out of the field of vision the of the field of vision of the camera through the top, a
camera at the top of the image breakthrough must be considered. Otherwise, we will have a
false negative.
real progress Not Total
Advance
detected 7 8 15
Forward
Forward 1 9 10
not
detected
Fig 5:- Traffic light coming out of the camera's field of view, Total 8 17
a feature advance. Table 2. Amounts Of Errors And Successes In Advancing
Detection To 5 Fps For Video Benchmark
Despite the high number of false positives, there have
been cases When the detection occurred correctly and was not Only for a possible performance test execution
computed advance. Fig. 6 shows a case in which there was in real time, a test was done with the video from Belo
correct processing in French video. As the time for the video Horizonte in 1024 x 768 resolution with the same rate of 5
of Belo Horizonte with 25 fps was higher than the duration, fps. The time processing, however, was 113 seconds for
making real-time execution in this configuration, the video each minute of recorded video. The increased
benchmark tests of Paris were made only with 5 and 2 fps. time disproportionately greater than the increase in
resolution makes the decisions more time
processing high. However, Considering the VGA resolution
proposal and the average execution time 10.3 seconds per
minute recorded with 5 fps, you can deduce that if you can
increase the frame rate up to 20 fps and, with it, the
speed maximum of the vehicle could reach close to 200
km/h without large impacts on detection. This refresh
rate (20 fps) is under 25 fps to knowingly spend longer than
the duration of the video.
Fig 6:- Example of correct processing without advance light
Real
progress Not Total
Advance
detected Forward 15 0 15
Forward not 1 8 9
detected
Total 16 8
Table 1. Amounts of Errors and Successes Advancing
Detection To 5 Fps
Configuration with better performance for the
video Belo Horizonte was with 5 fps. The video with the
frame rate original per second (25 fps) would render
unfeasible the real time processing and video with 2 fps Fig 7:- Software show programme window
IJISRT18MY16 www.ijisrt.com 9
Volume 3, Issue 5, May – 2018 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
We are using the open CV software i.e red light Then with the help of vehicle number to monitor the
violation last stage then click on the Run option then select owner and there address .fine parsal send back to the address
the option run module by running the programme after of owner and there mention last date of fine otherwise RTO
execution of programme open the capturing window i.e take a minor decision of there liecense or warning letter or
camera window. any other .
The red light violation the vehicle cross the zebra In Belo Horizonte, less than 1% of traffic lights has
crossing the sensor sense the obstacle at the same time detect equipment for detection of advance of red light. With the
the number plate and capture the video or image large number of infractions by advancing all semaphore year,
needed a new way to identify these advances in non-suitable
equipment lights for the record. For this reason, this paper
proposed that the monitoring is done from inside work
vehicles, no longer on the intersections of the road. The
proposal part of the use embedded cameras and processing
techniques image. The images are recorded with vehicular
and camera videos processed later. The precision has been
satisfactory for videos recorded during the day since the
camera was well placed, in addition to the runtime have been
greatly reduced, leading less than 250 seconds to render 24
minutes video at 5 fps with accuracy exceeding 95.8%. The
implementation requires adjustments and a better definition
of parameters for dealing with better lighting and other
elements in the image that can confuse the algorithm. The
runtime is less than the length of the videos for processing
with reduced frame rate/second, opening possibility for real-
time processing. For the benchmark, there have been many
false positives by placing the camera. With that, the use of a
generic camera (used for other purposes) has become a
Fig 8:- Detection of number plate problem, since the light comes out of the field of view with
the vehicle still very far from the traffic light. Even with
After Detecting the number plate LCD display show many false positives, the hit rate was 64% of traffic lights
the vehicle detected the vehicle number plate and sending the
rendered correctly. Due to the impossibility of moving lights
message in the vehicle owners mobile and indicating the legally and capture videos of tests with these real advances,
message in owner name, number plate and fine.at the same testing were conducted with advance simulation based on
time that message send to the control room
movement of the camera in front of the red light. The tests
had better results for the video from 5 fps, but still haven't
detected all simulated, advances have other Red elements
rose to the top the image and mistook the algorithm. The hit
rate on simulation reached 95.8%, even with the other
problem lights and Red items they put in place of the traffic
lights. This work brings a new perspective as a contribution
of advance detection of light with the camera on board,
regardless of whether the traffic light is monitored by other
advance registration forms. Related jobs found dealing with a
Fig 9:- LCD display show the vehicle detected
IJISRT18MY16 www.ijisrt.com 10
Volume 3, Issue 5, May – 2018 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
fixed point of the route. Although less accurate than a fixed Processing. International Journal of Computer Science
feed detector on the road, yet the solution appears to be Issues , vol. 9, no. 1, 2012.
feasible for the flexibility of record of advancement in any
unmonitored semaphore. There are several possibilities of
technical improvement proposal. Based on the results, shows
up viable processing in real time with a computer embedded
in the vehicle connected directly to the camera. It is
recommended, in this case, assessing your performance in a
low-power system, as a minicomputer based on Intel Mini-
ITX or Raspberry Pi, for example, since this work has
adopted a Core i3 processor computer. Another proposal
includes tests with recorded videos with a better camera
quality that reduces the distortion of colors, to compare the
aspect of accuracy. There is also a need to deal with videos
recorded at night and with traffic lights dinning arrows bright
which restricts the movement only to certain vehicles,
because this type of approach was Treaty within the scope of
this work. Another possibility is the parallel processing,
which would make better use of the features of a low-power
system. Although the benchmark video used in testing not be
adequate for the placement of the camera, tests with other
benchmark videos should be conducted. Tests with registry
systems of similar progress can be made by evaluating, in
addition to accuracy and processing time, mobility, the cost
of implementation and deployment.
VI. ACKNOWLEDGEMENT
Assistant and advice from my research teacher are
greatly acknowledge for providing guidance and cooperation
in this research.
REFERENCES
IJISRT18MY16 www.ijisrt.com 11