2.1 KiB
Linux Compilation Tutorial
The tutorial requires some basic knowledge about Linux OS!
Though it is unclear why it needs to run in Linux... Anyway in case somebody needs it_(:з」∠)_
If you meet any other problems, please feel free to submit issue to us.
Download and Compile 3rd-party Libraries
Opencv
Please search the tutorial and install. Nothing to mention. The version 4.5.3 is confirmed to be able to use. Other versions should be OK as well, but 4.5.3 is recommended to keep it the same as the project and avoid some unnecessary problems. Installing Opencv itself is enough. opencv_contrib is not required.
FastDeploy
- Refer to this tutorial to install FastDeploy with ONNX Runtime (Ort) and Vision.
zlib
In Ubuntu:
sudo apt update && sudo apt install zlib1g-dev
sudo ldconfig
If zlib does not exist in other distribution, you can try compiling from source.
MaaCore
-
Copy the compiled 3rd-party library to
3rdparty/libor changeCMakeLists.txtto indicate 3rd-party library path manually. -
The header files in
3rdparty/include/opencvis version4.5.3. If you are using other versions, please notice there may be conflicts in header files (you can simply replace them with youropencvheader files). -
Install
adb -
Copy resource files to the same folder of
libMaaCore.so.cd tools sh ./update_resource.sh <YourBuildDir> -
Call by Python interface or C interface, requiring you to write some code.
-
cmakecan compile a demo for testing by adding-DBUILD_TEST=ONflag
Integration Documentation
Python
Refer to the implementation of __main__ in Python demo
C
Refer to the implementation of CppSample
C sharp
Refer to the implementation of MaaWpfGui