Вы находитесь на странице: 1из 20

ANPR SYSTEM

1. INTRODUCTION
Being able to identify car number plates quickly and mechanically is of great benefit
to many businesses and organizations for a wide variety of applications including security,
crime detection, traffic management and even automatic payment systems (e.g. for car parks).
It is only recently that the technology has r eally come of age, but the systems AC Controls
now install not only provide exceptionally reliable results, but also can do so at acute angles,
in any lighting condition and most importantly at high speed.
The ANPR was invented in 1976 at the Police Scientific Development Branch in the
UK. Prototype systems were working by 1979 and contracts were let to produce industrial
systems, first at EMI Electronics then at Computer Recognition Systems (CRS) in
Wokingham, UK. Early trial systems were deployed on the A1 road and at the Dartford
Tunnel. The first arrest due to a detected stolen car was made in 1981.
Fig (i): Basic design of ANPR system

SIETK

ANPR SYSTEM

2. Mathematical aspects of number plate recognition systems


In most cases, vehicles are identified by their number plates, which are easily
readable for humans, but not for machines. For machine, a number plate is only a grey
picture defined as a two-dimensional function f (x, y), where x and y are spatial coordinates,
and f is a light intensity at that point. Because of this, it is necessary to design robust
mathematical machinery, which will be able to extract semantics from spatial domain of the
captured image. These functions are implemented in so-called ANPR systems, where the
acronym ANPR stands for an Automatic Number Plate Recognition. ANPR system
means transformation of data between the real environment and information systems.
The design of ANPR systems is a field of research in artificial intelligence, machine
vision, pattern recognition and neural networks. Because of this, the main goal of this thesis
is to study algorithmic and mathematical principles of automatic number plate recognition
systems.
It deals with problematic of number plate area detection. This problematic includes
algorithms, which are able to detect a rectangular area of the number plate in original image.
Humans define the number plate in a natural language as a small plastic or metal plate
attached to a vehicle for official identification purposes, but machines do not understand
this definition. Because of this, there is a need to find an alternative definition of the number
plate based on descriptors, which will be comprehensible for machines. This is a
fundamental problem of machine vision and of this.
It describes principles of the character segmentation. In most cases, characters are
segmented using the horizontal projection of a pre-processed number plate, but sometimes
these principles can fail, especially if detected number plates are too warped or skewed.
Then, more sophisticated segmentation algorithms must be used.
It deals with various methods normalization and detection of characters. At first,
character dimensions and brightness must be normalized to ensure invariance towards a size
and light conditions. Then, a feature extraction algorithm must be applied on a character to
filter irrelevant data. It is necessary to extract features, which will be invariant towards
character deformations, used font style etc.
SIETK

ANPR SYSTEM

It studies pattern classifiers and neural networks and deals with their usage in recognition
of characters. Characters can be classified and recognized by the simple nearest neighbour
algorithm (1NN) applied to a vector of extracted features, or there is also possibility to use
one of the more sophisticated classification methods, such as feed-forward or Hopfield
neural networks. This also presents additional heuristic analyses, which are used for
elimination of non-character elements from the plate.
Sometimes, the recognition process may fail and the detected plate can contain errors.
Some of these errors can be detected by a syntactical analysis of the recognized plate. If we
have a regular expression, or a rule how to evaluate a country-specific license plate, we can
reconstruct defective plates using this rule. For example, a number zero 0 can be
automatically repaired to a character O on positions, where numbers are not allowed. It six
deals with this problematic.

3. Physical aspects of number plate recognition systems

Automatic number plate recognition system is a special set of hardware and software
components that proceeds an input graphical signal like static pictures or video sequences,
and recognizes license plate characters from it. A hardware part of the ANPR system
typically consists of a camera, image processor, camera trigger, communication and storage
unit.
The hardware trigger physically controls a sensor directly installed in a lane. Whenever
the sensor detects a vehicle in a proper distance of camera, it activates a recognition
mechanism. Alternative to this solution is a software detection of an incoming vehicle, or
continual processing of the sampled video signal. Software detection, or continual video
processing may consume more system resources, but it does not need additional hardware
equipment, like the hardware trigger.
Image processor recognizes static snapshots captured by the camera, and returns a text
representation of the detected license plate. ANPR units can have own dedicated image
processors (all-in-one solution), or they can send captured data to a central processing unit
for further processing (generic ANPR). The image processor is running on special
recognition software, which is a key part of whole ANPR system.
SIETK

