-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47e796e
commit a8c39af
Showing
3 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
enum SDK_ERROR | ||
{ | ||
SDK_SUCCESS = 0, | ||
SDK_LICENSE_KEY_ERROR = -1, | ||
SDK_LICENSE_APPID_ERROR = -2, | ||
SDK_LICENSE_EXPIRED = -3, | ||
SDK_NO_ACTIVATED = -4, | ||
SDK_INIT_ERROR = -5, | ||
}; | ||
|
||
|
||
/* | ||
* Get the machine code for SDK activation | ||
*/ | ||
const char* getMachineCode(); | ||
|
||
/* | ||
* Activate the SDK using the provided license | ||
*/ | ||
|
||
int setActivation(char* license); | ||
|
||
/* | ||
* Initialize the SDK with the specified model path | ||
*/ | ||
int initSDK(); | ||
|
||
/* | ||
* The function accepts only one parameter, which should be the base64-encoded format of the image (e.g., JPG, PNG, etc.). | ||
* If the recognition is successful, the function will return a JSON-formatted string containing the recognized information. In case of failure, the return value will be NULL. | ||
*/ | ||
char* idcardRecognition(char* image_base64); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "ae453c9a-d672-4e3d-bf4e-3847473197bc", | ||
"name": "kby-ai-idcard", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | ||
"_exporter_id": "2379931" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "idcard_recognition", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "formdata", | ||
"formdata": [ | ||
{ | ||
"key": "file", | ||
"type": "file", | ||
"src": [] | ||
} | ||
] | ||
}, | ||
"url": { | ||
"raw": "http://18.221.33.238:8082/idcard_recognition", | ||
"protocol": "http", | ||
"host": [ | ||
"18", | ||
"221", | ||
"33", | ||
"238" | ||
], | ||
"port": "8082", | ||
"path": [ | ||
"idcard_recognition" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "idcard_recognition_base64", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\r\n \"base64\":\"xxx\"\r\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "http://127.0.0.1:8082/idcard_recognition_base64", | ||
"protocol": "http", | ||
"host": [ | ||
"127", | ||
"0", | ||
"0", | ||
"1" | ||
], | ||
"port": "8082", | ||
"path": [ | ||
"idcard_recognition_base64" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} |