Requirements
LPV runs on Linux x86_64 and aarch64 system. For more details, see Supported Platforms and Minimum System Requirements page.
Install
Download then extract the lpv_sdk_x.x.x.x_linux_arch.tar.gz file to any directory.
Install x86_64 Package
mkdir lpv & tar -xf lpv_sdk_x.x.x.x_linux_x86_64.tar.gz -C lpv
Install arm64 Package
mkdir lpv & tar -xf lpv_sdk_x.x.x.x_linux_arm64.tar.gz -C lpv
Licensing
Using License File
- Run lpvKeyTool under LPV bin folder. It generates a lpv.key file on your desktop.
- Send the generated lpv.key file to us or your LPV SDK Tech Support. We will send you back a .lic license file.
- You may manually place the license file into any of the following folder:
- LPV lib folder
- /home/LPV/
Integration
Integrated with LPV
On Linux, LPV interfaces are exported in C symbols then wrapped into C++ classes which is much more convenient for use.
In your C++ code, add #include "LPVXXX.h"
to include the required LPV modules, then create LPV instances via static LClass::Create()
functions.
The following code show a short example:
#include "LPVCore.h";
#include "LPVGeom.h";
#include "LPVPat.h";
ILMatchPtr lmatch = LMatch::Create();
lmatch->MaxCount = 1;
lmatch->AngleTolerance = 180;
LPVErrorCode errCode = lmatch->Match(sourceImg, roi, out matchResults);
if (errCode != LPVErrorCode::LPVNoError) {}
LPV Core Library, provide basic functionalities.
Definition: LPVCore.idl:427
LPVErrorCode
This enumeration represents the type of a LPV function error.
Definition: LPVCore.idl:530
LPV Geometry Library, provide geometric functionalities.
Definition: LPVGeom.idl:80
LPV Pattern Library, provides functionality for pattern matching.
Definition: LPVPat.idl:80
Add LPV Libraries to CMake Projects
Edit CMakeList.txt, add include path and link libraries.
# set C++ starndard to at least cpp11
set(CMAKE_CXX_STANDARD 11)
# add include path
# ${LPV_INCLUDE_PATH} points to include folder
target_include_directories(${PROJECT_NAME} ${LPV_INCLUDE_PATH})
# link lpv module
# ${LPV_LIB_PATH} points to lib folder
function(link_lpv_lib module_name)
find_library(LPV_LIBRARY_${module_name} NAMES ${module_name} PATHS ${LPV_LIB_PATH})
if(NOT LPV_LIBRARY_${module_name})
message("!!!! LPV_LIBRARY_${module_name} not found")
else()
target_link_libraries(${PROJECT_NAME} ${LPV_LIBRARY_${module_name}})
endif()
endfunction()
link_lpv_lib(lpvCore)
link_lpv_lib(lpvGeom)
link_lpv_lib(lpvPat)
Add LPV Libraries to Qt Projects
If you are using Qt Creator,
- RMC your project, select Add Library.
- Choose External library, then click Next.
- Browse Library file to LPV dynamic libraries under lib folder.
- Browse Include path to LPV include folder.
- Check Linux platform and Dynamic linkage.
- Click Next and then Finish.
Alternatively, you can edit .pro file manually as the following:
# add include path
# ${LPV_INCLUDE_PATH} points to include folder
INCLUDEPATH += $$LPV_INCLUDE_PATH
# link lpv module
# ${LPV_LIB_PATH} points to lib folder
LIBS += -L$$LPV_LIB_PATH -llpvCore -llpvGeom -llpvPat
DEPENDPATH += $$LPV_LIB_PATH