Android OpenCV编译(NDK r24+SDK 33.0+OpenCV 4.6)

在Android平台上编译OpenCV 4.6相关的

脚本如下:

mkdir build_android
cd build_android
export ANDROID_SDK_ROOT=/home/whoami/Android/Sdk
export ANDROID_SDK=$ANDROID_SDK_ROOT
export ANDROID_NDK=${ANDROID_SDK_ROOT}/ndk/24.0.8215888
export ANDROID_NDK_HOME=$ANDROID_NDK
export ANDROID_STANDALONE_TOOLCHAIN=$ANDROID_NDK_HOME
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DCMAKE_ANDROID_NDK=$ANDROID_NDK -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a" -DCMAKE_INSTALL_PREFIX=/home/whoami/OpenCV/arm64 -DBUILD_JAVA=ON -DANDROID_SDK_TOOLS=$ANDROID_SDK/build-tools/33.0.0 -DBUILD_ANDROID_PROJECTS=ON -DBUILD_ANDROID_EXAMPLES=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_SHARED_LIBS=ON -DBUILD_FAT_JAVA_LIB=OFF -S /home/whoami/OpenCV/opencv -S ../opencv -G "Ninja"
ninja

你可能感兴趣的:(image,android,opencv,人工智能)