current position:Home>Cmake cross compiling Android environment opencv under windows (to add ffmpeg)

Cmake cross compiling Android environment opencv under windows (to add ffmpeg)

2022-01-27 02:25:08 Carry a handle at the entrance of the street

Reference blog :
https://www.jianshu.com/p/550c85024c49
https://blog.csdn.net/airgreen/article/details/108944582

1. download opencv Source code
2. To add... At compile time ffmpeg, By blog 1 Modify two files in the way mentioned
3. compile opencv

cmake -G "Unix Makefiles"  -DBUILD_ANDROID_PROJECTS=OFF -DCMAKE_MAKE_PROGRAM="D:/Qt5.11.3/Tools/mingw530_32/bin/mingw32-make.exe" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DBUILD_SHARED_LIBS=OFF -DANDROID_NDK="D:/android-ndk-r15c" -DANDROID_SDK="D:\SDK\adt-bundle-windows-x86_64-20140702\sdk" -DCMAKE_TOOLCHAIN_FILE=D:/android-ndk-r15c/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=22 -DANDROID_ABI=armeabi-v7a -DANDROID_CPP_FEATURES="rtti exceptions" -DANDROID_ARM_NEON=TRUE -DANDROID_TOOLCHAIN=gcc -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-22 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="../install_dynamic/android/armeabi-v7a/" -DBUILD_opencv_java=OFF -DBUILD_ANDROID_EXAMPLES=OFF -DBUILD_DOCS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_CUDA=OFF -DWITH_MATLAB=OFF -DWITH_TIFF=OFF -DWITH_FFMPEG=ON -DBUILD_opencv_dnn=OFF -DBUILD_opencv_objdetect=OFF -DBUILD_opencv_stitching=OFF -DBUILD_opencv_photo=OFF -DBUILD_opencv_ml=OFF -DBUILD_opencv_dnn=OFF -DBUILD_opencv_features2d=OFF -DBUILD_opencv_flann=OFF ..

copyright notice
author[Carry a handle at the entrance of the street],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270225065098.html

Random recommended