Background supergraphic

Plat nomor (License Plate)

License plate for vehicle issued in Indonesia.

License Plate Object

  • Name
    status
    Type
    string
    Description

    Enum code indicating the status of the reading result.

    1. SUCCESS
    2. NO_FILE
    3. FILE_INVALID_FORMAT
    4. FAILED
  • Name
    reason
    Type
    string
    Description

    A human-readable message providing more details about the reading result.

  • Name
    read
    Type
    object
    Description

    Contains the reading of the plate number.

    • Name
      plates
      Type
      array of object
      Description

      Contains the reading of the plate number.

      • Name
        value
        Type
        string
        Description

        The processed/extracted plate number.

      • Name
        value_original
        Type
        string
        Description

        The original text as read from the plate.

      • Name
        confidence
        Type
        number
        Description

        Overall confidence score.

      • Name
        confidence_text
        Type
        number
        Description

        Text recognition confidence score.

      • Name
        polygon
        Type
        array
        Description

        Array of coordinate pairs [x, y] representing the bounding box of the plate.

      • Name
        page_index
        Type
        number
        Description

        Page number where the plate was found (0-indexed).


POST/ocr/v1/plate

Read Plate

Detects a valid Plate image and returns the information as text.

Required parameter

  • Name
    image
    Type
    file (.png, .jpg, .jpeg)
    Description

    The image file for the Plate.

Sample Request

POST
/ocr/v1/plate
1
2
3
4
5
import { Vision } from '@glair/vision'; const vision = new Vision({ apiKey: 'api-key', username: 'username', password: 'password' }); await vision.ocr.licensePlate({ image: '/path/to/image/Plate.jpg' });

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ "status": "SUCCESS", "reason": "File Successfully Read", "read": { "plates": [ { "value": "A 9029 G", "value_original": "A 9029 G", "confidence": 0.9518, "confidence_text": 0.9891, "polygon": [ [713, 593], [853, 572], [860, 620], [720, 640] ], "page_index": 0 } ] } }

Request ID

An associated request identifier is generated for every request made to this endpoint. This value can be found in the response headers under Request-Id


Responses

Various responses for this endpoint, in addition to general responses specified in Errors.

200 - OK

Request with readable Plate image

Response

1
2
3
4
5
{ "status": "SUCCESS", "reason": "File Successfully Read", //..., }

200 - OK

Request with non Plate image

Response

1
2
3
4
5
{ "status": "SUCCESS", "reason": "File successfully read. Some fields are invalid.", //..., }

400 - Bad Request

Request without form-data image

Response

1
2
3
4
5
{ "status": "NO_FILE", "reason": "No file in request body", //..., }

415 - Unsupported Media Type

Request with non-image file format

Response

1
2
3
4
5
{ "status": "FILE_INVALID_FORMAT", "reason": "Failed to process invalid file format. Please upload the correct file format", //..., }