Design of the License Plate Recognition Platform Based on the DSP Embedded System

The license plate recognition system (LPRS) is a very important development direction of the intelligent transportation systems (ITS). With the development of the society and the enhancement of human living level, the amount of vehicle increases continually and the traffic status is deteriorating gradually, which brings large pressures for the society and the environment. The increasingly crowded city traffic needs more advanced and effective traffic management and control. It has been an important research direction to utilize the license plate recognition technology to enhance the management level and the traffic efficiency, and implement safe intelligent transportation management. In this article, the design, implementation and optimization of the DSP license plate recognition system which takes the TMS320C6201 of TI Corporation as the core chip were introduced. In this system, the video frequency (VF) decoding chip first translates the analog TV image signals obtained from CCD into the digital image signals which are inputted into DSP through FIFO buffer by the control of CPLD, and then aiming at the image, DSP performs the license plate positioning, the license plate character segmentation, the license plate character identification, the optical aberrance emendation, the nonlinear emendation of speed error and other algorithm operations to obtain the result of the license plate identification.

In recent years, the license plate recognition system in China has entered into the stage of application, but because of the influences of many numerous factors such as the particularity and the technology in Chinese license plate, the using effect of the license plate automatic recognition system is not satisfactory, so the license plate recognition technology needs to be further enhanced.There are few products which can ensure that the recognition rate exceeds 95% and the recognition time is less than 0.5s.On the other hand, most current products are based on the application program of PC, so there costs are generally high.
Table 1 shows some data of the license plate recognition system used in China at present.ITS is a kind of modernized traffic management system which can perform real-time monitoring to the road traffic flow information, supervise and perfect the traffic status in time, implement various real-time traffic controls rapidly and duly according to the dynamic change of the traffic flow, lighten the crowded degree of the road, reduce the running delay of the traffic vehicles and the probability of traffic accident, ensure the safety and high efficiency of the traffic, enhance the using rate and the security of the system resources, and reasonably utilize relative traffic establishments.With the development of the traffic industry, ITS is gradually emphasized by various countries and governments, and it has been widely applied in the collection and statistics of traffic information, the communication among vehicles, the management of park and the non-parking charge.The roads and the parks gradually develop to the directions such as informationization, intelligentization and self-service management, which requires higher intelligent degree for the instruments, especially for the charge roads parks, the self-service management should be extended.So it is very important to establish exact license plate recognition for confirming the vehicle identity and establishing corresponding database management system.In recent years, many countries begin to try out the non-parking charge system and the park self-service management system which mainly adopt the wireless communication measure, but for so many vehicles which have not installed the communication instruments, the costs are very high, in addition, the phenomena that the wireless cards don't accord with the vehicle information often happen.To solve these problems, some countries used the vidicon to record the images and adopted the manual observation to recognize the vehicles, which made the self-service management system to need large numbers of manual assistant works instead.To enhance the work efficiency and recognize the vehicle information real time, the license plate recognition technology becomes an important research domain in ITS, and its tasks are to analyze and process the incepted vehicle images to automatically recognize the license plate of the auto.With the development and perfection of a series of relative technology such as the PC technology, the communication technology and the network technology, the license plate recognition system will certainly be turned from the research stage to the application and extension stage, which is very meaningful to enhance the management level and the automatization degree of the traffic system.
As the core function of the ITS, the license plate recognition system has gradually applied in the real living as its practicability is enhanced.Some license plate recognition systems occurred in the market have good recognition effect in appointed conditions and environment, but once the conditions and environment change, for example, in the environment such as fog day, rain day and night, the recognition rates of these systems will decrease rapidly even the recognitions will be rejected, and the currency of the systems will become very bad.Therefore, it is very necessary and important to find a license plate recognition method which can adapt to most environments and is more universal.
In a word, the license plate recognition technology is the necessary technology in future traffic domain, and by the drive of strongly social demands, the relative researches about the license plate recognition will emerge quickly.Based on this background, this task is proposed in the article, and the license plate recognition system studied in the task is the core and key technology in ITS, and the research possesses quite largely theoretical and practical meanings.

