Vorhandene ähnliche target images | POST /similar
Prüfen Sie, ob in der gallery bereits ein Bild vorhanden ist, das dem target image ähnelt. Es wird empfohlen, diese API vor dem Erstellen eines neuen target zu verwenden.
Action
POST /similar
Authentication
Http Header
Content-Type=application/json
HTTP Header: Authorization (bei Authentifizierung mit API Key Token)
Request-Parameter
| Field | Type | Required | Description |
|---|---|---|---|
| image | String(base64) | Yes | Base64-encoded String des Bildinhalts. JPG- und PNG-Bilder werden unterstützt. |
Response-Felder
| Field | Description | |
|---|---|---|
| statusCode | Status code. 0 bedeutet erfolgreiche Authentifizierung. Weitere Informationen siehe Status codes | |
| result | Error message oder result: ein Array mehrerer ähnlicher target images. Wenn result ein leeres Array ist, existiert kein ähnliches Bild | |
| timestamp | Serverzeit beim Zurückgeben der response. Verwendet das Unix timestamp-Format in Millisekunden |
Error codes
Siehe Status codes and error codes
Request-Beispiel
POST /similar/ 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-Beispiel
HTTP/1.1 200 OK
Content-Type: application/json
{
"statusCode": 0,
"result": {
"date": "2016-06-15T09:58:51.000Z",
"results":[
{
"targetId":"e61db301-e80f-4025-b822-9a00eb48d8d2",
"trackingImage":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgM...",
"name": "easyar",
"size": "5",
"meta": "496fbbabc2b38ecs3460a...",
"type": "ImageTarget",
"date": "2016-06-15T09:56:30.000Z",
"active":"1",
"trackableRate": 0,
"detectableRate": 0,
"detectableDistinctiveness":0,
"detectableFeatureCount": 0,
"trackableDistinctiveness": 0,
"trackableFeatureCount": 0,
"trackableFeatureDistribution": 0,
"trackablePatchContrast": 0,
"trackablePatchAmbiguity": 0
}
]
},
"timestamp": 1514736000000,
}