ANPR SYSTEM

Because one of the fields of application is a usage on road lanes, it is necessary to use a
special camera with the extremely short shutter. Otherwise, quality of captured snapshots
will be degraded by an undesired motion blur effect caused by a movement of the vehicle.
For example, usage of the standard camera with shutter of 1/100 sec to capture a vehicle with
speed of 80 km/h will cause a motion skew in amount of 0.22 m. This skew means the
significant degradation of recognition abilities.
There is also a need to ensure system invariance towards the light conditions. Normal
camera should not be used for capturing snapshots in darkness or night, because it operates
in a visible light spectrum. Automatic number plate recognition systems are often based on
cameras operating in an infrared band of the light spectrum. Usage of the infrared camera in
combination with an infrared illumination is better to achieve this goal. Under the
illumination, plates that are made from reflexive material are much more highlighted than
rest of the image. This fact makes detection of license plates much easier.

a) (Illumination makes detection of reflexive image plates easier. (b) Long


mera shutter a) Illumination makes detection of reflexive image plates easier. (b) Long
Fig (ii): a) Illumination makes detection of reflexive image plates easier. (b) Long camera
llumination makes detection of reflexive image plates easier. (b) Long
shutter and a movement of the vehicle can cause an undesired motion blur effect.
llumination makes detection of reflexive image plates easier. (b) Long

llumination makes detection of reflexive


image platesof
easier.
(b) Long
4. Principles
number
plate

area detection

llumination makes detection


of step
reflexive
image of
plates
easi and
a movement
of the vehicle
can cause
The first
in a process
automatic
number
plate recognition
is a detection
of aan undesired mot

number plate area. This problematic includes algorithms that are able to detect a rectangular
area of the number plate in an original image. Humans define a number plate in a natural
language as a small plastic or metal plate attached to a vehicle for official identification
purposes, but machines do not understand this definition as well as they do not understand
what vehicle, road, or whatever else is. Because of this, there is a need to find an
alternative definition of a number plate based on descriptors that will be comprehensible for
machines.

SIETK

ANPR SYSTEM

Let us define the number plate as a rectangular area with increased occurrence of
horizontal and vertical edges. The high density of horizontal and vertical edges on a small
area is in many cases caused by contrast characters of a number plate, but not in every case.
This process can sometimes detect a wrong area that does not correspond to a number plate.
Because of this, we often detect several candidates for the plate by this algorithm, and then
we choose the best one by a further heuristic analysis.
Let an input snapshot be defined by a function f x y( , ), where x and y are spatial
coordinates, and f is an intensity of light at that point. This function is always discrete on
digital computers, such as x0 y0 , where 0 denotes the set of natural numbers
including zero. We define operations such as edge detection or rank filtering as mathematical
transformations of function f .
The detection of a number plate area consists of a series of convolve operations.
Modified snapshot is then projected into axes x and y . These projections are used to
determine an area of a number plate.

5. Principles of plate segmentation


The next step after the detection of the number plate area is a segmentation of the
plate. The segmentation is one of the most important processes in the automatic number plate
recognition, because all further steps rely on it. If the segmentation fails, a character can be
improperly divided into two pieces, or two characters can be improperly merged together.
We can use a horizontal projection of a number plate for the segmentation, or one of the
more sophisticated methods, such as segmentation using the neural networks. If we assume
only one-row plates, the segmentation is a process of finding horizontal boundaries between
characters. It deals with this problematic.
The second phase of the segmentation is an enhancement of segments. The segment of a
plate contains besides the character also undesirable elements such as dots and stretches as
well as redundant space on the sides of character. There is a need to eliminate these elements
and extract only the character. It deals with these problems.

SIETK

ANPR SYSTEM

5.1 Segmentation of plate using a horizontal projection


Since the segmented plate is deskewed, we can segment it by detecting spaces in its
horizontal projection. We often apply the adaptive thresholding filter to enhance an area of
the plate before segmentation. The adaptive thresholding is used to separate dark foreground
from light background with non-uniform illumination. You can see the number plate area
after the thresholding in figure 3.1.a.
After the thresholding, we compute a horizontal projection px (x) of the plate f (x y, ) . We
use this projection to determine horizontal boundaries between segmented characters. These
boundaries correspond to peaks in the graph of the horizontal projection (figure 3.1.b).
y