Structure and function of the license plate recognition system
In the image processing system, the TMS320C6201 DSP in TIC6x series is adopted as the processor of the system.In this system, the video frequency (VF) decoding chip first translates the analog TV image signals obtained from CCD into the digital image signals which are inputted into DSP through FIFO buffer by the control of CPLD, and then aiming at the image, DSP performs the license plate positioning, the license plate character segmentation, the license plate character identification, the optical aberrance emendation, the nonlinear emendation of speed error and other algorithm operations to obtain the result of the license plate identification.The system structure is seen in Figure 1.

Module of image acquisition
The image acquisition module of the system is mainly composed by the CCD camera, video frequency decoding chip SAA7111A, FIFO, and the sampling controller composed by CPLD.

Module of video frequency buffer, FIFO
The digital video frequency data acquisition speed of SAA7111A and the exterior data bus work speed of C6201 are different, so the FIFO is used between both to make the speed matching (seen in Figure 2).AL422B synchronic FIFO of the Averlogic Company is adopted in the article, and its maximum storage is 384K×8bits, and it supports CCIR, NTSC, PAL and other video frequency modes, and the writes and reads with different speeds.Two parallel connected FIFOs can compose the interface with 16bits which can completely accept the maximum data capacity after a frame of digitized TV image under the protocol of CCIR.601.
Because FIFO can not be seamlessly connected with the video frequency decoders SAA7111A and C6201DSP, so the exterior logic should be added to realize the mutual connection between FIFO and two decoders.The core to realize the mutual connection logic is a CPLD apparatus of EPM240F100C4.

Module of DSP processing
In 1997, American TI Company issued new generation DSP chip, TMSC6000 series, and the chip is mainly applied in multimedia, and it includes the fixed point series and the floating point series, and the fixed point series is TMS320C62xx, and the floating point series is TMS320C67xx, and both are compatible.
There are 8 parallel processing units in C6000DSP, and they are divided into two same groups.The system structure of DSP adopts very long instruction word structure (VLIW), and the single instruction word length is 32bits, and one instruction bag includes 8 instructions, and the total word length is 8×32=256bits.The wall of the chip sets up special instruction distribution module which can distribute each 256btis instruction to 8 processing unites at the same time, so multiple instructions can be performed in single cycle.When 8 processing units in the interior of the chip run simultaneously, their maximum processing capacity can achieve 6000MIPS (million instructions per second).
Because C6201DSP has only 64KB program memorizer, and the 64KB data memorizer can not fulfill the application, so the exterior memorizer must be extended.C6XDSP has EMIF bus which can be connected with various exterior equipments in the chip and out of the chip.In the article, IS42S16400SDRAM is selected as the exterior extended data memorizer, and the capacity of IS42S16400 is 4Mx16bits, and the combinations of two chips can compose an exterior memorizer with 4Mx23bits, and because the EMIF bus has the SDRAM controller, so DSP and SDRAM can be connected directly, without the glue logic.
When DSP runs off-line, it needs the exterior program memorizer to store the program codes, and when it runs on-line, the program can be loaded to run in the running space.The ST29LE010Flash with 128Kx8bit adopted in this article is the extended exterior program memorizer, and ST29LE010 belongs to the asynchrony apparatus, and it must be connected with the asynchrony memorizer of the C6201EMIF bus, and the connection of the exterior memorize and DSP is seen in Figure 3.

