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.