| With the development of the society and the universality of the motor vehicle, the transportation problem is increasingly serious. It can't suffice the need of the motor vehicle that we only expand the construction of the highway net. Under this kind of background, it is rational that we combine the vehicle with road. We exert gradually mature and perfect information processing, science of computer,communication etc to resolve the transportation problem, if we do that, we will attain a satisfying result. Thus, it brings a new field of research and application intelligent transportation system (ITS).The most important task of the Electronic Police System, which is an important part of ITS, is detecting whether there are vehicles violating the traffic rules. It can auto-snap the violating cars and warn the drivers of violating the traffic rules. It promotes the drivers to obey regulations, and form good habits gradually on own initiative to reduce the violating of the regulations. Compared with polices, the system has many strong points, such as saving human recourses, efficiency, covering larger areas, no-disturbing to traffic.The electronic police's core part is how to judge the violating vehicles and to carry on snap them. The traditional electronic police system detects the vehicles in the crossroad with physical inductive loops under road. When vehicles are passing when the traffic lighter turns red, it triggers the loops, and starts the camera to grasp the cars. This method has to destroy the road surface when installed, and the ratio of the success is not high; at the same time, the loops will be rolled for a long time, so they are easy to be damaged. Replacing or repairing the loops will break road surface, affects the normal traffic, which will greatly enhance the cost.A novel electronic police system based on video is being applied widely, because of the shortcomings of the traditional system. It develops gradually on the base of image processing technology in the field of traffic detecting recent years. Instead of physical inductive loops, the system uses CCD camera monitoring the traffic and analyzing whether there are violating vehicles. Compared with the traditional system, it makes installing easy, alleviates the difficulties and intensity of the construction. Coming along with other systems of the ITS, it can also monitor the traffic flow magnitude and the speed of vehicles.The electronic police system based on DSP has been developed on the base of image processing platform of DSP and the electric police system using video. It gets the chip TMS320C6711 which has strong processing ability as the core and realizes the detecting of moving vehicles, the condensation of and uploading of images by the technology of virtual loops and distributed idea. The system has very high integration, low power consumption, low cost, good stabilization and real-time. The tasks are distributed to other DSP card, and it's easy for being further expanded and upgraded.The core of the hardware platform of the system is the CPU, TMS320C6711, which is one of TIs productions of C6000 series. According to its functions, it can be divided into three modules, DSP processing module, video decoding module and PCT interface module. The video decoding module converts the analogy video signals into digital signals. The DSP processing module processes the digital signals and stores some useful information. The PCT interface module uploads image and change information with the host machine.The system realizes automated-snapping by video detecting. The core of the soft design of this system is realizing violating vehicles detecting. We detect the area of stop line neighborhood and substitute virtual loop for physical inductive loop. We match the image of consecutive frame and make use of a macro-block in current image to search the classic match in next frame to detect vehicle exceeding stop line. We imitate a physical inductive loop by a series of smaller proportion virtual loop to increase detection precision, avoiding the weakness of the bigger inherent error of physical inductive loop detection .When placing virtual loop, computer system place them automatically, so we raise convenience of usage and avoid influencing transportation.The research of detecting algorithm of violation vehicle includes three parts: the stop line detector, the placing and reduction of virtual loops. The stop line detecting must be done before placing loops, because the loops should be placed beyond the stop line. The stop line is detected by mid-valve filter, edge detection, and Hough transform.The virtual loops are assigned beyond the stop line, consisting of M virtual blocks whose length of side are N. Once cameras and lanes are fixed, there is inversely-proportional relationship between M and N. the valve of N is very important for the accuracy of dececting. It is usually chosen to be between 8 and 16. After the assignment, M is reduced to hance the real-time. Those VLS are retained, which have consistently large motion, lie along the direction of the road and have smaller orientation deviations.The system adopts the match criterion of the smallest mean absolute difference and three-step search arithmetic through direction-biased motion estimation. The algorithm uses VLs set before and calculates mean motion vector of virtual loop, the direction of the road. With this information, after no more than three- step searching, whether there is violating vehcles is decided. The algorithm improves the calculating effiency and the real-time of the system greatly. Further more, it can be adjusted easily and flexibly according to different vehcles and crossings.From the result of experiment, the whole system works well. |