License Plate Detection and Reading

_images/license_plate.png

Finds the license plate in a given image and reads character on the plate. Returns rect [x,y,w,h ] , “method1 predicted string” , “method2 predicted string”

Example Go to our flickr photostream http://www.flickr.com/photos/112645524@N07/

Query Image http://farm4.staticflickr.com/3698/12750973303_7ea37d2c46_b_d.jpg

Response

[{“method2”:”MKK4S23”,”rect”:[401,342,251,63],”method1”:”MKK4523”}]

POST /services/license_plate_ocr

Replies face/set of objects with its predictions.

Parameters:
  • instance_token – generated token
Form Parameters:
 
  • query_url / query – query url link or query file.
Request Headers:
 
  • Accept – the response content type is “application/json”
  • InstanceToken – token to authenticate (optional if param instance_token is present)
Response Headers:
 
  • Content-Type – success content type is “application/json”
Status Codes:
  • 200 – success responce
  • 400 – when form parameters are missing
  • 401 – when param instance_token or header InstanceToken is not present present

Example in Python

import requests
import json
url='http://api.pixuate.com/rest/v1/services/license_plate_ocr'
headers={'InstanceToken' : 'YOUR TOKEN','Accept':'application/json'}
data={"query_url":"http://farm4.staticflickr.com/3698/12750973303_7ea37d2c46_b_d.jpg"}
response=requests.post(url=url,data=data,headers=headers)
print response.content

Example in Java

public class pixuate extends AsyncTask<Void,Void,Void>
{

        @Override
        protected Void doInBackground(Void... params) {

        try
        {
        String url="http://api.pixuate.com/rest/v1/services/license_plate_ocr";
        HttpPost post=new HttpPost(url);
        HttpClient client=new DefaultHttpClient();
        List<BasicNameValuePair> nameValuePairs = new ArrayList<BasicNameValuePair>();
        nameValuePairs.add(new BasicNameValuePair("query_url","http://farm4.staticflickr.com/3698/12750973303_7ea37d2c46_b_d.jpg"));
        post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        post.setHeader("Accept","application/json");
        post.setHeader("InstanceToken","YOUR TOKEN");
        HttpResponse http_response=client.execute(post);
        HttpEntity en=http_response.getEntity();
        String s=EntityUtils.toString(en);
        System.out.println(s);
        }catch (ClientProtocolException e) {

        } catch (IOException e) {
        // TODO Auto-generated catch block
        }
                return null;
        }

}