Documentation

 

License Plate Recognition Web Service API


Our LPR Web Service can be deployed in one of two basic approaches; one allows for the entire process to be performed at the location in real-time, the other transmits all the images from multiple locations to a central location and performs the LPR/OCR process there via our LPR web service at some later point in time. When done on the spot, the information captured of the plate alphanumeric, date-time, location identification, and any other information that is required is completed and transmitted to remote computers for further processing if necessary, or stored at the location for later retrieval.

Please note that the output from this service might require a further sanity check, since there are a lot of complications that can arise during the recognition and translation process.

To achieve the highest possible recognition speed the image size is a key factor. To achieve the highest possible recognition rate the image quality is a key factor.

 

Do Not Send The Same Image More Than Once

Our system will take one credit off from your account balance when XML resuslt is returned regardless of what the result turns out to be. So please be sure to have a mechanism in place in your system to prevent the same image from being sent to the web service more than once.

REST API Description

This API uses multipart POST HTTP method. Ensure HTTP POST is a multipart/form-data request. The following three parameters and their values are required.

Parameter Name Parameter Value Used in URL
API Key accesscode xxxxx-xxxxx-xxxxx-xxxxx POST http://www.recognition.ws/lpr/v1?acccesscode=xxxxx-xxxxx-xxxxx-xxxxx&saveimage=TRUE
Input Image* Image File* JPG, JPEG, PNG, GIF, BMP POST http://www.recognition.ws/lpr/v1?acccesscode=xxxxx-xxxxx-xxxxx-xxxxx&saveimage=TRUE
Save Image** saveimage** TRUE or FALSE (default: FALSE) POST http://www.recognition.ws/lpr/v1?acccesscode=xxxxx-xxxxx-xxxxx-xxxxx&saveimage=TRUE
* Only one image file is allowed in a POST request. A POST request with multiple files would be rejected immediately. Only the first found license plate will be processed if an input image contains more than one license plate.
** Set parameter "saveimage" to "TRUE" if you'd like our system to save the input image so that later you can log in to your account to review it. Set the value of this parameter to "FALSE" otherwise.

        
<html>
   <form enctype="multipart/form-data" action="http://www.recognition.ws/lpr/v1?accesscode=xxxxx-xxxxx-xxxxx-xxxxxx&saveimage=FALSE" method="POST">
      Choose an image to process: <input name="anyName" type="file" />
      <input type="submit" value="Go" />
   </form>
</html>
        
    

 

Input Image Specs

Standard license plate characters have to meet the specification of at least 25 pixels high characters. In general, OCR can decode characters lower than this requirement but not at the extremely high(99.8%) accuracies required.

From an APR/OCR perspective, resolution well above the 25-pixel requirement does not significantly translate into better performance but can lead to significantly increase real-time execution due to larger image sizes. To mitigate this, incoming images are typically resized such that the nominal plate character height is in a range of 25-35 pixels high. This creates a problem for motorcycle images since the resizing appropriate for passenger cars and trucks causes motorcycle plate characters to fall well below the 25-pixel requirement. The vehicle type input into ALPR would allow the algorithm to dynamically adjust the resizing, based on the known vehicle type, in order to capture motorcycle plates accurately. As it stands today, motorcycle plates are typically missed completely or recognized with much higher error rates.

More often than not, the "jurisdiction" characters are much smaller than the plate characters.

Input Image Specs Without Reading Region/Country To Read Region/Country
Height of the License Number portion in a License Plate 20 - 150 pixels 100 - 750 pixels
Width of the License Number portion in a License Plate 80 - 400 pixels 80 - 400 pixels
Length of License Number 4 - 10 characters 4 - 10 characters
Size of Input Image < 2.0 MB < 2.0 MB

Output in XML

  • License Number: Plate number in ASCII
  • Region: USA State or Canadian Province
  • Country: Canada or USA
  • Position of the License Number portion in an input image: Top(pixels), Left(pixels), Width(pixels), Height(pixels). The origin(0,0) is the top-left corner of an input image.
        
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<LPR Version="1.0.0" Date="4/22/2015" Status="SUCCESS">
  <License_Number>ABCD-1234</License_Number>
  <Region>region</Region>
  <Country>country</Country>
  <Left>left</Left>
  <Top>top</Top>
  <Width>width</Width>
  <Height>height</Height>
</LPR>
        
    

Error Codes

Error Code (Key) Description (Value)
0 Database Errors.
23 Insufficient balance for Recognition.
25 No image has been uploaded.
26 Recognition failed.
27 Unknown erro(s) occured.
29 One or more required parameters missing.
        
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<LPR version="1.0.0" Date="5/28/2015 1:39:10 PM" Status="FAILED">
  <Message Key="0" Value="Database Errors." />
</LPR>