宏定义命名
This commit is contained in:
parent
8f24a3948b
commit
18464bcc18
File diff suppressed because one or more lines are too long
|
@ -69,6 +69,15 @@ using namespace std;
|
|||
#define MAKE_INT(a, b, c, d) (GET_BYTE(a) | (GET_BYTE(b) << 8) | (GET_BYTE(c) << 16) | (GET_BYTE(d) << 24))
|
||||
#define IMAGE_DATA_BUF_CVMAT (void*)MAKE_INT('M', 'T', 'R', 'X')
|
||||
#define IMAGE_DATA_BUF_CHAR (void*)MAKE_INT('C', 'H', 'A', 'R')
|
||||
|
||||
#ifdef OEM_HANWANG
|
||||
#define IMGPRC_LIBNANE_WIN L"HWImgProc.dll"
|
||||
|
||||
#elif defined(OEM_LISICHENG)
|
||||
#define IMGPRC_LIBNANE_WIN L"LSCImgProc.dll"
|
||||
#else
|
||||
#define IMGPRC_LIBNANE_WIN L"HGImgProc.dll"
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// functional ...
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -242,26 +251,29 @@ namespace hg_imgproc
|
|||
{
|
||||
int ret = 0;
|
||||
#ifndef WIN32
|
||||
#ifdef OEM_HANWANG
|
||||
string libname = "libHGImgProc.so";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
string libname = "libLscImgProc.so";
|
||||
#else
|
||||
string libname = "libHwImgProc.so";
|
||||
#endif
|
||||
#ifdef OEM_HANWANG
|
||||
string libname = "libhwdriver.so";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
string libname = "liblscdriver.so";
|
||||
#else
|
||||
string libname = "libhgdriver.so";
|
||||
#endif
|
||||
|
||||
string scanner_path = hg_log::get_module_full_path(libname.c_str());
|
||||
|
||||
if (scanner_path.empty())
|
||||
{
|
||||
return SCANNER_ERR_OUT_OF_RANGE;
|
||||
}
|
||||
printf("auto txt libpath is:%s\r\n", scanner_path.c_str());
|
||||
scanner_path = scanner_path.substr(0, scanner_path.size() - libname.size());
|
||||
scanner_path += "libhwocrdetect.so";
|
||||
printf("hwlib path:%s\r\n", scanner_path.c_str());
|
||||
|
||||
if (access(scanner_path.c_str(), F_OK) != 0)
|
||||
{
|
||||
return SCANNER_ERR_OUT_OF_RANGE;
|
||||
}
|
||||
#endif
|
||||
#if (!defined WIN32)
|
||||
|
||||
Dynamicopen_pHandle_ = dlopen(scanner_path.c_str(), RTLD_LAZY);
|
||||
if (!Dynamicopen_pHandle_)
|
||||
{
|
||||
|
@ -272,7 +284,7 @@ namespace hg_imgproc
|
|||
ocrexit_ = (SDKExit_)dlsym(Dynamicopen_pHandle_, "HGImgProc_DestroyOCRMgr");
|
||||
|
||||
#else
|
||||
Dynamicopen_pHandle_ = LoadLibrary(L"HGImgProc.dll");
|
||||
Dynamicopen_pHandle_ = LoadLibrary(IMGPRC_LIBNANE);
|
||||
if (Dynamicopen_pHandle_)
|
||||
{
|
||||
ocrinit_ = (SDKInitialize_)GetProcAddress(Dynamicopen_pHandle_, "HGImgProc_CreateOCRMgr");
|
||||
|
|
Loading…
Reference in New Issue