Skip to content

HOCR_SDK_getResourcesInfo

Included header

#include <HOCR_SDK_COMMON.h>

Description

API to query information of resource files (*.imr) used for engine initialization

HOCR_SDK_getResourcesInfo()

int HOCR_SDK_getResourcesInfo(void* obj, char** resultJson, char* resourcePath)
Parameters
NameTypeDescription
objvoid*

Pointer to 'ArgoEngineApi' object

resultJsonchar**

Pointer to receive the result string

resourcePathchar*

Path of the resource file to query

Return value

int: Length of the ‘resultJson’ string

Examples

char *resultJsonStr = nullptr;
std::string resourcePath = ".\\assets\\Hancom.25.12.01.cpu.imr";
int resultSize = HOCR_SDK_getResourcesInfo(obj, &resultJsonStr, resourcePath.data());
std::string resultJson(resultJsonStr, resultSize);

Example result JSON

{
"TEXT_DETECTION": {
"COUNT": [],
"DEPENDS_ON": [],
"IS_DEFAULT": false,
"IS_OPEN_API": false,
"MODEL_DATA_NAME": "TextDetection",
"SELECTIVE_ON": [],
"RESOURCE": {
"DEPEND_LIB_TYPE": "MT_DEFAULT",
"DEPEND_LIB_NAME": "libArgoTextDetection",
"NAME": "TextDetection",
"IS_GPU": false,
"MODEL_RUNNING_GPU_SIZE": 0,
"NOTI": "...",
"VERSION": "...",
"CREATE_DATE": "...",
"MODEL_REQUEST_OPTIONAL": {}
}
},
"TEXT_RECOGNITION": {
"COUNT": [],
"DEPENDS_ON": [
"TEXT_DETECTION"
],
"IS_DEFAULT": true,
"IS_OPEN_API": true,
"MODEL_DATA_NAME": "TextRecognition",
"REQUIRED_DEPEND_RESULT": [
"TEXT_DETECTION"
],
"SELECTIVE_ON": [],
"RESOURCE": {
"DEPEND_LIB_TYPE": "MT_DEFAULT",
"DEPEND_LIB_NAME": "libArgoTextRecognition",
"NAME": "TextRecognition",
"IS_GPU": false,
"MODEL_RUNNING_GPU_SIZE": 4096,
"NOTI": "...",
"VERSION": "...",
"CREATE_DATE": "...",
"MODEL_REQUEST_OPTIONAL": {}
}
}
}