Links
Comment on page
🇻🇳

API Documentation for Vietnamese LPR

Postman Example:

1. (On-Cloud, On-Premise) Image License Plate Recognition

  • On Cloud - one request at a time.
  • On Premise - unlimited requests.
  • API sends external requests to the LPR system.

Input Image (Sample)

Example image
post
https
://api.iapp.co.th/license-plate-recognition/vn/file
Post Image
This endpoint allows you to send a picture that consists of minimum one vehicle that OCR must be performed. The Response will be the licence plate number of the vehicle(s) on the picture.
Parameter
Type
Description
Required
apikey
string
Your API key to call this API
Required
file
string
Picture consists of a vehicle
Required

Response Explanation

Parameters
Explanation
conf
Confidence score of the license plate recognition in percentage.
infer_time(s)
Time taken for inference in seconds.
is_missing_plate
Indicates if there is a license plate missing in the image. Possible values: "yes" or "no".
is_vehicle
Indicates if a vehicle is present in the image. Possible values: "yes" or "no".
lp_number
License plate number recognized from the image.
message
API response message. Possible values: "success" or "error".
status
HTTP status code of the API response.
vehicle_body_type
Body type of the recognized vehicle.List of Supported Body Type
vehicle_brand
Brand of the recognized vehicle. List of Supported Vehicle Brand
vehicle_color
Color of the recognized vehicle. List of Supported Color
vehicle_model
Model of the recognized vehicle. List of Supported Vehicle Model
vehicle_orientation
Orientation of the recognized vehicle in the image. List of Supported Orientation
vehicle_year
Year range of the recognized vehicle model. List of Supported Year Ranges

Sample Response

200: OK
404: Not Found
415: Unsupported Media Type
{
"conf": 87.00009918,
"message": "success",
"infer_time(s)": 0.077777862548828,
"status": 200,
"vehicle_year": "1995-1999",
"vehicle_orientation": "135",
"vehicle_model": "opel_zafira-tourer",
"vehicle_body_type": "motorcycle",
"vehicle_color": "silver-gray",
"lp_number": "59TT88808",
"is_vehicle": "yes",
"vehicle_brand": "opel",
"is_missing_plate": "no"
}
{
"message": "Couldn't recognize the license plate"
"status": 404
}
{
"message": "File Extension is not allowed"
"status": 415
}
{
"message": "Attach one image at a time"
"status": 462
}
{
"message": "Method is not allowed",
"status": 415
}

Sample Request

Python
cURL
Java - Unirest
NodeJS - Request
Objective C
import requests
url = "https://api.iapp.co.th/license-plate-recognition/vn/file"
path = "path/to/your/input/image"
file_name = "your input image name"
payload={}
files=[
('file_name',(path, 'rb'), 'image/jpeg'))
]
headers = {
'apikey': '----Your API Key----'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
curl --location --request POST 'https://api.iapp.co.th/license-plate-recognition/vn/file' \
--header 'apikey: ----Your API Key----' \
--form 'your input image name=@"/path/to/your/input/image.jpg|jpeg|png"'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.iapp.co.th/license-plate-recognition/vn/file")
.header("apikey", "----Your API Key----")
.field("your input image name", new File("/path/to/your/input/image.jpg|jpeg|png"))
.asString();
var request = require('request');
var fs = require('fs');
var options = {
'method': 'POST',
'url': 'https://api.iapp.co.th/license-plate-recognition/vn/file',
'headers': {
'apikey': '----Your API Key----'
},
formData: {
'file': {
'value': fs.createReadStream('/path/to/your/input/image.jpg|jpeg|png'),
'options': {
'filename': 'your input image name',
'contentType': null
}
}
}
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/license-plate-recognition/vn/file"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"apikey": @"----Your API Key----"
};
[request setAllHTTPHeaderFields:headers];
NSArray *parameters = @[
@{ @"name": @"your input image name", @"fileName": @"/path/to/your/input/image.jpg|jpeg|png" }
];