INTELLIGENT SYSTEM FOR IMPROVED SAFETY OF PEDESTRIAN TRAFFIC LIGHTS

The high concentration of vehicles and pedestrians at traffic lights makes them a common place for road accidents to occur. The main reason for them is the behavior of vehicle drivers and pedestrians, who often violate the traffic law because of incorrect judgments. This study investigates a special type of traffic lights, which are located on places without roads intersection. In the present study, a concept for improving the safety of such traffic lights is suggested. The method suggests a novel algorithm for the detection of pedestrians, based on image processing and a background pattern. The concept of the detection system makes it applicable in different climatic conditions, such as rain, snow, dust, etc., and offers many advantages over the current situation in Bulgaria. The intelligent system only detects pedestrians in the waiting zones, in order to optimize the traffic problems, such as traffic delays, use by disabled people, protection against troublesome users, etc.


INTRODUCTION
The traffic control and road safety are a major issue for contemporary society. The United Nations declared the period 2011-2020 the "Decade of Action for Road Safety" [1]. In the White paper from 2011, the European Commission suggested a new approach towards a "zero-vision" on road safety, in order to eliminate the fatalities and severe injuries occurring on the European Union roads. With decision № 946/22.12.2011, the Ministry Council of Bulgaria adopted the National strategy for improving road safety in Bulgaria for the period 2011-2020. There it was stated that in order to improve the road safety in urban areas, it is necessary to ensure a normal road traffic flow, which could be achieved by ensuring safe behavior of the traffic users [2].
According to the National statistical institute of Bulgaria, the road accidents with pedestrians have a significant share in the total number of accidents -approximately 26.81% for 2017 (Table 1) [6]. On comparing with the average share, it can be seen that for the last 8 years, there is a reduction of only about 2%. The road accidents could be caused either by the pedestrians or by the vehicle drivers, but more often they are caused by the driver. For example, in 2016, due to the reason "not respecting the advantage of pedestrian," a total of 1042 road accidents occurred, which led to 41 casualties and 1043 injuries [8].
The most common reasons that lead to accidents with pedestrians are "pedestrian sudden entry of the road," "road crossing," and "traffic light crossing," whose shares are 48%, 18%, and 14% respectively. While the first situation is caused by irresponsible human behavior, the other two situations could be avoided with the proper signalization and control of the system. In Bulgaria, road transport with light signals has been regulated by ordinance № 17  The development of contemporary technologies allows implementing intelligent infrastructural decisions, aiming to reduce the conflict points between the different traffic users. The transport flows in an urban area are of many types, and sometimes the visual informational flow is very comprehensive, which leads to the fatigue and distraction of the traffic users [3]. Facility maintenance is also important for ensuring a high level of safety of pedestrians and drivers. The different types of pedestrian crossing facilities have been thoroughly examined in [9]. Nevertheless, the correct facility is not always possible or not available that leads to potential problems for pedestrians. Previous studies have shown that the number of traffic violations depends on the organization of the traffic. In [16], results showing the dependency between the cycle length/color distribution and the number of violations for a particular crossroad in Enna, Italy, were presented. Similar results were presented in [17] for a typical 4-arm signaled intersection, showing that the number of violations could be reduced by dynamically controlling the length of the traffic light cycle. Many studies used modern technologies and algorithms to solve traffic-control-related problems. In [10], an intelligent integrated control algorithm for traffic control has been suggested. In [11], an intelligent traffic control system based on multiple sensors was presented. It identifies the vehicles and sends real-time information to the National traffic management system, using the ZigBee wireless network protocol, and allows the remote monitoring of the traffic. Similarly, in [17], a technique was presented for the dynamic processing of green times in a traffic light, based on sensor information transmitted over a wireless network. Signal timing optimization with real-time information has been used in [4], and in [14], the traffic delays are optimized with a mathematical model. Similar problems are solved in [15] based on the macroscopic optimization of the system.
In [12], the authors suggested using the hybrid lighting of traffic lights in order to grab the drivers' attention and reduce the risks of accidents, and in [13], a fuzzy-based approach has been used to manage the traffic lights on pedestrian crossings.
This study is aimed at the optimization of the traffic light systems on locations without roads intersection, where pedestrians have to press a button (Fig. 1) to cross the street. Different problems follow such implementation. For example, the older pedestrians in Bulgaria prefer to wait until there is no car instead of pressing the button. Furthermore, children play with the buttons and press them before and after they cross, which leads to traffic delays and influences the behavior of vehicle drivers. Such an approach is also a problem for disabled pedestrians, like blind people and people in wheelchairs, who would have difficulties pressing the button.
The goal of this study is to propose a new methodology for improved safety on traffic lights, located at places without roads intersection, with the use of technical measures. For this reason, a novel concept for pedestrian detection and organization of the traffic is presented.
Intelligent system for improved safety of pedestrian traffic lights 37.

