Table of Contents

Image recognizability difficulty rating | POST /grade/detection

Scores the image recognition difficulty from 0 to 4 in order. A larger score indicates greater difficulty. -1 indicates a recognition error caused by an image that does not meet requirements, such as a damaged image or blank white paper.

The best practice is to call this API before creating a new target image.

Grade Description
0 or 1 Target is easy to detect
2 Average
3 or 4 Target is difficult to detect

Action

There are three APIs. In general, for image search by image only, you only need the comprehensive recognizability rating.

  • POST /grade/detection

    • Only provides the comprehensive result for recognizability
  • POST /grade/tracking

    • Only provides the comprehensive result for trackability
  • POST /grade/detail

    • Provides multidimensional detailed algorithm ratings

Authentication

Required

Http Header

Content-Type=application/json

HTTP Header: Authorization (when API Key Token authentication is used)

Request parameters

Field Type Required Description
image String(base64) Yes Base64 encoded string of image content. Supports JPG and PNG images. Maximum image size is 2MB.

Return fields

Field Description
statusCode Status code 0 indicates authentication is correct. For more, see Status codes
result Error message, or grade
timestamp Server-side time when the response is returned. Uses Unix timestamp format, in milliseconds
result.grade [-1, 0, 1, 2, 3, 4], where 0 and 1 indicate easy recognition. 4 is the most difficult to recognize. -1 indicates the image does not meet requirements.

Error codes

See Status codes and error codes

Request example

    POST /grade/detection/ HTTP/1.1
    Host:
    Date: Mon, 1 Jan 2018 00:00:00 GMT
    Content-Type: application/json
    {
        "image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgM...",
        "timestamp": 1514736000000,
        "appKey": "test_app_key",
        "signature": "89985e2420899196db5bdf16b3c2ed0922c0c221"
    }

Return example

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "statusCode": 0,
        "result": {
            "grade": 1
        },
        "timestamp": 1514736000000
    }