Skip to main content

API Overview

OCR SDK extern C API

OCR SDK provides character detection and recognition functions across various platforms through C language-based interface, and can access main functions through ArgoSDK.h header file. This section lists public APIs defined with extern "C" and briefly explains the basic roles and purposes of each function.

The API maintains C linkage for easy use in C++ environments and is configured to control the entire OCR processing including initialization, configuration, processing, and resource release. Each function is used to control detailed operations of OCR modules or retrieve results.

Included Headers

#include <ArgoSDK.h>

API List

voidfreePointer (char** pointer)
void *CreateFromImrModelFile
(void** obj, char* licensePath,
char* engineLibDirPath, char* imrModelDataPath, char* name, bool isRecovery, bool isSelfCheck,
int gpuCount, int engines_per_gpu[])
void *CreateFromMakeUpJsonStr
(void** obj, char* licensePath, char* engineLibDirPath,
char* jsonStr, char* name, bool isRecovery,
bool isSelfCheck, int gpuCount, int engines_per_gpu[])
void *CreateArgoSDK (char* licensePath, char* engineLibDirPath, char* logFilePath)
boolinitFromImrModelFile (void* obj, char* imrModelDataPath, char* name, bool isRecovery, bool isSelfCheck,
int gpuCount, int engines_per_gpu[])
boolinitFromMakeUpJsonStr (void* obj, char* jsonStr, char* name, bool isRecovery, bool isSelfCheck, int gpuCount, int engines_per_gpu[])
voidsetLogFilePath (void* obj, char* logFilePath)
intreleaseArgoSDK (void* obj)
intgetGpuCount (void* obj)
boolisCudaAvailable (void* obj)
intgetOpenApi (void* obj, char** openApiJson)
intgetOpenApiOption (void* obj, char** openApiOptionJson, char* openApiName)
intgetStatusJsonStr (void* obj, char** resultJson)
intgetArgoEngineInitInfo (void* obj, char** resultJson)
intgetResourcesInfo (void* obj, char** resultJson, char* resourcePath)
intrun (void* obj, char** resultJson, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr)
voidrunAsync (void* obj, C_RESULT_CALLBACK callback, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr)
intrunBase64 (void* obj, char** resultJson, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr)
voidrunAsyncBase64 (void* obj, C_RESULT_CALLBACK callback, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr)
void *runAsyncQueueBase64 (void* obj, char* openApiName, char* requestId, int imgWidth, int imgHeight, int colorSpace, char* imgData, char* requestOptionJsonStr)
intwaitResult (void* obj, char** resultJson)
intreleaseQueue (void* obj)