1.Download
1
|
https://github.com/opencv/opencv.git
|
2.Build
在platforms/android目录执行如下脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env bash
export ANDROID_SDK=/绝对路径
export ANDROID_HOME=${ANDROID_SDK}
python build_sdk.py ./OpencvSdk \
--ndk_path=${NDK_HOME} \
--config='ndk-18-api-level-21.config.py' \
--no_ccache \
#--no_samples_build \
# --use_android_buildtools \
#--extra_modules_path=/....../opencv_contrib-3.4.1/modules
#--force_opencv_toolchain
#--sdk_path= ${ANDROID_SDK}\
exit 0
|