Table of Contents

Image recognizability difficulty rating | POST /grade/detection

Rate the difficulty of image recognition on a scale from 0 to 4, where a higher score indicates greater difficulty. -1 indicates that the image does not meet the specifications and cannot be recognized (e.g., corrupted or blank paper).

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

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

Action

There are three APIs, but for general image search purposes, only the comprehensive rating for recognizability is needed.

  • POST /grade/detection

    • Provides only the comprehensive result for recognizability
  • POST /grade/tracking

    • Provides only the comprehensive result for tracking
  • POST /grade/detail

    • Provides detailed multi-dimensional algorithmic ratings

Authentication

Required

Http header

Content-Type=application/json

HTTP Header: Authorization (when using API Key Token authentication)

Request parameters

Field Type Required Description
image String(base64) Yes Base64-encoded string of the image content, supporting JPG and PNG formats. Maximum image size is 2MB.

Response fields

Field Description
statusCode Status code 0 indicates correct authentication. For more details, refer to 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 specifications.

Error codes

Refer to 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"  
    }  

Response example

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