Difference between revisions of "An Introduction to ANPR"
(New page: __NOTOC__ right Automatic Number Plate Recognition (ANPR) is probably the next growth product to take off in the UK,(and the world) in fact, it is already beginning to ...)
Revision as of 22:02, 14 January 2009
Automatic Number Plate Recognition (ANPR) is probably the next growth product to take off in the UK,(and the world) in fact, it is already beginning to be the biggest potential earner for installation companies. Network systems were all the hype in recent years but have not really grown as the pundits originally predicted. One problem is that it crosses technological barriers and the needs of available bandwidth were conveniently obscured.
On the other hand ANPR technology is completely within the scope of knowledge of CCTV companies, although there are a few new terms and technologies to come to grips with. As with previous new developments there is plenty of scope for the industry to deliver more hype and misinformation. There are pitfalls for the unwary and this and future articles will aim to explain some of these for the customer and installer (or, systems integrator).
We are grateful for assistance in producing this article to CitySync for the APR system and Derwent CCTV for information on infrared illumination.
We will start by considering ANPR for a single lane using a dedicated camera and go on to discuss some other applications such as multi-lane systems and Town Centre systems with colour cameras.
If you scan a document into your PC and then open it in a word processor you cannot edit or alter it in any way. This is because it is simply one bitmap made up of thousands of individual pixels. However there is software available, frequently a freebie with scanners that can convert these groups of pixels into characters. This is Optical Character Recognition (OCR), which scans each group of pixels and estimates whether or not it could be a letter and replaces the pixels with the ASCII* code for the letter. For instance the ASCII code for the lower case 'a' is 01100001. So, the software scans the whole document and produces a page of letters exactly the same as though you had typed them in, which can be edited or manipulated in any way.
(*) American Standard Code for Information Interchange.
OCR is the fundamental technology used in ANPR and provides the capability to store and sort data. ANPR cameras need to be a special type and set up within certain important parameters as will be described later.
As a vehicle approaches the camera the software takes a series of 'snapshots' and stores them in a file. When the number plate is of sufficient size for the OCR software the frame is scanned and the registration number is converted to ASCII code and held in a list. This continues for a series of images according to the speed and position of the vehicle. The list is scanned for similarities and a 'favourite' selected to retain. The system would typically scan and compare 10-15 images, with 5 being considered the minimum for high accuracy. Note that this is the principle of the software we are describing; some systems only take one image at a certain position.
This then, is the start of the ANPR capture and is totally dependant on the correct set up of camera, lens, illumination, angle of view and configuration. Get one wrong and you have a disappointed customer who won't pay the bill.
At this stage we are concentrating on the number plate capture but there are many other aspects to be considered for a completely integrated system, which will be discussed later. Note that the ANPR capture considered here is monochrome.
The Behaviour of Reflected Light
To explain some further technology behind successful ANPR capture we need to look at the behaviour of light. A basic law of light is that the angle of incidence equals the angle of reflection. However, number plates in the UK and most other countries have a special characteristic; they are known as RETRO-REFLECTIVE. The surface is covered in hundreds of tiny hemispheres which cause light to be reflected back to the source. This is the same technology used in safety clothing and signs. No matter from which direction the light is directed, it always reflects back and makes them very visible.
The Application of Infrared Illumination to ANPR
If a standard colour or monochrome camera was focused to read number plates it would have to contend with a huge variety of lighting conditions, daytime, night-time, sunlight, backlight, headlights, and so on. One configuration simply would not cope with all conditions, so there is a need to provide a constant level and direction of illumination irrespective of any other conditions. And so we come to the development of special cameras for continuous capture of number plate data.
The camera must be sensitive to the infrared part of the spectrum, to at least 850 nanometres. Then it must be fitted with a filter to restrict the visible part of the spectrum. The lens would have a manual iris set fully open and the shutter speed set to 1/1000th second. Finally an infrared source must be fitted adjacent to the camera.
Therefore, taking advantage of the retro-reflective characteristics of number plates, the illumination from the illuminator will be reflected directly back to the camera. Thus only infrared light will be seen without any visible light or other reflections or refractions. The picture will of course be black with no detail except for the number plate. The OCR software then takes care of converting the image to usable code.
Note that this is the sort of image on the monitor both day and night.
Cameras and Lenses
This then is the core of ANPR technology, but there are many other factors to be considered. The first of these are the selection of lens and the distance to view the vehicle. The size of a UK license plate on cars and commercial vehicles is approximately 510mm long x 110mm high. Motorcycles are different being approximately 255 x 200. However more significantly, the minimum height of the letters must be 79mm. The current UK font is Charles Wright, although there are some illegal formats seen. The size of the number plate and the actual characters will need to be of a certain size when seen by the camera for the OCR software to function. One line of thought is that the number plate should be 18% of the scene width; I prefer to consider the vertical height of the characters, which from previous research should be 3% minimum for a 400 line camera. This in fact equates very closely to the 18% screen width but is more logical when considering different shapes of number plates. (For instance when a car plate is 18% of the screen a motorcycle plate would only be 7 %.) Also note that motorcycles currently do not have to carry a front number plate, but this could change in the future.
This provides the first convenient way to calculate the lens angle. For 79mm high characters the scene height needs to be 2633mm. (79 being 3% of 2633). Therefore using a scene height of 2.633M and the known distance, it is a simple matter to calculate the lens angle and thus the focal length. At this stage the height of the camera has not been considered but would not make much difference for normal combinations of distance and camera heights. (See further notes at the end).The following table shows the lens angle for various distances and a scene height of 2.633M
Distance to target 5M 10 15 20 25 30 35 40 45 50 Lens angle 29.5° 15° 10° 7.5° 6° 5° 4.3° 3.8° 3.4° 3° Focal length 2/3" 13mm 25 38 50 63 76 88 99 111 126 Focal length ½" 9mm 18 27 37 46 55 64 72 81 92 Focal length 1/3" 7mm 14 21 27 34 41 48 54 61 69 Focal length ¼" 5mm 10 15 20 25 30 35 40 45 51
From this table you can find the nearest lens focal length for the sensor size. Where the focal length falls between two available lenses, a vari-focal lens can solve the issue.
In instances where the camera height is large compared to the horizontal distance the number plate can produce the effect of being rotated vertically. It is important to check with the software provider if this is acceptable.
Vehicle Speed and Capture Rate
Another very important consideration is the speed of the vehicles to be monitored and the width of the area to be covered. There are again two important interrelated elements connected with vehicle speed. One is the rate of the image grabber software the other is the speed of the processor. With modern processors the latter can no be ignored.
Consider a vehicle travelling at 30 MPH, this equates to 13.4 Metres in one second. A UK camera produces 50 fields per second and the shutter speed is usually 1/50th second. In 1/50th second the vehicle would travel 0.27 Metres (268mm). This would cause a blurred image and problems with the OCR translation. For this reason the shutter speed should be set to 1/1000th second, in which case the vehicle would travel only 0.013 Metres (13.4mm). The same reasoning applies when trying to capture moving images with a 35mm camera. This is slightly less important when looking head on at a vehicle but becomes increasingly important when the vehicle is at an angle approaching the camera.
Where the camera is positioned other than directly in the line of the approaching vehicle the ANPR provider must be consulted. Many systems will not function with more than more 1 or 2 degrees of horizontal skew or vertical rotation. The CitySync system will cope with up to 30° of misalignment,
The positioning of the camera is a most important consideration for satisfactory operation of an ANPR system. This can vary the percentage of recognitions to number of vehicles from 30% or 40% to near on 100%. The camera location depends on several factors, such as:
Single camera covering a barrier entrance
Probably the best position is for a camera and illuminator in a 1M high bollard viewing directly at the approaching vehicle.
Single camera covering one lane
This could be a pole mounted unit about from 18M to 30M from the vehicle.
Single or multiple cameras covering multiple lanes
This is a special application requiring input from the ANPR provider.
Town centre cameras already installed
Usually the cameras will not have been installed with ANPR in mind and so the positioning will not be optimised, they will generally be colour with no infrared illumination and will operating with the shutter speed set to 1/50th.
The first thing to address is the shutter speed if it is adjustable. The best would be if the speed can be set remotely, if not each camera needs to be visited and the speed set manually. The optimum setting is to 1/1000th. Alternative settings may be 1/250th for traffic up to 5 MPH and 1/500th for traffic up to 40 MPH. Note that all these settings will affect the low-light capability of the cameras and a compromise may be required.
Another consideration is that the camera positions and heights would not be at the optimum for ANPR. Particular attention must be paid to the angles of skew and rotation and a guaranty obtained that an acceptable percentage of recognitions will be achieved.
Cameras on motorway bridges
Again a special application requiring input from the provider.
Congestion charging cameras
This application requires input from the ANPR provider and local authority before even starting to think of a specification.
Cameras in Police vehicles
These are normally colour cameras mounted on a swivel mount and can view images to the front or either side of the vehicle. This is another special application requiring input from the provider.
It is often necessary to have a conventional colour image of the vehicle especially where prosecution or congestion charging is the application. This would be a separate colour camera mounted alongside or just below the ANPR camera. Saving the overview image is triggered by the ANPR camera registering a number plate. This then adds a colour image to the same file for future reference. It is generally a false economy to attempt to combine the number plate recognition and overview using a single camera for 24/7 operation.
Multi-national number plates
There are thousands overseas vehicles on the roads today, many of them with symbols and other labels incorporated into the plate. The ANPR system must be capable of reading all of these. The software should have a built-in list of such plate styles.
The ANPR database
Just capturing number plates and storing them is not much use by itself. The screenshot below shows an ANPR example review screen. The associated database should be able to provide much more information.
Searching should possible on several fields:
Full plate. Part plate. Time. Date. Category. Notes added to image file. Further functions could be: Counting vehicles in and out of premises, leaving a list of all vehicles on site. The length of time a vehicle is on site. Vehicle speed (from two cameras). Employee names can be associated with number plates and access allowed or denied to certain areas.
Example flow diagram for ANPR system
Vehicle speeds and distances
The following table shows distances travelled for different speeds. This will give some indication to the number of images that be captured. From this table it can be seen that fof a vehicle travelling at 50MPH at 1/50th exposure it will travel nearly half a metre resulting in a blurred image. Compared to only 22mm at 1/1000th exposure.
These are sometimes known as frame grabbers or field grabbers or stores. In reality they all store images or single fields.
This is a particular area where you really pay for what you get. The main criterion is the speed at which images can be captured. For instance Video for Windows can only store about 8 images per second which is only suitable for very slow moving or stationary traffic. Whereas the Brooktree JG201 can capture at 50 images per second. Prices for image grabbers can vary from about £60.00 to £500.00.
This article has given an overview of ANPR technology, in some cases simplified to provide an understanding of the underlying principles. Many features will vary between manufacturers so don't assume because something is mentioned in this article it will be available from anyone. In some cases it may work to obtain number plate recognition and an overview from one camera but there will be a trade-off such as reduced low-light performance of a complete inability to recognise numbers at night. Beware of all-embracing requirements such as; 'one camera to read every number plate day and night, provide a colour overview and identify persons in the vehicle'
The need to enlist the cooperation of the ANPR manufacturer cannot be over-emphasised.
ANPR is the generic term generally used in the UK but other terms are common in other parts of the world. Such as; NPR (Number Plate Recognition), LPR (License Plate Recognition).
This chapter is supplied by Mike Constant and was originally published in CCTV Today. Mike is the author of 'The Principles & Practice of CCTV' which is generally accepted as the benchmark for CCTV installation in the UK.