汉王库调整

This commit is contained in:
13038267101 2022-07-29 10:11:38 +08:00
parent 7348f9c06c
commit 604bda6294
1 changed files with 14 additions and 7 deletions

View File

@ -763,11 +763,18 @@ namespace hg_imgproc
#define test
int ocr_auto_txtdirect()
{
int pDirect = -1;
int ret = SCANNER_ERR_OK;
void *pHanld = NULL;
std::vector<cv::Mat> mats(mats_);
mats_.clear();
string scanner_path = hg_log::get_module_full_path("libhwocrdetect.so");
int pDirect = -1;
int ret = SCANNER_ERR_OK;
void *pHanld = NULL;
std::vector<cv::Mat> mats(mats_);
mats_.clear();
if(scanner_path.empty())
{
return SCANNER_ERR_OUT_OF_RANGE;
}
#if ((!defined x86_64) && (!defined WIN32))
//linux x86_64 暂时没有OCR三方
@ -794,10 +801,10 @@ namespace hg_imgproc
typedef int (*sdkinit)(void *);
typedef int (*sdkgetfiledirectimage)(unsigned char*pbImage, int nWidth, int nHeight, TColorType nColorType, void *pstHandle, int *pDirect);
typedef int (*sdkexit)(void *);
void *hanlde = dlopen("/home/hg/sane/release/kylin/mips64/libhwocrdetect.so",RTLD_LAZY);
void *hanlde = dlopen(scanner_path.c_str(),RTLD_LAZY);
if(!hanlde)
{
return -1;
return SCANNER_ERR_OUT_OF_RANGE;
}
sdkinit init = (sdkinit)dlsym(hanlde , "HWOCR_SDKInitialize");
sdkgetfiledirectimage d = (sdkgetfiledirectimage)dlsym(hanlde , "HWOCR_GetFileDirectImage");