x
px
()

vm
va
vb
x

Figure (iii): (a) Number plate after application of the adaptive thresholding
(b) Horizontal projection of plate with detected peaks. Detected peaks are denoted by
dotted vertical lines.

The goal of the segmentation algorithm is to find peaks, which correspond to the
spaces between characters. At first, there is a need to define several important values in a
graph of the horizontal projection px (x) :

vm

vm

SIETK

- The maximum value contained in the horizontal projection px (x) , such as


px x, where w is a width of the plate in pixels.

ANPR SYSTEM

w1
1

va - The average value of horizontal projection px (x) , such as va =

px ( )x
w x=0

vb - This value is used as a base for evaluation of peak height. The base value is
always calculated as vb = 2va vm . The va must lie on vertical axis between the values
vb and vm .

The algorithm of segmentation iteratively finds the maximum peak in the graph of
vertical projection. The peak is treated as a space between characters, if it meets some
additional conditions, such as height of peak. The algorithm then zeroizes the peak and
iteratively repeats this process until no further space is found. This principle can be
illustrated by the following steps:

1. Determine the index of the maximum value of horizontal projection: xm


px x
2. Detect the left and right foot of the peak as: xl = max {x px ( )x cx px (xm )}
0 x xm
xr = min {x px ( )x cx px (xm )}
xm <x w
3. Zeroize the horizontal projection px (x) on interval x xl , r
4. If px (xm ) < cw vm , go to step 7.
5. Divide the plate horizontally in the point xm .
6. Go to step 1.
7. End.

SIETK

ANPR SYSTEM

Two different constants have been used in the algorithm above. The constant cx is
used to determine foots of peak xm . The optimal value of cx is 0.7.
The constant cw determines the minimum height of the peak related to the maximum
value of the projection (vm ). If the height of the peak is below this minimum, the peak will
not be considered as a space between characters. It is important to choose a value of constant
cw carefully. An inadequate small value causes that too many peaks will be treated as spaces,
and characters will be improperly divided. A big value of cw causes that not all regular peaks
will be treated as spaces, and characters will be improperly merged together. The optimal
value of cw is 0.86. To ensure a proper behavior of the algorithm, constants cx and cw should
meet the following condition:
(x xl , m,xr )P c: w vm > px (xl ) px (xr )
where P is a set of all detected peaks xm with corresponding foots xl and xr .

5.2 Extraction of characters from horizontal segments


The segment of plate contains besides the character also redundant space and other
undesirable elements. We understand under the term segment the part of a number plate
determined by a horizontal segmentation algorithm. Since the segment has been processed
by an adaptive thresholding filter, it contains only black and white pixels. The neighboring
pixels are grouped together into larger pieces, and one of them is a character. Our goal is to
divide the segment into the several pieces, and keep only one piece representing the regular
character. This concept is illustrated in figure 3.2.
Horizontal
segment

Piece 1
Piece 2
Piece 3

Piece 4

SIETK

ANPR SYSTEM

Figure (iv) : Horizontal segment of the number plate contains several groups (pieces) of
neighboring pixels.

6. Tests and final considerations


I have captured many of static snapshots of vehicles for the test purposes. Random
moving and standing vehicles with Slovak and Czech number plates have been included. At
first, my objective was to find a representative set of number plates, which are recognizable
by humans. Of course, the set like this contains extremely wide spectrum of plates, such as
clear and easy recognizable as well as plates degraded by the significant motion blur or skew.
Then, a recognition ability of a machine is represented by a ratio between the number of
plates, which have been recognized by the machine, and the number of plates recognized by
a human. Practically, it is impossible to build a machine with the same recognition abilities
as a human has. Because of this, the test like this is extremely difficult and useless.
In praxis, it is more useful to find a representative set of number plates, which can be
captured by an ANPR camera. The position of the camera has a significantly affects the
quality of captured images, and a successfulness of the whole recognition process. The
suitable position of the camera towards the lane can lead to a better set of all possible
snapshots. In some situations, we can avoid of getting skewed snapshots by a suitable
positioning of the camera. Sometimes, this is cleverer than a development of the robust deskewing mechanisms.
Let S be a representative set of all snapshots, which can be captured by a concrete
instance of the ANPR camera. Some of the snapshots in this set can be blurred, some of them
can be too small, too big, too skewed or too deformed. Because of this, I have divided the
whole set into a following subsets:
S =Sc Sb Ss Se Sl
where Sc is a subset of clear plates, Sb is a subset of blurred plates, Ss is a subset of
skewed plates, Se is a subset of plates, which has a difficult surrounding environment, and Sl
is a subset of plates with little characters.

