Photo by Semen Borisov on Unsplash
License plate recognition, or LPR, has been one of the biggest innovations in parking over the last several years. Parking operations around the world are using LPR to provide access to garages and lots and enforce permitted and transient parkers. But what exactly is LPR and how does it work?
LPR combines various applications and methodologies to extract a license plate number from an image and convert it into computerized text. A specialized camera generates an image of a license plate, which feeds into a software engine that identifies the characters on the plate and uses optical character recognition (OCR) techniques to convert the text into an electronic format.
LPR applications are generally categorized into three different types:
Handheld LPR is conducted on a handheld device, primarily for enforcement purposes and to assist officers with entering license plate data.
Fixed LPR refers to a camera installed in a (semi)permanent location that tracks vehicles as they drive by. In parking, this is most commonly found at the entry or egress of a parking facility.
Mobile LPR consists of fixed cameras mounted to a moving vehicle for enforcement, timing, and hotlist applications.
How LPR Works
Inside the System
The LPR “engine” is a software package where the primary input is an image file containing a license plate, and the primary output is the text of the plate. There are also various other inputs to assist the LPR engine in decoding, and various other outputs as a result of the decoding.
The LPR engine receives the image in one of two ways: either the image is captured by an LPR camera and fed to the engine (integrated system, usually real-time), or the image is delivered electronically to the LPR engine (remote processing, sometimes real-time and sometimes batch).
Some LPR engines will also accept “hints” to assist with decoding. Some examples are state/region designations to help with color detection, letter sizing for fixed distance plates, and plate angle. These secondary inputs vary by manufacturer.
Generally speaking, there are six steps involved in most plate recognition algorithms.
Step 1: Localization or Framing
First, the LPR engine attempts to identify the position of the license plate within the image. This is called localization or framing. This allows the LPR engine to focus on the plate and disregard any extraneous data in the picture.
Step 2: Orientation and Sizing
Depending on the angle of the license plate, there may be special adjustments needed to decode the plate. These mathematical, angular corrections assist in decoding plates that are taken from above (overhead camera), or from the side of a plate (parallel parked), and they correct for perspective and rotation.
Step 3: Normalization
Shadows and shading can present a problem for LPR, so various filters are used to reduce or eliminate these elements. Edge detection is a common filtering technique for license plates, and works well when there is high contrast between the text and background.
In more sophisticated systems, multiple images of the same plate are blended together to create a clearer, more defined image for the processing engine. This is similar to the HDR feature found on electronic cameras and smartphones. Another image clarification technique involves applying various filters to make the image more readable and then using elements of each filtered image.
|1. Yellow rectangles mark the areas that could be a license plate.
|2. Letters may be different sizes due to skew.
|3. Filters help isolate contrast.
Step 4: Character Segmentation
Character segmentation involves identifying the individual characters of the license plate using various techniques. Most commonly, this includes whitespace delineation, or finding the spaces between the letters. In a fixed space font, the characters are easier to separate because the spacing pattern is predictable. However, when spacing is variable the LPR engine is more prone to error.
In some regions the plate manufacturer makes LPR a little easier by increasing the kerning (spacing) between characters that might be hard to decipher when letters are too close. For example, two Vs (VV) can look like a W, but kerning can help separate the two Vs (V V).
Step 5: Optical Character Recognition
When the individual characters are separated, they are then recognized by various optical character recognition (OCR) techniques. Pattern matching, edge tracing, proportion, and pixel repetition are common methods for recognizing characters.
Using guesswork for matching contributes to the idea of a “confidence factor”, which many LPR providers offer as an output of the LPR process. Overall confidence in a successful read is a factor of the individual character recognition as well as matching patterns suggested in the hints or tuning of the engine.
Some LPR engines will provide multiple options for a recognized plate, as some letters and digits are virtually identical (I and 1, O and 0, B and 8). The next step can sometimes aid in determining which option is more appropriate.
Step 6: Syntactical/Geometric Analysis
This final step checks the characters and sequence against regionally specific rules. In some cases, this could be a list of known license plates (a hotlist or a whitelist, for example), which provides much higher confidence in plate recognition. However, the introduction of personalized plates makes regional analysis more difficult since these patterns often break the standardized rules.
|4. This fixed space font makes character segmentation easier.
|5. Do you think this driver of plate “II1I11I” is trying to thwart the LPR engine?
|6. Zombie Apocalypse? Personalized plates often break the rules for character patterns.
A confidence factor can be generated by the LPR engine as it processes the image of the license plate. It is an optional output of most LPR engines. Each decision (or guess) that the LPR engine makes results in some possibility of error, and the sum of these errors relates to the confidence in the decoding – fewer errors means higher confidence. Based on software tuning for specific plates, the LPR engine is able to recognize when some guesses are better than others.
Confidence in a successful read is primarily related to recognition of the individual characters. However, other important factors include the patterns of letters, matching to a hotlist, and the quality of the original image. Some LPR engines will provide multiple output strings with a confidence factor for each, for the purpose of matching against a wildcard list.
Confidence is usually represented as a decimal between 0 and 1. For example, 0.85 represents an 85% confidence in the resulting license plate character string matching the original image. When the confidence is high it may be acceptable to consider the output as properly decoded, but when the confidence is low a secondary system (or human) may be needed.
Whitelist / Hotlist
The term “whitelist” or “hotlist” is used to describe a list of known license plates. Usually the whitelist refers to plates that are valid (allowed to park), while the hotlist contains plates that are not valid (stolen, scofflaw, etc.).
Having a whitelist or hotlist makes LPR easier because it gives the engine a smaller universe of matching values. For example, if the whitelist contains B0123 but the LPR returns 8OI23, there is a high probability these are the same plate because B and 8 are similar, 0 and O are similar, and 1 and I are similar.
Some LPR engines are also able to detect information in addition to the plate. Some will look at the manufacturer’s logo and determine the vehicle make based on this information.
Vehicle model may also be available using various techniques like the shape/outline of the vehicle, or simply by reading the name of the model from the rear of the vehicle. Additionally, vehicle color is sometimes detectable, though lighting conditions play a large factor.
LPR is rapidly being accepted in the parking industry to augment – and sometimes replace – the use of credentials. For more information on how parking operations are implementing LPR and the success they have found with T2’s LPR solutions, you can read our customer success stories on City of Rehoboth Beach, DE and San Jose State University.