Module of PCI bus interface
To realize the interface between DSP of C5000 series and C6000 series with PCI bus, TI Company specially designed the PCI2040 chip which decode the output data of DSPHPI and output the data to the PCI bus, so the seamless connection between PCI bus and DSP can be realized, and the logic structure is seen in Figure 4. Through the HPI interface of PCI2040, the computer can interview the exterior memorizer of DSP, and store the frame image processed by DSP into the computer real time to display and make further processing analysis.
To realize the normal communication of DSP and computer, the drive of PCI2040 is the key.In Windows, there are three types of drive model, i.e.VxS, KMD and WDM.WDM is mainly pushed by Microsoft, and it possesses the features such as hierarchy structure and trans-platform, and it is compatible for the operation systems above Windows 98, so it is the mainstream development program model at present.

Introduction of the development environment
Generally speaking, the efficiency of C code is limited, but good development environment can enhance the efficiency and development speed of the code.Therefore, in 1999, TI Company pushed a kind of high-efficiency DSP integrated development environment CCS (Code Composer Studio).
CCS is the integrated development environment pushed by TI Company, and it can be used to develop the application program of DSP chip of TI.Not only the generation efficiency of objective code is high, but the transfer is convenient and the development cycle can be shortened largely.
The development environment used in the system is CCS2.2, and it integrates following tools in an opening plug-in structure.
(1) CCS integrates the code generation tools in its interior (C compiler, compilation optimizer, assembler and connecter); (2) Software simulator; (3) Real-time operation system DSP/BIOS; (4) Real-time data exchange software RTDX; (5) Real-time analysis and data visualization software, which can offer a perfect software development environment for developers.
DSP/BIOS is a simple embedded operation system, and it can largely help users to compile multi-task application programs and strengthen the supervision to the code execution efficiency.

Flow of software design
In the license plate recognition system, the flow of DSP can be described as follows.After the system receives the interrupt of hardware, it starts the image acquisition task to obtain the image data, transmits the image data from CPLD to the SDRAM out of DSP by EDMA, and after the image transmission ends, the system performs the quality evaluation, and the images will experience three operations such as the license plate positioning, the license plate segmentation and the character recognition.Finally, the result of the character recognition is transmitted to CPLD and the system performs the UART transmission.So the whole system can be divided into five tasks generally (seen in Table 2).
The transfers of tasks are simple, and the mode of flag signal SEM communication is mainly adopted.The transfers among tasks are seen in Figure 5.

Conclusions
The license plate recognition system is one important part of ITS, and comparing with past manual statistics and recognition, both the efficiency and the quality have been enhanced obviously.With the increase of vehicle amount and the increasingly heavy load of the traffic system, only the manpower can not fulfill the real-time demands of the system, so it is the necessary result of the social development to realize the intelligent management of vehicle information.Combining with the high-speed numerical operation ability of DSP and the advantage that PC is good at the affair management and can offer good human-computer interface, the license plate recognition system can ensure high performance of the system and possess good flexibility, because the recognition is separated with the management, and the management software only needs receive the recognition result transmitted by the recognition module.The small improvement to the management software can flexibly update the license plate recognition algorithm, which can overcome the problem that in the traditional software recognition mode, because of the implementation of the recognition core in the management software, any change and improvement to the recognition core must transfer and check the whole management software.
The current CCD camera outputs composite TV signals CVBS with the NTSC mode, and then SAA7111A decodes the analog TV signals to the digital video frequency signals according with ITU-RBT.601standard, and store the data to the special video frequency FIFO chip by the control of CPLD.SAA7111A possesses six inputs of analog TV signal, and can accept CVBS or S-VIDEO signals, and automatically test and recognize the automatic switch of PAL and NTSC TV signals, and support YUV4:2:2, YUV4:1:1, YUV4:2:0, YUV4:1:0, RG and other digital video frequency outputs, and integrate anti-aliasing filtering waves, and pectination filtering parts.And the model can set up the synchronic field signals IGPV, the synchronic row signals IGPH, the effective image data output signals IDQ, the time output signals ICLK and other state signals, which can convenient for the interior interfaces and possess powerful functions.

Table 1 .
Some data about the current license plate recognition systems used in China Figure 1.Structure of the License Plate Recognition System