SIETK

ANPR SYSTEM

A B
C D

Figure (v): Typical snapshot from the set of (a) clear plates (b) plates with little, or
blurred characters (c) skewed plates (d) plates with difficult surrounding environment

7. Elements of typical ANPR system

SIETK

10

ANPR SYSTEM

ANPR systems normally consist of the following units:


Camera(s) - that take the images of the car (front or rear side)
Illumination - a controlled light that can bright up the plate, and allow day and night
operation. In most cases the illumination is Infra-Red (IR) which is invisible to the
driver.
Frame grabber - an interface board between the camera and the PC, allows the
software to read the image information.
Computer - normally a PC running Windows or Linux. It runs the LPR application,
which controls the system, reads the images, analyzes and identifies the plate, and
interfaces with other applications and systems.
Software - the application and the recognition package. Usually the recognition
package is supplied as a DLL (Dynamic Link Library).
Hardware - various input/output boards used to interface the external world (such as
control boards and networking boards).

SIETK

11

ANPR SYSTEM

Database - the events are recorded on a local database or transmitted over the
network. The data includes the recognition results and (optionally) the vehicle or
driver-face image file.

8. System Architecture
SeeLane is a turn-key system comprises of the following elements:
A PC Pentium running Windows 2K/WinXP Pro SeeCar DLL - which is used to
analyze the images and extract license plate string.
Camera/Illumination unit to capture the images (SeeCarHead Hi-Tech Solutions
LPR camera and illumination unit)
A Frame Grabber(s) - which capture(s) the images from the camera units (handles
multiple camera inputs)
I/O card input/output board with multiple I/O discrete lines. This board supports
the sensors, illumination control and optional gate-open signal. It is connected via a
cable to a terminal interface board with easy connections and indicator lights.
Sensors to indicate the presence of the car (a sensor for each lane)
The SeeLane Windows application interfaces the hardware elements (frame grabber,
camera/illumination unit(s), IO card and sensor). It controls the illumination, reads the
video inputs and passes the images to the DLL in order to obtain the recognition results.
The application displays the image and recognition results. It then exports the results using
serial communication, messages or disk files. Its man-machine interface supports on-line
setting control, which can easily adapt the application to various types of configurations.

9. Working Of ANPR

SIETK

12

ANPR SYSTEM

Fig (vi) : The vehicle approached the secured area, and starts the cycle by stepping
over a magnetic loop detector (which is the most popular vehicle sensor). The loop detector
senses the car and its presence is signaled to the LPR unit.

Fig (vii) : The LPR unit activates the illumination (invisible Infra-red in most cases) and
takes pictures of the front or rear plates from the LPR camera (shown at the left side of the
gate). The images of the vehicle include the plate and the pixel information is read by the
LPR unit's image processing hardware (the frame grabber).

SIETK

13

ANPR SYSTEM

Fig(viii) : The LPR unit analyzes the image with different image processing software
algorithms, enhences the image, detects the plate position, extracts the plate string, and
identifies the fonts using special artificial intelligence methods (such as Neural
Networks).Most LPR units are based on an application running on PC under Windows.

Fig(ix) : The LPR unit checks if the vehicle appears on a predefined list of authorized cars,
and if found - it signals to open the gate by activating its relay. The unit can also switch on a
green "go-ahead" light or red "stop" light. The unit can also display a Welcome! message
with personalized data.
SIETK

14

ANPR SYSTEM

Fig(x) : The authorized vehicle enters into the secured area. After passing the gate its detector
closes the gate. Now the system waits for the next vehicle to approach the secured area.

10. Difficulties
There are a number of possible difficulties that the software must be able to cope
with. These include:
Poor image resolution, usually because the plate is too far away but sometimes
resulting from the use of a low-quality camera.
Blurry images, particularly motion blur
Poor lighting and low contrast due to overexposure, reflection or shadows
An object obscuring (part of) the plate, quite often a tow bar, or dirt on the plate
A different font, popular for vanity plates (some countries do not allow such plates,
eliminating the problem)
Circumvention techniques

SIETK

15

ANPR SYSTEM

