Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
justin200914 committed May 27, 2023
1 parent 47e796e commit a8c39af
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
42 changes: 42 additions & 0 deletions header/idsdk.h
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 modified libidsdk.so
Binary file not shown.
73 changes: 73 additions & 0 deletions postman/kby-ai-idcard.postman_collection.json
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": []
}
]
}

0 comments on commit a8c39af

Please sign in to comment.