Current situation
The objects of the investigation of this study are traffic lights, which are located on places without a crossroad (Fig. 2). In the present study, we defined the following types of traffic lights for pedestrians: • Traffic lights of type 1 -the traffic light is always green for the vehicles, unless there is a pedestrian willing to cross the street. They commonly alert the system about their presence with the press of a button. • Traffic lights of type 2 -they are changing the colors automatically according to a predefined program; therefore, they do not have buttons for pedestrians to press. When everyone respects Traffic law, traffic lights of type 1 work correctly; however, that is not always the case in Bulgaria. Very often, instead of pressing the button, pedestrians cross the street while the color is red if they believe no car is coming or if it is at a significant distance. However, if they have misjudged the situation, the light color for vehicles would still be green and they might not stop, which could have severe consequences for the safety of the road users. In Fig. 3, a traffic light system without intersection is shown; therefore, the lights are constantly green for the vehicles, unless 38 B. Evstatiev, T. Balbuzanov, I. Beloev, V. Pencheva a pedestrian presses one of the buttons. In a particular example, a pedestrian prefers to cross the street on a red light, without pressing the button.
On the other hand, when traffic lights of type 2 are used, there might be unnecessary transport delays. An example of such traffic lights is presented in Fig. 4, where the system switches automatically between green and red colors, based on a time schedule. It is operating only in the mornings and in the evenings, when there are many pedestrians, and in the other parts of the day, it is turned off. The particular example shows that the vehicles are waiting for the green color even though there are no pedestrians crossing. Obviously, having automated traffic lights on places without roads intersection leads to unnecessary traffic delays; therefore, traffic lights of type 1 should be preferred. That is why in the present study, we want to suggest a new approach for traffic lights of type 1, where the system automatically detects the presence of pedestrians, and they do not have to press a button.

Method for the detection of waiting pedestrians
A simplified schematic of the suggested method is presented in Fig. 5. The idea is that in order to recognize the presence of pedestrians, they should be in the waiting zones. In addition, they should be well enclosed and marked, so that pedestrians could not bypass them, which is important for the Bulgarian traffic users.
When choosing the sensors to be used for the recognition of waiting pedestrians, certain characteristics of the climate in Bulgaria should be considered. It is characterized with hot summer with a lot of dust and cold winter, often accompanied by heavy snowfalls. In other seasons, heavy rains are common. All these natural phenomena could make it difficult for the system to function. For this reason, no matter what sensors are used, they should not be installed on the ground, which eliminates the possibility to use weight sensors. In order to avoid incorrect detections, no sensors for the detection of pedestrians entering/leaving the waiting should be used, as they cannot determine the direction of movement (in or out). Other requirements toward the system are as follows: • The system should be able to tell at any time if there is a pedestrian in the waiting zone; • The fence of the waiting zone shouldn't be too high, as it could lead to potential accidents when the vehicle drivers cannot see the waiting pedestrians; • The sensors should not detect pedestrians outside the waiting zone; • Sensors should not be influenced by small animals, such as dogs, cats, birds, etc. Based on the above requirements, a method is suggested, as described below. On one of the sides of the waiting zones, a camera is installed at the level of the fence, and on the opposite fence, a background pattern is drawn for recognition by the system (Fig. 6).
When there will be no pedestrians, the camera will see the background pattern (Fig. 7a), and when one or more pedestrians will be in the waiting zone, some of the details of the pattern will not be identified (Fig. 7b). The pattern as well as its position should be carefully chosen in order to take care of potential problems, incorrect detection due to the cloths of the pedestrians, incorrect detection due to wild animals, etc.
In order to make sure the system is not affected by objects outside the waiting zone, a hardware or software filter can be applied, as shown in Fig. 8.
The block diagram of the algorithm for the detection of pedestrians in the waiting zone is presented in Fig. 9. In block 1 of the diagram, the main variables of the system are initialized: • The initial "background pattern" is set when no pedestrians are in the waiting zone; • The initial state of the system is set to "no pedestrians." After that, in blocks 2, 3 and 4, the next photo is taken, and then a filter is applied and the current pattern is obtained. If it is similar to the "background pattern" as in block 6, the system state is set to "no pedestrians" (if required) and in block 7, the "background pattern" is updated to the current pattern. The last action will guarantee the system's sustainability to slow changes in the environment, such as day changing to night, changing meteorological conditions, such as the weather changing from sunny to cloudy, gradual accumulation of snowfall, etc.
If the condition from block 5 is not met (the current patterns significantly differ from the "background pattern"), then in block 8, the current state of the system is verified. If it is "no pedestrians", its value is changed to "waiting pedestrians" in block 9. Otherwise, in block 10, it is verified if the criterion for starting a pedestrian crossing routine is met. If so, in block 11, the traffic light is changed to green for pedestrians, and in block 12, the system waits until the crossing routine completes and they are back to red.
Intelligent system for improved safety of pedestrian traffic lights 41.
The criterion, which will be used to decide whether a pedestrian crossing routing should begin, is individual for each traffic lights and depends on its location, time of the day, traffic, etc. It could be based on one or more of the following data: • Time passed since the previous crossing procedure; • Time passed since a pedestrian was detected in the waiting zone; • Readings from another sensor, responsible for the detection of incoming vehicles. Fig. 9. Algorithm of the method for the detection of pedestrians in the waiting zone

CONCLUSION
In the present study, for improved safety at traffic lights, a new method to regulate the crossing of pedestrians on places without road intersections has been suggested. In order to avoid the traffic delays caused by automatically regulated traffic lights and reduce the risks for the traffic users when buttons are used, we propose a system that can recognize the presence of pedestrians in the waiting zone. The recognition method is based on a background pattern, which is observed by a camera. When pedestrians enter the waiting zone, the pattern is changed, as they stay between the camera and the background; therefore, the system is informed. The study also presents an algorithm of the system that models and controls the traffic light system.
The suggested approach will increase the safety on such traffic lights and will optimize the traffic delays. It will also be useful for disabled people (blind, etc.), who are not able to press a button by themselves.
More research is required in the future, in order to obtain the optimal background pattern. The recognition detection should not be influenced by the color of the clothes of the pedestrians, yet if that happens, there should be no major consequences. Future research should also define the vertical position of the pattern in order to avoid the detection of wild and stray animals.