Early ANPR systems were unable to read white or silver lettering on black
background, as permitted on UK vehicles built prior to 1973.

While some of these problems can be corrected within the software it is primarily left
to the hardware side of the system to work out solutions to these difficulties.
Increasing the height of the camera may avoid problems with objects (such as other
vehicles) obscuring the plate, but introduces and increases other problems such as the
adjusting for the increased skew of the plate

11. Typical applications

LPR applications have a wide range of applications, which use the extracted plate

number and optional images to create automated solutions for various problems. These
include the following sample applications.
Parking
The plate number is used to automatically enter pre-paid members and calculate
parking fee for non-members (by comparing the exit and entry times). The optional driver
face image can be used to prevent car hijacking.
In this example, a car is entering a car park in a busy shopping center. The car plate is
recognized and stored. When the car will later exit (through the gate on the right side) the car
plate will be read again. The driver will be charged for the duration of the parking. The gate
will automatically open after payment - or if the vehicle has a monthly permit.

SIETK

16

ANPR SYSTEM

Access Control - a gate automatically opens for authorized members in a secured

area, thus replacing or assisting the security guard. The events are logged on a database and
could be used to search the history of events.
In this example, the gate has just been automatically raised for the authorized vehicle,
after being recognized by the system. A large outdoor display greets the driver. The event
(result, time and image) is logged in the database.
Tolling - the car number is used to calculate the travel fee in a toll-road, or used to

double-check the ticket.


In this installation, the plate is read when the vehicle enters the toll lane and presents a
pass card. The information of the vehicle is retrieved from the database and compared against
the pass information. In case of fraud the operator is notified.
Border Control - the car number is registered in the entry or exits to the Country, and

used to monitor the border crossings. It can short the border crossing turnaround time and cut
short the typical long lines.
This installation covers the borders of the entire Country. Each vehicle is registered into a
central database and linked to additional information such as the passport data. This is used to
track all border crossings.
Traffic control - the vehicles can be directed to different lanes according to their

entry permits (such as in University complex projects). The system effectively reduces traffic
congestion.

In this installation the LPR based system classifies the cars on a congested entrance
to 3 types (authorized, known visitors, and unknown cars for inquiry) and guides them to the
appropriate lane. This system reduced the long waiting lines and simplified the security
officers workload.
Marketing Tool - the car plates may be used to compile a list of frequent visitors for

marketing purposes, or to build a traffic profile (such as the frequency of entry verses the
hour or day).
Travel - A number of LPR units are installed in different locations in city routes and

the passing vehicle plate numbers are matched between the points. The average speed and
travel time between these points can be calculated and presented in order to monitor
SIETK

17

ANPR SYSTEM

municipal traffic loads. Additionally, the average speed may be used to issue a speeding
ticket.

12. Conclusion

Automatic number plate recognition (ANPR) is a mass surveillance method that uses
optical character recognition on images to read the licence plates on vehicles. As of 2006
systems can scan number plates at around one per second on cars travelling up to 100 mph
(160 km/h). They can use existing closed-circuit television or road-rule enforcement cameras,
or ones specifically designed for the task. They are used by various police forces and as a
method of electronic toll collection on pay-per-use roads, and monitoring traffic activity such
as red light adherence in an intersection

SIETK

18

ANPR SYSTEM

13. REFERENCES

[1] Feng Yang, Zheng Ma Vehicle License Plate location Based on Histogramming and
Mathematical Morphology , 2005.
[2] Tran Duc Duan, Duong Anh Duc, Tran Le Hong Du Combining Hough Transform and
Contour Algorithm for detecting Vehicles. License-Plates, October 2004
[3] Tran Duc Duan, Tran Le Hong Du, Tran Vinh Phuoc, Nguyen Viet Hoang Building an
Automatic Vehicle License-Plate Recognition System , Febraury 2005
[4] CheokMan, Kengchung A High Accurate Macau License Plate Recognition System,
2008
SIETK

19

ANPR SYSTEM

[5] R Thuy Tuong Nguyen, Xuan Dai Pham and Jae Wook JeonRectangular Object Tracking
Based on Standard Hough Transform , February, 2009
[6] Yungang Zhang Changshui Zhang A New Algorithm for Character Segmentation of
License Plate, June 2003
[7] Wenjing Jia, Huaifeng Zhang, and Xiangjian He Mean Shift for Accurate Number Plate
Detection, July 2005

SIETK

20

Вам также может понравиться