API Overview
OCR SDK extern C API
The OCR SDK provides text detection and recognition capabilities across various platforms via a standard C-language interface. Developers can call the APIs through the provided header files to access the SDK's core features.
This section describes the list of public APIs defined with extern "C", along with the role and usage of each function. All APIs use C linkage for compatibility with C++ environments and are designed to control the entire SDK process from initialization and configuration to recognition and resource release.
Included headers
#include <HOCR_SDK_CPU.h>
#include <HOCR_SDK_COMMON.h>
API list
HOCR_SDK_CPU.h
| void* | HOCR_SDK_CPU_CreateArgoSDK (char* licensePath, char* engineLibDirPath, char* logFilePath) |
| bool | HOCR_SDK_CPU_CreateFromImrModelFile (void** obj, char* licensePath, char* engineLibDirPath, char* imrModelDataPath, char* name, bool isRecovery, bool isSelfCheck, int enginesCount) |
| bool | HOCR_SDK_CPU_initFromImrModelFile (void* obj, char* imrModelDataPath, char* name, bool isRecovery, bool isSelfCheck, int enginesCount) |
HOCR_SDK_COMMON.h
| typedef void | (*HOCR_SDK_RUN_RESULT_CALLBACK) (char*, int) |
| void | HOCR_SDK_freePointer (char** pointer) |
| int | HOCR_SDK_getArgoEngineInitInfo (void* obj, char** resultJson) |
| int | HOCR_SDK_getOpenApi (void* obj, char** openApiJson) |
| int | HOCR_SDK_getOpenApiOption (void* obj, char** openApiOptionJson, char* openApiName) |
| int | HOCR_SDK_getResourcesInfo (void* obj, char** resultJson, char* resourcePath) |
| int | HOCR_SDK_getStatusJsonStr (void* obj, char** resultJson) |
| bool | HOCR_SDK_releaseArgoSDK (void* obj) |
| bool | HOCR_SDK_releaseQueue (void* obj) |
| int | HOCR_SDK_run (void* obj, char** resultJson, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr) |
| void | HOCR_SDK_runAsync (void* obj, HOCR_SDK_RUN_RESULT_CALLBACK callback, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr) |
| void | HOCR_SDK_runAsyncBase64 (void* obj, HOCR_SDK_RUN_RESULT_CALLBACK callback, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr) |
| void* | HOCR_SDK_runAsyncQueue (void* obj, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr) |
| void* | HOCR_SDK_runAsyncQueueBase64 (void* obj, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr) |
| int | HOCR_SDK_runBase64 (void* obj, char** resultJson, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr) |
| void | HOCR_SDK_setLogFilePath (void* obj, char* logFilePath) |
| int | HOCR_SDK_waitResult (void* obj, char** resultJson) |