hw up
This commit is contained in:
parent
e89af48c50
commit
cd0935cde1
|
@ -763,19 +763,33 @@ namespace hg_imgproc
|
|||
#define test
|
||||
int ocr_auto_txtdirect()
|
||||
{
|
||||
string scanner_path = hg_log::get_module_full_path("libhwocrdetect.so");
|
||||
#ifdef OEM_HANWANG
|
||||
string libname = "libhwdriver.so";
|
||||
#elif OEM_LISICHENG
|
||||
string libname = "liblscdriver.so";
|
||||
#else
|
||||
string libname = "libhgdriver.so";
|
||||
#endif
|
||||
|
||||
string scanner_path = hg_log::get_module_full_path(libname.c_str());
|
||||
int pDirect = -1;
|
||||
int ret = SCANNER_ERR_OK;
|
||||
void *pHanld = NULL;
|
||||
|
||||
std::vector<cv::Mat> mats(mats_);
|
||||
|
||||
std::vector<cv::Mat> mats(mats_);
|
||||
mats_.clear();
|
||||
printf("scanner_path:%s\r\n",scanner_path.c_str());
|
||||
|
||||
if(scanner_path.empty())
|
||||
{
|
||||
return SCANNER_ERR_OUT_OF_RANGE;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
#if ((!defined x86_64) && (!defined WIN32))
|
||||
//linux x86_64 暂时没有OCR三方
|
||||
#ifndef test
|
||||
|
|
|
@ -84,7 +84,7 @@ else()
|
|||
|
||||
endif()
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ -Wl,--exclude-libs,ALL -zdefs -Bdirect pthread dl )
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ -Wl,--exclude-libs,ALL -zdefs -Bdirect pthread dl -Wl,-rpath=.)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}
|
||||
${PROJECT_SOURCE_DIR}/../3rdparty/nick
|
||||
${PROJECT_SOURCE_DIR}/../3rdparty/opencv/include
|
||||
|
|
|
@ -22,7 +22,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE hgdriver
|
|||
)
|
||||
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ -Wl,--exclude-libs,ALL -zdefs -Bdirect pthread dl )
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ -Wl,--exclude-libs,ALL -zdefs -Bdirect pthread dl -Wl,-rpath=.)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}
|
||||
${PROJECT_SOURCE_DIR}/../sdk/hginclude
|
||||
${PROJECT_SOURCE_DIR}/../../sdk/include
|
||||
|
|
Loading…
Reference in New Issue